[Nasm-bugs] [Bug 3392701] New: Section with alignment specification

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Mon Jul 20 01:37:36 PDT 2020


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

            Bug ID: 3392701
           Summary: Section with alignment specification
           Product: NASM
           Version: 2.15 (development)
          Hardware: PC
                OS: Windows
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: glucksmann at avast.com
                CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
                    hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: Binary from nasm.us

Created attachment 411793
  --> https://bugzilla.nasm.us/attachment.cgi?id=411793&action=edit
PoC

I tried to build our code (currently compiled with 2.14.02) with the new
2.15.02 and immediately got a problem manifested with the attached snippet.
The command line is "nasm.exe -g -Ox -s -f win64 test.asm"

The second instance of "section .text align=64" seems to cause an invalid
alignment - "secondfnc" code starts with 61 bytes of "int3".
If I omit the "align=64" part, the code is compiled correctly.

I know that the second specification of section alignment is unnecessary, but
in the actual code this is emitted by a macro (which doesn't know if it's the
first or second instance).
Or - am I doing something I'm not supposed to, i.e. is my usage of the section
alignment incorrect?

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