[Nasm-bugs] [Bug 3392472] spurious "word data exceeds bounds" if (16-bit) near jump displacement has bit 8000h set

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Thu Jun 6 06:21:22 PDT 2019


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

C. Masloch <pushbx at 38.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Obtained from|                            |From OS distribution
            Version|2.13.xx                     |2.14.xx
                 CC|                            |pushbx at 38.de

--- Comment #1 from C. Masloch <pushbx at 38.de> ---
This bug occurs several times when building my debugger with several build
options enabled. It seems that all the warnings are invalid (the right call
offset is produced and no overflow occurs). This happens when building
https://bitbucket.org/ecm/ldebug/commits/d1a8367ef87a183720069e76a31111c14bb28519
as follows:

$ use_build_revision_id=1 ./make -D_DEBUG4 -D_BOOTLDR
[...]
Creating debugx.com
debug.asm:1058: warning: word data exceeds bounds [-w+number-overflow]
debug.asm:1061: warning: word data exceeds bounds [-w+number-overflow]
deb.asm:403: warning: word data exceeds bounds [-w+number-overflow]
deb.asm:447: warning: word data exceeds bounds [-w+number-overflow]
debug.asm:1286: warning: word data exceeds bounds [-w+number-overflow]
debug.asm:1288: warning: word data exceeds bounds [-w+number-overflow]
debug.asm:1289: warning: word data exceeds bounds [-w+number-overflow]
debug.asm:1311: warning: word data exceeds bounds [-w+number-overflow]
debug.asm:1368: warning: word data exceeds bounds [-w+number-overflow]
debug.asm:1373: warning: word data exceeds bounds [-w+number-overflow]
debug.asm:1398: warning: word data exceeds bounds [-w+number-overflow]
lineio.asm:1352: warning: word data exceeds bounds [-w+number-overflow]
serialp.asm:437: warning: word data exceeds bounds [-w+number-overflow]
[...]


Here's a simple test case created from that:

$ nasm -v
NASM version 2.14
$ cat test.asm 
%imacro padto 1.nolist
        times (%1 - $ + $$) nop
%endmacro

        section code vstart=0

        padto 243h
        call hexword
        inc di
        mov ax, word [ebp + 30h]
        call hexword

        padto 828Ah
hexword:
$ nasm test.asm -o test.bin -l test.lst
test.asm:8: warning: word data exceeds bounds [-w+number-overflow]
test.asm:11: warning: word data exceeds bounds [-w+number-overflow]
$ cat test.lst
     1                                  %imacro padto 1.nolist
     2                                          times (%1 - $ + $$) nop
     3                                  %endmacro
     4                                  
     5                                          section code vstart=0
     6                                  
     7 00000000 90<rept>                        padto 243h
     8 00000243 E84480                          call hexword
     8          ******************       warning: word data exceeds bounds
[-w+number-overflow]
     9 00000246 47                              inc di
    10 00000247 678B4530                        mov ax, word [ebp + 30h]
    11 0000024B E83C80                          call hexword
    11          ******************       warning: word data exceeds bounds
[-w+number-overflow]
    12                                  
    13 0000024E 90<rept>                        padto 828Ah
    14                                  hexword:
$

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