From 5be2b03b8839d3ea6e66175ce56e9482f55615fc Mon Sep 17 00:00:00 2001 From: Lorenzo Rossi Date: Fri, 27 Mar 2026 13:01:21 +0100 Subject: [PATCH] pan/compiler: Add bound assert on emit_split_i32 This could've saved me a lot of time debugging stack corruption. Signed-off-by: Lorenzo Rossi Reviewed-by: Christoph Pillmayer Reviewed-by: Faith Ekstrand Part-of: --- src/panfrost/compiler/bifrost/bifrost_compile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/panfrost/compiler/bifrost/bifrost_compile.c b/src/panfrost/compiler/bifrost/bifrost_compile.c index 11e329b0b99..bfe8e970de4 100644 --- a/src/panfrost/compiler/bifrost/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost/bifrost_compile.c @@ -200,6 +200,7 @@ bi_cache_collect(bi_builder *b, bi_index dst, bi_index *s, unsigned n) static void bi_emit_split_i32(bi_builder *b, bi_index dests[4], bi_index vec, unsigned n) { + assert(n <= 4); /* Setup the destinations */ for (unsigned i = 0; i < n; ++i) { dests[i] = bi_temp(b->shader);