[Nasm-bugs] [Bug 3392630] git nasm: infinite loop with input %define A \ %define B PREFIX%[A] \ %xdefine C B
noreply-nasm at dev.nasm.us
noreply-nasm at dev.nasm.us
Tue Oct 29 02:49:37 PDT 2019
https://bugzilla.nasm.us/show_bug.cgi?id=3392630
C. Masloch <pushbx at ulukai.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pushbx at ulukai.org
--- Comment #1 from C. Masloch <pushbx at ulukai.org> ---
I traced the infinite loop to
https://repo.or.cz/nasm.git/blob/e91f5cc1322eed4da0de81656276e021bf352c3d:/asm/preproc.c#l5382
and it seems like this is the necessary fix. It appears to work with this.
diff --git a/asm/preproc.c b/asm/preproc.c
index 41a7c6fb..3f4607f8 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -5379,8 +5379,10 @@ static SMacro *expand_one_smacro(Token ***tpp)
Token *endt = tline;
tline = t;
- while (!cond_comma && t && t != endt)
+ while (!cond_comma && t && t != endt) {
cond_comma = t->type != TOK_WHITESPACE;
+ t = t->next;
+ }
}
if (tnext) {
--
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