From 5b46e1f7f4db2ce06b4f150d653d98cf8363f348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 4 Sep 2026 14:53:13 +0200 Subject: [PATCH] Maker: fix RSS accounting when dispatching memory-blocked steps makeStep() requires that the caller subtracts the step's max_rss from available_rss, and that is indeed done in readyStep(). However, makeStep() *itself* failed to do this when dispatching memory-blocked steps, thus largely undermining the mechanism. --- lib/compiler/Maker.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/compiler/Maker.zig b/lib/compiler/Maker.zig index 55c88d1233decbf9b352087e2aa3a8d614158367..6038cad96d84e824b062749abcc63d44625a0451 100644 --- a/lib/compiler/Maker.zig +++ b/lib/compiler/Maker.zig @@ -2730,6 +2730,7 @@ fn makeStep( const candidate_max_rss = candidate_index.ptr(c).max_rss.toBytes(); if (maker.available_rss < candidate_max_rss) break; assert(maker.memory_blocked_steps.pop() == candidate_index); + maker.available_rss -= candidate_max_rss; dispatch_set.appendAssumeCapacity(candidate_index); } } -- 2.54.0