[Nasm-bugs] [Bug 3392654] New: Certain testcase with -felf -g results in segmentation fault

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Mon Mar 23 04:00:11 PDT 2020


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

            Bug ID: 3392654
           Summary: Certain testcase with -felf -g results in segmentation
                    fault
           Product: NASM
           Version: 2.15 (development)
          Hardware: All
                OS: All
            Status: OPEN
          Severity: severe
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: pushbx at ulukai.org
                CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
                    hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: Built from git using configure

This is running with nasm-2.14.03rc2-448-gca2d991e from
https://github.com/ecm-pushbx/nasm/commit/ca2d991ec9240cb35bad9cd467aea1eab197784d

The following example results in a segmentation fault when assembling to ELF
format with debugging information (-felf -g). Assembling without debugging
information or to bin format instead does not exhibit this problem. If I drop
the second lpar usage, or the lleave, the error also does not occur any longer.

$ nasm --version
NASM version 2.15rc0 compiled on Nov 22 2019
$ cat test.asm
%include "lmacros2.mac"

        bits 32

        lframe near
        lpar dword,     EKey
        lpar dword,     length
        lenter
        lleave

$ hg -R ../lmacros/ id
aa2ecb95d799 tip
$ nasm -felf -g test.asm -o test.o -I ../lmacros/
Segmentation fault
$ nasm -felf test.asm -o test.o -I ../lmacros/
$ nasm -fbin -g test.asm -o test.o -I ../lmacros/
$ nasm -fbin test.asm -o test.o -I ../lmacros/
$ 

This example uses lmacros2.mac and lmacros1.mac from
https://hg.ulukai.org/ecm/lmacros/rev/aa2ecb95d799 and the expected output is:

$ nasm -fbin -g test.asm -o test.o -I ../lmacros/ -l /dev/stderr
     1                                  %include "lmacros2.mac"
     1                              <1> [list -]
    14                              <1> [list -]
     2                                  
     3                                          bits 32
     4                                  
     5                                          lframe near
     6                                          lpar dword,     EKey
     7                                          lpar dword,     length
     8 00000000 5589E5                          lenter
     9 00000003 5D                              lleave
    10                                  
$ 

That is, "push ebp" \ "mov ebp, esp" \ "pop ebp" in the default section.

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