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
..
assemble.c Fix wrong size calculation for "Dx ?" larger than DB 2021-11-20 23:53:40 +03:00
assemble.h Add a generic pragma-handling infrastructure 2017-03-07 21:32:37 -08:00
directiv.c BR 3392648: rename float.[ch] to floats.[ch] 2020-06-14 23:24:43 -07:00
directiv.dat Drop unnecessary EXTERN symbols 2019-09-12 20:21:03 -04:00
error.c asm/error.c: handle warning "all" correctly 2020-06-04 15:59:47 -07:00
eval.c eval, float: fix the __float80e__ and __float128h__ conversions 2020-08-13 13:41:46 -07:00
eval.h Clean up the handling of various passes 2018-12-18 11:14:59 -08:00
exprdump.c exprlib: move dumping code to a separate C file 2017-02-28 18:13:43 -08:00
exprlib.c exprlib: move dumping code to a separate C file 2017-02-28 18:13:43 -08:00
floats.c fp: support bfloat16 constants 2020-07-16 23:11:03 -07:00
floats.h fp: support bfloat16 constants 2020-07-16 23:11:03 -07:00
labels.c Change LBL_NONE to LBL_none 2019-09-12 20:26:23 -04:00
listing.c Merge tag 'nasm-2.15.04' 2020-08-25 16:16:09 -07:00
listing.h Merge tag 'nasm-2.15.04' 2020-08-25 16:16:09 -07:00
nasm.c Merge tag 'nasm-2.15.05' 2020-08-31 12:23:36 -07:00
parser.c BR3392776: parser: parse_line -- fix unitialized memory access 2021-10-18 00:21:05 +03:00
parser.h Clean up the handling of various passes 2018-12-18 11:14:59 -08:00
pptok.dat Merge tag 'nasm-2.15.03' 2020-07-17 17:58:38 -07:00
pptok.pl phash: bloat the hashes somewhat, reducing the likelihood of false positives 2020-07-27 13:24:59 -07:00
pragma.c pragma: handle default name/fallback handler for NULL list; cleanups 2019-09-30 13:30:15 -07:00
preproc.c preproc: fix misparsing of << as right shift 2021-09-21 23:30:53 +03:00
preproc.h preproc: get rid of the prepreprocessor and the nop preprocessor 2020-07-09 23:34:52 -07:00
quote.c preproc: when parsing a # marker, use C-style string unquoting 2020-07-13 14:14:28 -07:00
quote.h preproc: when parsing a # marker, use C-style string unquoting 2020-07-13 14:14:28 -07:00
rdstrnum.c rdstrnum: Make sure we dont shift out of bound 2018-10-29 22:25:16 +03:00
segalloc.c segalloc: DO NOT reset segment numbers 2018-06-14 16:42:03 -07:00
srcfile.c Make debug info and error messages correctly reflect macros and reps 2020-07-05 02:16:13 -07:00
srcfile.h srcfile: add src_nowhere() 2020-08-25 15:46:44 -07:00
stdscan.c doc: clean up warnings formatting 2020-06-27 22:30:50 -07:00
stdscan.h Reorganize the source code into subdirectories 2016-05-25 12:06:29 -07:00
strfunc.c Reorganize the source code into subdirectories 2016-05-25 12:06:29 -07:00
tokens.dat Add {rex} prefix, simplify prefix handling, better error messages 2021-04-27 11:37:42 -07:00
tokhash.pl phash: simplify the code generators 2020-07-10 19:26:52 -07:00
warnings.pl warnings.pl: again, don't update the timestamp unless we need to 2020-09-11 17:43:38 -07:00