[Nasm-bugs] [Bug 3392774] Large define lists crash recent NASM

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Sat Aug 27 11:34:07 PDT 2022


https://bugzilla.nasm.us/show_bug.cgi?id=3392774

--- Comment #7 from C. Masloch <pushbx at ulukai.org> ---
Here's the fix. I don't understand the dup_tlist behaviour enough (yet) to
avoid using it, but adding free_tlist fixes the memory leak.

diff --git a/asm/preproc.c b/asm/preproc.c
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -5333,8 +5333,9 @@ static Token *expand_mmac_params(Token * tlin
e)
             tt = tokenize(tok_text(t));
             tt = expand_mmac_params(tt);
             tt = expand_smacro(tt);
-            /* Why dup_tlist() here? We should own tt... */
+            /* *tail = tt; */
             dup_tlist(tt, &tail);
+            free_tlist(tt);
             text = NULL;
             change = true;
             break;

-- 
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.


More information about the Nasm-bugs mailing list