[Nasm-bugs] [Bug 3392505] New: either a segfault or 'interminable macro recursion' with -fobj

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Wed Aug 8 23:56:50 PDT 2018


            Bug ID: 3392505
           Summary: either a segfault or 'interminable macro recursion'
                    with -fobj
           Product: NASM
           Version: 2.14 (development)
          Hardware: All
                OS: All
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: sezeroz at gmail.com
                CC: gorcunov at gmail.com, hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: Build from git using other Makefile

The following reproducer either errors out, or segfaults with -fobj:

$ cat 1.asm
%define TEXT  _TEXT     align=1 public use32 class=CODE FLAT
%define DATA  _DATA     align=4 public use32 class=DATA FLAT
%define CONST CONST2    align=4 public use32 class=DATA FLAT

segment TEXT
segment DATA
segment CONST

With nasm-2.09.10, 2.13.02, 2.13.03 and 2.13.xx, there are no

With nasm-2.10.09, 2.11.08, nasm-2.12[.xx], 2.13 and 2.13.01,
it errors out:

$ ./nasm -fobj 1.asm
1.asm:6: error: interminable macro recursion
1.asm:7: error: interminable macro recursion

This may (or may not) be the same bf.net bug #503 resurfacing:
I am constantly using 2.12.xx, so I'd really like to see a fix
for this.  (Going from 2.13.01 to 2.13.02 seems to have either
fixed or hid this:  it it was really fixed in 2.13.02, can you
please point me to the relevant commit?)

With 2.14.rc5 tarball or 2.14.xx branch from git, segfault:

$ gdb --args ./nasm214 -fobj 1.asm
Program received signal SIGSEGV, Segmentation fault.
__strcmp_ssse3 () at ../sysdeps/i386/i686/multiarch/strcmp-ssse3.S:77
77              cmpb    %cl, (%edx)
(gdb) bt
#0  __strcmp_ssse3 () at ../sysdeps/i386/i686/multiarch/strcmp-ssse3.S:77
#1  0x0807f275 in obj_segment (name=0x819aaf1 "_DATA", pass=1, bits=0xbffff040)
at output/outobj.c:1398
#2  0x0804f6ae in process_directives (directive=0x819aae9 "segment") at
#3  0x0804bb7c in assemble_file (fname=0x81940a8 "1.asm", depend_ptr=0x0) at
#4  0x0804a38a in main (argc=3, argv=0xbffff3d4) at asm/nasm.c:566

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