Bug 26460 - UBSAN error: gas/config/tc-ia64.c:6107:23:
Summary: UBSAN error: gas/config/tc-ia64.c:6107:23:
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:28 UTC by Martin Liska
Modified: 2020-08-28 14:06 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


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:28:54 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=ia64-elf CFLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" CXXLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" LDFLAGS="-ldl"
Target: ia64-elf
PASS: --sort-common (ascending)
Executing on host: sh -c {/dev/shm/lg8r_lvd/ld/../gas/as-new   -I/home/mliska/Programming/binutils/ld/testsuite/ld-ia64   -o tmpdir/tlspic1.o -mtune=itanium1 /home/mliska/Programming/binutils/ld/testsuite/ld-ia64/tlspic1.s 2>&1}  /dev/null ld.tmp (timeout = 300)
/home/mliska/Programming/binutils/gas/config/tc-ia64.c:6107:23: runtime error: index 5 out of bounds for type 'ia64_opnd [5]'
Comment 1 cvs-commit@gcc.gnu.org 2020-08-28 13:46:21 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

commit ed2ed4dcf4ae20b9a7c38ffdf379fef383c6b8f9
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Aug 28 23:09:29 2020 +0930

    PR26460 UBSAN: tc-ia64.c:6107 index out of bounds
    
            PR 26460
            * config/tc-ia64.c (parse_operands): Don't access past end of
            idesc->operands.
Comment 2 Alan Modra 2020-08-28 14:06:42 UTC
Fixed.