From: Boris Brezillon Date: Tue, 27 Aug 2019 09:12:02 +0000 (+0200) Subject: panfrost: Make sure bundle.instructions[] contains valid instructions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0142dcb990eee047af9e7f520bf7a27f6ef765b1;p=mesa.git panfrost: Make sure bundle.instructions[] contains valid instructions Add an assert() in schedule_bundle() to make sure all instruction pointers in bundle.instructions[] are valid. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c index f80a0354fb8..60ad5ebb79c 100644 --- a/src/panfrost/midgard/midgard_schedule.c +++ b/src/panfrost/midgard/midgard_schedule.c @@ -562,6 +562,7 @@ schedule_bundle(compiler_context *ctx, midgard_block *block, midgard_instruction midgard_instruction *uins = ins; for (; packed_idx < bundle.instruction_count; ++packed_idx) { + assert(&uins->link != &block->instructions); bundle.instructions[packed_idx] = uins; uins = mir_next_op(uins); }