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

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Thu Aug 25 16:46:45 PDT 2022


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

--- Comment #3 from C. Masloch <pushbx at ulukai.org> ---
The inline text tokens don't appear to be the only pessimisation between older
and recent NASM. Observe:

ldebug/source$ nasm -v
NASM version 2.16rc0 compiled on Aug 23 2022
ldebug/source$ /usr/bin/time --format="%M KiB" nasm debug.asm -I../../lmacros/
-I../../symsnip/ -I../../scanptab/ -o tmp.bin -D_DEBUG -D_PM -D_SYMBOLIC
-D_DUALCODE=1 -D_SYMBOLASMDUALCODE
Command terminated by signal 9
3541284 KiB
ldebug/source$ ~/proj/nasmtest/nasm -v
NASM version 2.16rc0 compiled on Aug 25 2022
ldebug/source$ /usr/bin/time --format="%M KiB" ~/proj/nasmtest/nasm debug.asm
-I../../lmacros/ -I../../symsnip/ -I../../scanptab/ -o tmp.bin -D_DEBUG -D_PM
-D_SYMBOLIC -D_DUALCODE=1 -D_SYMBOLASMDUALCODE
asmtabs.asm:407: warning: Most assembler table prefix bytes: 1 (ofs 4h) mne
BOXCB variant (240h + 0*8 + 7),85,, [-w+user]
expr.asm:2843: warning: word data exceeds bounds [-w+number-overflow]
init.asm:1432: warning: patch_no386_table: 946 (Method 2) [-w+user]
init.asm:1432: warning: 1B=318 repo=46 run=426 byte=996 [-w+user]
init.asm:1437: warning: patch_386_table: 50 (Method 2) [-w+user]
init.asm:1437: warning: 1B=4 repo=11 run=13 byte=59 [-w+user]
2560268 KiB
ldebug/source$ oldnasm -v
NASM version 2.14.03rc2 compiled on Aug 31 2019
ldebug/source$ /usr/bin/time --format="%M KiB" oldnasm debug.asm
-I../../lmacros/ -I../../symsnip/ -I../../scanptab/ -o tmp.bin -D_DEBUG -D_PM
-D_SYMBOLIC -D_DUALCODE=1 -D_SYMBOLASMDUALCODE 2>&1 | grep -v "warning: word
data exceeds bounds"
asmtabs.asm:407: warning: Most assembler table prefix bytes: 1 (ofs 4h) mne
BOXCB variant (240h + 0*8 + 7),85,, [-w+user]
init.asm:1432: warning: (writepatchtable:73) patch_no386_table: 946 (Method 2)
[-w+user]
init.asm:1432: warning: (writepatchtable:74) 1B=318 repo=46 run=426 byte=996
[-w+user]
init.asm:1437: warning: (writepatchtable:73) patch_386_table: 50 (Method 2)
[-w+user]
init.asm:1437: warning: (writepatchtable:74) 1B=4 repo=11 run=13 byte=59
[-w+user]
714240 KiB
ldebug/source$


Unpatched (nasm) gets OOM killed at 3.5 GiB. Patched runs to completion with
2.5 GiB. Older one needs less than 800 MiB. The resulting binary is identical.

-- 
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