From 0a87c4663fc52bf60f3d440200b3b3ad6b39bd3e Mon Sep 17 00:00:00 2001 From: zinc Date: Thu, 15 Oct 2026 09:48:10 +0330 Subject: analyzer: use-after-end messages name the borrower, the owner and how the owner ended (freed, moved, .d parameter, push, global, reassignment), with fixtures --- src/compiler/builtins.zc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/builtins.zc') diff --git a/src/compiler/builtins.zc b/src/compiler/builtins.zc index be8c3b4..d28d2fd 100644 --- a/src/compiler/builtins.zc +++ b/src/compiler/builtins.zc @@ -736,7 +736,7 @@ int array_push(word t) { effect_note_mask(effect_value, EF_WRITE); af_mutate(xaf, tpack()); nogrow(t); if (t[0] == TY_DYN && isagg(t[4])) serr("push takes scalar or reference elements; use resize for aggregates"); c = expr(); rval(); if (t[0] == TY_DYN) fcoerce(t[4]); - if (isptr(xty) || xty == tword) effect_note_mask(effect_mask(c), EF_RETAIN); argcheck(c, 2); + if (isptr(xty) || xty == tword) effect_note_mask(effect_mask(c), EF_RETAIN); arg_site = 1; argcheck(c, 2); arg_site = 0; if (t[0] == TY_DYN && !compat(t[4], xty)) tcerr("push", t[4], xty); if (o3on && t[0] == TY_DYN && hasptr(t[4])) { lit(t[4]); callname(s_fatten); } expect(s_rp); -- cgit v1.2.3