Bug 26501 - ASAN error: in tic54x_undefined_symbol gas/config/tc-tic54x.c:5032
Summary: ASAN error: in tic54x_undefined_symbol gas/config/tc-tic54x.c:5032
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.34
: P2 normal
Target Milestone: 2.36
Assignee: Alan Modra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-20 12:43 UTC by Martin Liska
Modified: 2020-08-25 13:46 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed: 2020-08-25 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liska 2020-08-20 12:43:13 UTC
The following fails when I build binutils with:
configure --build=x86_64-linux --disable-nls --disable-gdb --disable-gdbserver --disable-sim --disable-readline --disable-libdecnumber --enable-obsolete --target=tic54x-coff CFLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" CXXLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" LDFLAGS="-ldl"
Target: tic54x-coff
PASS: c54x math builtins
Executing on host: sh -c {../as-new     -o tmpdir/opcodes.o /home/mliska/Programming/binutils/gas/testsuite/gas/tic54x/opcodes.s 2>&1}  /dev/null dump.tmp (timeout = 300)
==59112==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000721688 at pc 0x0000004e35b8 bp 0x7fffffffba40 sp 0x7fffffffba38
    #0 0x4e35b7 in tic54x_undefined_symbol /home/mliska/Programming/binutils/gas/config/tc-tic54x.c:5032
    #1 0x4a47d4 in symbol_make /home/mliska/Programming/binutils/gas/symbols.c:679
    #2 0x4a47d4 in symbol_find_or_make /home/mliska/Programming/binutils/gas/symbols.c:665
    #3 0x43f351 in operand /home/mliska/Programming/binutils/gas/expr.c:1312
    #4 0x442531 in expr /home/mliska/Programming/binutils/gas/expr.c:1772
    #5 0x4dde14 in parse_expression /home/mliska/Programming/binutils/gas/config/tc-tic54x.c:307
    #6 0x4dde14 in get_operands /home/mliska/Programming/binutils/gas/config/tc-tic54x.c:3202
    #7 0x4e1be5 in tic54x_parse_insn /home/mliska/Programming/binutils/gas/config/tc-tic54x.c:4162
    #8 0x4e1be5 in md_assemble /home/mliska/Programming/binutils/gas/config/tc-tic54x.c:4899
    #9 0x486062 in read_a_source_file /home/mliska/Programming/binutils/gas/read.c:1182
    #10 0x41100d in perform_an_assembly_pass /home/mliska/Programming/binutils/gas/as.c:1253
    #11 0x41100d in main /home/mliska/Programming/binutils/gas/as.c:1417
    #12 0x7ffff6995cc9 in __libc_start_main (/lib64/libc.so.6+0x26cc9)
    #13 0x413179 in _start (/dev/shm/mer19n4a/gas/as-new+0x413179)
Comment 1 Alan Modra 2020-08-25 13:46:26 UTC
Fixed with git commit 69ff2100fdf663