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:
Erico Nunes
2022-02-02 12:30:56 +01:00
committed by Marge Bot
parent 5b15849366
commit 7297f931f0
+2
View File
@@ -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
},
},
};