[Mesa-dev] [PATCH 5/5] panfrost: Make sure bundle.instructions[] contains valid instructions
Boris Brezillon
boris.brezillon at collabora.com
Tue Aug 27 10:36:44 UTC 2019
Add an assert() in schedule_bundle() to make sure all instruction
pointers in bundle.instructions[] are valid.
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
---
src/panfrost/midgard/midgard_schedule.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c
index 1a22e683c3d3..f04a5c46a5dc 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);
}
--
2.21.0
More information about the mesa-dev
mailing list