From 1105f7b98fafef32d785159d2f0f909e857ba81a Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 28 Aug 2025 10:39:35 +0100 Subject: [PATCH] aco: fix signed integer overflow Fix UBSan error: runtime error: signed integer overflow: 2147483647 + 32 cannot be represented in type 'int' Signed-off-by: Rhys Perry Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/compiler/aco_scheduler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_scheduler.cpp b/src/amd/compiler/aco_scheduler.cpp index 9cdfd05d364..c25fa74b8bc 100644 --- a/src/amd/compiler/aco_scheduler.cpp +++ b/src/amd/compiler/aco_scheduler.cpp @@ -1207,7 +1207,7 @@ void schedule_block(sched_ctx& ctx, Program* program, Block* block) { ctx.last_SMEM_dep_idx = 0; - ctx.last_VMEM_store_idx = INT_MAX; + ctx.last_VMEM_store_idx = INT_MIN; ctx.last_SMEM_stall = INT16_MIN; ctx.mv.block = block;