lima/ppir: initialize slots array for dummy/undef
Some functions in ppir iterate the ppir_op_info slots arrays looking for the PPIR_INSTR_SLOT_END token. The dummy/undef internal ops may appear in the scheduling code and their slots arrays did not contain that token, which could result in invalid array reads. Reported by gcc -fsanitize=address. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Cc: 22.0 <mesa-stable> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14894>
This commit is contained in:
@@ -333,12 +333,14 @@ const ppir_op_info ppir_op_infos[] = {
|
||||
.name = "undef",
|
||||
.type = ppir_node_type_alu,
|
||||
.slots = (int []) {
|
||||
PPIR_INSTR_SLOT_END
|
||||
},
|
||||
},
|
||||
[ppir_op_dummy] = {
|
||||
.name = "dummy",
|
||||
.type = ppir_node_type_alu,
|
||||
.slots = (int []) {
|
||||
PPIR_INSTR_SLOT_END
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user