0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00
Files
nasm/asm
Marco Bonelli d167b3d4f3 Fix wrong size calculation for "Dx ?" larger than DB
The size calculation done in len_extops() (called by insn_size()) for
EOT_DB_RESERVE (i.e. uninitialized storage "?" token) does not take
into account the element size (e->elem), thus calculating a wrong
size for any Dx larger than DB (DW, DQ, etc).

The bug is silent, but it makes NASM error out if a "Dx ?" (larger
than DB) is followed by any label because the label offset gets
mismatched in the final code generation stage:

    $ cat test.asm
    [section .bss]
    DW ?
    x:

    $ nasm test.asm
    test.asm:3: error: label `x' changed during code generation [-w+error=label-redef-late]

See also: https://stackoverflow.com/q/70012188/3889449

Signed-off-by: Marco Bonelli <marco@mebeim.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2021-11-20 23:53:40 +03:00
..
2019-09-12 20:21:03 -04:00
2018-12-18 11:14:59 -08:00
2020-07-16 23:11:03 -07:00
2020-07-16 23:11:03 -07:00
2019-09-12 20:26:23 -04:00
2020-08-25 16:16:09 -07:00
2020-08-25 16:16:09 -07:00
2020-08-31 12:23:36 -07:00
2020-07-17 17:58:38 -07:00
2020-08-25 15:46:44 -07:00
2020-06-27 22:30:50 -07:00
2020-07-10 19:26:52 -07:00