Skip to content

panfrost: fix strict-aliasing violations when packing fb ptrs

Italo Nicola requested to merge italove/mesa:fb_ptr_aliasing into main

Compilers are free to make the assumption that pointers don't violate strict aliasing. If that assumption is incorrect, as it is with the framebuffer pointer packing code here, the job can fail.

This depends heavily on the compiler and optimization levels, so it's hard to reproduce, but it did happen for at least two users running with -O2 on gcc.

Fixes: 67cbbf94 ("panfrost: Use framebuffer pointer XML") Signed-off-by: Italo Nicola

cc @chaoskagami

Merge request reports