[Nasm-bugs] [Bug 3392506] New: obj output format segfaults in 2.14.xx branch

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Thu Aug 16 10:08:33 PDT 2018


            Bug ID: 3392506
           Summary: obj output format segfaults in 2.14.xx branch
           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: Built from git using configure

The nasm-2.14.xx branch segfaults if obj output format is selected.
Reproducing is very easy:

$ cat 1.asm

$ gdb --args ./nasm -fobj 1.asm
Program received signal SIGSEGV, Segmentation fault.
0x00589a1b in __strcmp_ssse3 () from /lib/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.212.el6.i686
(gdb) bt
#0  0x00589a1b in __strcmp_ssse3 () from /lib/libc.so.6
#1  0x0807f281 in obj_segment (name=0x8198dc9 "TEXT", pass=2, bits=0xbffff020)
at ../output/outobj.c:1398
#2  0x0804f6ae in process_directives (directive=0x8198dc1 "segment") at
#3  0x0804bb7c in assemble_file (fname=0x81940a8 "1.asm", depend_ptr=0x0) at
#4  0x0804a38a in main (argc=3, argv=0xbffff3b4) at ../asm/nasm.c:567
(gdb) c

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) q

It appears that seg->name is NULL in output/outobj.c (line 1398).
The segfault doesn't happen with other format options.
The segfault is in 2.14 branch, doesn't happen with 2.13 or older.

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