From aa656b2ee52045dade804fd54e33bf693e207ede Mon Sep 17 00:00:00 2001 From: Lexroid Date: Sun, 25 Oct 2026 02:59:40 +0300 Subject: [PATCH] test(shader): hold the table caller before decoding it RdnaProgram::code is a span, so decoding the temporary TableCaller() left it dangling when LinkCalls copied the caller. Co-Authored-By: Claude Opus 5.5 --- core/libs/tests/ScalarCall.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/libs/tests/ScalarCall.cpp b/core/libs/tests/ScalarCall.cpp index 7618926cf6..0ace20ea54 100644 --- a/core/libs/tests/ScalarCall.cpp +++ b/core/libs/tests/ScalarCall.cpp @@ -399,7 +399,8 @@ static std::vector HoistedTableCaller(HoistedShape shape) { static void CheckTableCalleeProgramCounter() { const SwappcInfo swappc{false, 0u, 16u}; - const auto program = RdnaInstructionDecoder{}.Decode(TableCaller()); + const auto caller = TableCaller(); + const auto program = RdnaInstructionDecoder{}.Decode(caller); const auto calls = FindTableCalls(program, swappc); Require(calls.size() == 1u); const std::vector callee{0xbf820001u, 0xbe901f00u, 0xbe80200eu};