Bug 29152 - UBSAN error: /home/marxin/buildworker/zen2-cross-binutils-sanitizers/build/gas/config/tc-s390.c:625:12:
Summary: UBSAN error: /home/marxin/buildworker/zen2-cross-binutils-sanitizers/build/ga...
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.37
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-16 07:46 UTC by Martin Liska
Modified: 2022-06-15 06:47 UTC (History)
2 users (show)

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 2022-05-16 07:46:16 UTC
The following fails when I build binutils with:

configure --build=x86_64-linux --disable-gdb --disable-gdbserver --enable-obsolete --target=s390-linux CFLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" CXXLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" LDFLAGS="-ldl"
Target: s390-linux
FAIL: s390x opcode
Executing on host: sh -c {../as-new  -march=z900 /home/marxin/buildworker/zen2-cross-binutils-sanitizers/build/gas/testsuite/gas/s390/zarch-z900-err.s 2>&1}  /dev/null dump.out (timeout = 300)
/home/marxin/buildworker/zen2-cross-binutils-sanitizers/build/gas/config/tc-s390.c:625:12: runtime error: left shift of negative value -2147483649

FAIL: s390x opcode
Executing on host: sh -c {../as-new  -march=z900 /home/marxin/buildworker/zen2-cross-binutils-sanitizers/build/gas/testsuite/gas/s390/zarch-z900-err.s 2>&1}  /dev/null dump.out (timeout = 300)
/home/marxin/buildworker/zen2-cross-binutils-sanitizers/build/gas/config/tc-s390.c:626:12: runtime error: left shift of negative value -2147483648
Comment 1 Ilya Leoshkevich 2022-05-16 10:47:21 UTC
I could reproduce this (with ASAN_OPTIONS=detect_leaks=0 make check-gas RUNTESTFLAGS=--debug) and will try to fix it.
Comment 3 Alan Modra 2022-06-15 06:47:46 UTC
Fixed