[Nasm-bugs] [Bug 3392651] New: .debug$T COFF stream is incorrect

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Fri Mar 6 11:37:02 PST 2020


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

            Bug ID: 3392651
           Summary: .debug$T COFF stream is incorrect
           Product: NASM
           Version: 2.14.xx
          Hardware: All
                OS: All
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: alexandre.ganea at ubisoft.com
                CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
                    hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: Other (please explain)

The .debug$T stream in .OBJs generated by the 'The Netwide Assembler 2.14rc0'
is incorrect in several ways:
- The size of a LF_PROCEDURE is wrong, in the case below it is 16 when it
should be 14.
- The 'Arg list type' is set to 0 when in fact it should have an index to the
corresponding LF_ARGLIST record.
- The LF_ARGLIST comes *after* the LF_PROCEDURE when in fact is should come
*before*. While COFF linkers usually accept this, it is adding extra processing
at link-time because the stream has to be parsed several times.

Example from a third-party library:

The stream, as generated by NASM:

        0x1000 : Length = 16, Leaf = 0x1008 LF_PROCEDURE
                        Return type = T_VOID(0003), Call type = C Near
                        Func attr = none
                        # Parms = 0, Arg list type = 0x0000

        0x1001 : Length = 6, Leaf = 0x1201 LF_ARGLIST argument count = 0

While in fact it should be:

        0x1000 : Length = 6, Leaf = 0x1201 LF_ARGLIST argument count = 0

        0x1001 : Length = 14, Leaf = 0x1008 LF_PROCEDURE
                        Return type = T_VOID(0003), Call type = C Near
                        Func attr = none
                        # Parms = 0, Arg list type = 0x1000

Thanks!

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