[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 10:54:46 PDT 2022


--- Comment #6 from C. Masloch <pushbx at ulukai.org> ---
I used git bisect on the NASM repo, running the following scriptlet to build
and test NASM:

$ git clean -x -d -f; touch config/undef.h; ./autogen.sh; ./configure; make;
git checkout autoconf; /usr/bin/time --format="%M KiB" ./nasm

This test resulted in less than 7 MiB of memory use for good revisions, more
than 2.8 GiB for bad revisions. I started with
as the good revision and
as the bad revision. First bad revision is

de7acc3a46cb3da52464d246b814f8bf059a0360 is the first bad commit
commit de7acc3a46cb3da52464d246b814f8bf059a0360
Author: H. Peter Anvin (Intel) <hpa at zytor.com>
Date:   Mon Aug 19 17:52:55 2019 -0700

    preproc: defer %00, %? and %?? expansion for nested macros, cleanups

    BR 3392603: When doing nested macro definitions, we need %00, %? and
    %?? expansion to be deferred to actual expansion time, just as the
    other parameters.

    Do major cleanups to the mmacro expansion code.

    Reported-by: Alexandre Audibert <alexandre.audibert at outlook.fr>
    Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>

 asm/preproc.c | 713 ++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 400 insertions(+), 313 deletions(-)

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

More information about the Nasm-bugs mailing list