[Nasm-bugs] [Bug 3392353] New: 2.12.02rc3 segfaults

no-reply at bugzilla-nasm.gorcunov.org no-reply at bugzilla-nasm.gorcunov.org
Tue May 10 01:37:51 PDT 2016


http://bugzilla.nasm.us/show_bug.cgi?id=3392353

            Bug ID: 3392353
           Summary: 2.12.02rc3 segfaults
           Product: NASM
           Version: unspecified
          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

With something as simple as:
global foo
foo:
  ret

running nasm-2.12.02rc3 under valgrind emits this:

$ valgrind nasm -f elf -o 1.o 1.asm
[...]
==21244== Conditional jump or move depends on uninitialised value(s)
==21244==    at 0x804D548: nasm_free (nasmlib.c:130)
==21244==    by 0x807ABA9: free_mmacro (preproc.c:631)
==21244==    by 0x8080E30: pp_getline (preproc.c:4977)
==21244==    by 0x804A394: assemble_file (nasm.c:1251)
==21244==    by 0x804CB67: main (nasm.c:479)


With real-life asm files, a segfault occurs. From gdb:

Starting program: /home/me/bin/nasm -I./ -I../h2shared/ -f elf -d_NO_PREFIX -o
d_draw.o ../h2shared/d_draw.asm

Program received signal SIGSEGV, Segmentation fault.
__libc_free (mem=<value optimized out>) at malloc.c:3599
3599      if (chunk_is_mmapped(p))                       /* release mmapped
memory. */
(gdb) bt
#0  __libc_free (mem=<value optimized out>) at malloc.c:3599
#1  0x0807abaa in free_mmacro (m=0x900c950) at preproc.c:631
#2  0x08080e31 in pp_getline () at preproc.c:4977
#3  0x0804a395 in assemble_file (fname=0x81351c0 "../h2shared/d_draw.asm",
depend_ptr=0x0) at nasm.c:1251
#4  0x0804cb68 in main (argc=9, argv=0xbff3fa70) at nasm.c:479

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