From 31b7ebcbc7fdbef3b26e714443b1f7840b7982e6 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 23 Feb 2022 09:29:28 -0500 Subject: [PATCH] pan/mdg: Fix overflow in intra-bundle interference There are up to 4 instructions in the latter stage (if a branch is included), not 3. Bump the limit to fix memory corruption. Signed-off-by: Alyssa Rosenzweig Reported-by: Icecream95 Part-of: --- src/panfrost/midgard/midgard_ra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c index af208bb0b26..8c9ef632542 100644 --- a/src/panfrost/midgard/midgard_ra.c +++ b/src/panfrost/midgard/midgard_ra.c @@ -357,7 +357,7 @@ mir_compute_interference( * avoid this situation. */ util_dynarray_foreach(&blk->bundles, midgard_bundle, bundle) { - midgard_instruction *instrs[2][3]; + midgard_instruction *instrs[2][4]; unsigned instr_count[2] = { 0, 0 }; for (unsigned i = 0; i < bundle->instruction_count; i++) {