From a4ca7a4f327a1f2af792fb15b60344bc8cc6487f Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 15:56:59 +0330 Subject: memdebug: accept 'memdebug scrub;' (the check compared against rt.scrub); the scrub program reads the freed word through asm --- src/compiler/builtins.zc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/builtins.zc b/src/compiler/builtins.zc index 53d8597..5acba50 100644 --- a/src/compiler/builtins.zc +++ b/src/compiler/builtins.zc @@ -7,7 +7,7 @@ int kw_memdebug() { stmtonly(); next(); if (is_id(s_on)) { mdbg = 1; f = 5; } - else if (is_id(s_scrub)) { mdbg = 1; f = 7; } + else if (tk == T_ID && rt.eq_w(tv, "scrub")) { mdbg = 1; f = 7; } // s_scrub is the runtime function rt.scrub, not this word else if (is_id(s_off)) { mdbg = 0; f = 0; } else die("memdebug on, memdebug scrub or memdebug off"); next(); -- cgit v1.2.3