Bug 26500 - ASAN error: in tic4x_inst_make gas/config/tc-tic4x.c:1254
Summary: ASAN error: in tic4x_inst_make gas/config/tc-tic4x.c:1254
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:42 UTC by Martin Liska
Modified: 2020-08-25 13:44 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:42:38 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=tic4x-coff CFLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" CXXLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" LDFLAGS="-ldl"
Target: tic4x-coff
| 	exit( YY_EXIT_FAILURE );
Executing on host: sh -c {/dev/shm/g9x7mf25/ld/../gas/as-new   -I/home/mliska/Programming/binutils/ld/testsuite/ld-checks   -o tmpdir/asm.o /home/mliska/Programming/binutils/ld/testsuite/ld-checks/asm.s 2>&1}  /dev/null ld.tmp (timeout = 300)
==45854==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000007030a1 at pc 0x0000004c704c bp 0x7fffffffbb40 sp 0x7fffffffbb38
    #0 0x4c704b in tic4x_inst_make /home/mliska/Programming/binutils/gas/config/tc-tic4x.c:1254
    #1 0x4d3f05 in md_begin /home/mliska/Programming/binutils/gas/config/tc-tic4x.c:1377
    #2 0x40ff86 in perform_an_assembly_pass /home/mliska/Programming/binutils/gas/as.c:1233
    #3 0x40ff86 in main /home/mliska/Programming/binutils/gas/as.c:1417
    #4 0x7ffff6adacc9 in __libc_start_main (/lib64/libc.so.6+0x26cc9)
    #5 0x412109 in _start (/dev/shm/g9x7mf25/gas/as-new+0x412109)
Comment 1 cvs-commit@gcc.gnu.org 2020-08-25 13:38:38 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1de153a16817c8b2807749911c39ed96a0698b88

commit 1de153a16817c8b2807749911c39ed96a0698b88
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Aug 25 16:56:07 2020 +0930

    PR26500, ASAN: tic4x_inst_make tc-tic4x.c:1247
    
            PR 26500
            * tc-tic4x.c (tic4x_inst_make): Don't die on terminating insn
            with name = "".
Comment 2 Alan Modra 2020-08-25 13:44:43 UTC
Fixed