Bug 26494 - ASAN error: in bfd_elf_s390_set_options bfd/elf64-s390.c:3802
Summary: ASAN error: in bfd_elf_s390_set_options bfd/elf64-s390.c:3802
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.34
: P2 normal
Target Milestone: ---
Assignee: Alan Modra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-20 12:40 UTC by Martin Liska
Modified: 2020-08-25 06:58 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:40:52 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=s390x-linux CFLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" CXXLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" LDFLAGS="-ldl"
Target: s390x-linux
PASS: ld-elf/pr21562n
Executing on host: sh -c {./ld-new -z norelro  -L/home/mliska/Programming/binutils/ld/testsuite/ld-elf  -T pr21884.t -o tmpdir/dump tmpdir/pr21884a.o tmpdir/pr21884b.o  2>&1}  /dev/null dump.tmp (timeout = 300)
==39456==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x607000000068 at pc 0x0000005a9246 bp 0x7fffffffbcd0 sp 0x7fffffffbcc8
    #0 0x5a9245 in bfd_elf_s390_set_options /home/mliska/Programming/binutils/bfd/elf64-s390.c:3802
    #1 0x4c3652 in s390_elf_create_output_section_statements /dev/shm/4n97slkz/ld/eelf64_s390.c:62
    #2 0x480f52 in lang_process /home/mliska/Programming/binutils/ld/ldlang.c:7895
    #3 0x4140da in main /home/mliska/Programming/binutils/ld/ldmain.c:494
    #4 0x7ffff6adacc9 in __libc_start_main (/lib64/libc.so.6+0x26cc9)
    #5 0x4166e9 in _start (/dev/shm/4n97slkz/ld/ld-new+0x4166e9)
Comment 1 Alan Modra 2020-08-25 06:58:37 UTC
This was fixed with git commit 0f55320bc468.