Bug 26465 - ASAN error: in bfd_elf_m68k_set_target_options bfd/elf32-m68k.c:4519
Summary: ASAN error: in bfd_elf_m68k_set_target_options bfd/elf32-m68k.c:4519
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:30 UTC by Martin Liska
Modified: 2020-08-25 08:52 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:30:36 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=m68k-elf CFLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" CXXLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" LDFLAGS="-ldl"
Target: m68k-elf
FAIL: ld-elf/pr20528b
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)
==27509==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x607000000068 at pc 0x000000590d7c bp 0x7fffffffbd50 sp 0x7fffffffbd48
    #0 0x590d7b in bfd_elf_m68k_set_target_options /home/mliska/Programming/binutils/bfd/elf32-m68k.c:4519
    #1 0x480a82 in lang_process /home/mliska/Programming/binutils/ld/ldlang.c:7895
    #2 0x413cca in main /home/mliska/Programming/binutils/ld/ldmain.c:494
    #3 0x7ffff6adacc9 in __libc_start_main (/lib64/libc.so.6+0x26cc9)
    #4 0x416219 in _start (/dev/shm/wh0t2zxn/ld/ld-new+0x416219)
Comment 1 Alan Modra 2020-08-25 08:52:08 UTC
This was fixed with git commit 0f55320bc468.