util/ralloc: UBSan reports misaligned member access
While attempting to run VK-CTS with UBSan-enabled Turnip, it runs into the following ralloc
-related errors:
TU: info: TU_DEBUG=0x1
TU: info: Created an instance
TU: info: Found compatible device '/dev/dri/renderD128' (msm).
TU: info: TU_DEBUG=0x1
TU: info: Created an instance
TU: info: Found compatible device '/dev/dri/renderD128' (msm).
../src/util/ralloc.c:873:7: runtime error: member access within misaligned address 0x000011aaf658 for type 'struct gc_slab', which requires 16 byte alignment
0x000011aaf658: note: pointer points here
00 00 00 00 10 f2 aa 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 f6 aa 11
^
../src/util/ralloc.c:873:7: runtime error: member access within misaligned address 0x000011aaf658 for type 'struct gc_slab', which requires 16 byte alignment
0x000011aaf658: note: pointer points here
00 00 00 00 10 f2 aa 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 f6 aa 11
^
../src/util/ralloc.c:873:7: runtime error: member access within misaligned address 0x000011aaf698 for type 'struct gc_slab', which requires 16 byte alignment
0x000011aaf698: note: pointer points here
00 00 00 00 90 f6 aa 11 00 00 00 00 a0 f6 aa 11 00 00 00 00 a0 f6 aa 11 00 00 00 00 58 29 ad 11
^
../src/util/ralloc.c:873:7: runtime error: member access within misaligned address 0x000011aaf698 for type 'struct gc_slab', which requires 16 byte alignment
0x000011aaf698: note: pointer points here
00 00 00 00 90 f6 aa 11 00 00 00 00 a0 f6 aa 11 00 00 00 00 a0 f6 aa 11 00 00 00 00 58 29 ad 11
^
../src/util/ralloc.c:898:7: runtime error: member access within misaligned address 0x000011aaf658 for type 'struct gc_slab', which requires 16 byte alignment
0x000011aaf658: note: pointer points here
00 00 00 00 10 f2 aa 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 f6 aa 11
^
../src/util/ralloc.c:898:7: runtime error: member access within misaligned address 0x000011aaf658 for type 'struct gc_slab', which requires 16 byte alignment
0x000011aaf658: note: pointer points here
00 00 00 00 10 f2 aa 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 f6 aa 11
^
../src/util/ralloc.c:898:7: runtime error: member access within misaligned address 0x000011aaf698 for type 'struct gc_slab', which requires 16 byte alignment
0x000011aaf698: note: pointer points here
00 00 00 00 90 f6 aa 11 00 00 00 00 a0 f6 aa 11 00 00 00 00 a0 f6 aa 11 00 00 00 00 58 29 ad 11
^
../src/util/ralloc.c:898:7: runtime error: member access within misaligned address 0x000011aaf698 for type 'struct gc_slab', which requires 16 byte alignment
0x000011aaf698: note: pointer points here
00 00 00 00 90 f6 aa 11 00 00 00 00 a0 f6 aa 11 00 00 00 00 a0 f6 aa 11 00 00 00 00 58 29 ad 11
^
../src/freedreno/ir3/ir3_compiler_nir.c:4736:16: runtime error: variable length array bound evaluates to non-positive value 0
../src/freedreno/ir3/ir3_compiler_nir.c:4737:31: runtime error: variable length array bound evaluates to non-positive value 0
Test case 'dEQP-VK.binding_model.descriptorset_random.sets4.unifindexed.ubolimitlow.sbolimithigh.sampledimglow.lowimgnotex.iublimitlow.uab.vert.noia.0'..
../src/freedreno/vulkan/tu_pass.c:420:9: runtime error: variable length array bound evaluates to non-positive value 0
../src/freedreno/vulkan/tu_pass.c:189:9: runtime error: variable length array bound evaluates to non-positive value 0
Pass (Pass)
Test case 'dEQP-VK.binding_model.descriptorset_random.sets4.runtimesize.ubolimitlow.sbolimitlow.sampledimglow.outimgtexlow.noiub.nouab.frag.noia.5'..
Pass (Pass)
DONE!