Skip to content

broadcom/compiler: change current block on setting spill base

Juan A. Suárez requested to merge jasuarez/mesa:review/v3d-spill-no-ldunif into main

The spill base setting instructions (which includes some uniforms) are added in the entry block, not in the current block. When ldunif optimization is applied, the cursor is pointing to instructions in the entry block, but the current block is a different one. This leads to a heap-buffer-overflow when going through the list of instructions (detected by the address sanitizer).

Thus change the current block to entry block, and restore it after the setup is done.

This fixes dEQP-VK.ssbo.readonly.layout.single_struct.single_buffer.std430_instance_array_comp_access_store_cols with address sanitizer enabled.

Edited by Juan A. Suárez

Merge request reports