aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ir_stack.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-04-11 22:49:19 +0200
committerlemon <lsof@mailbox.org>2026-04-11 22:49:19 +0200
commitd40371b615b560d8726fd4fdaf7d35abc959e0e9 (patch)
tree6e302f213c3e44fecccc032e79ea9f2d13c5c177 /src/ir_stack.c
parent757b5735f44e9a9454f12612ec00c38d81f5f32c (diff)
backend: fix memory leak from not calling deluses() after replcuses in some places
Diffstat (limited to 'src/ir_stack.c')
-rw-r--r--src/ir_stack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ir_stack.c b/src/ir_stack.c
index a9acc61..e77e114 100644
--- a/src/ir_stack.c
+++ b/src/ir_stack.c
@@ -20,6 +20,7 @@ lowerstack(Function *fn)
if (fn->stksiz > (1<<20)-1) error(NULL, "'%s' stack frame too big", fn->name);
*ins = mkinstr0(Onop,0);
replcuses(mkref(RTMP, t), mkref(RSTACK, fn->stksiz-siz));
+ deluses(t);
}
}
} while ((blk = blk->lnext) != fn->entry);