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=hppa-hp-hpux10 CFLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" CXXLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" LDFLAGS="-ldl" Target: hppa-hp-hpux10 | exit( YY_EXIT_FAILURE ); Executing on host: sh -c {../as-new /home/mliska/Programming/binutils/gas/testsuite/gas/all/p2425.s 2>&1} /dev/null gas.out (timeout = 300) ==15525==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffffffbea0 at pc 0x00000058738b bp 0x7fffffffbb30 sp 0x7fffffffbb28 #0 0x58738a in som_compute_checksum /home/mliska/Programming/binutils/bfd/som.c:4293 #1 0x58738a in som_finish_writing /home/mliska/Programming/binutils/bfd/som.c:4228 #2 0x51cede in bfd_close /home/mliska/Programming/binutils/bfd/opncls.c:775 #3 0x46a6e1 in output_file_close /home/mliska/Programming/binutils/gas/output-file.c:64 #4 0x41a8cf in close_output_file /home/mliska/Programming/binutils/gas/as.c:1158 #5 0x6afad3 in xatexit_cleanup /home/mliska/Programming/binutils/libiberty/xatexit.c:98 #6 0x6afea4 in xexit /home/mliska/Programming/binutils/libiberty/xexit.c:50 #7 0x411b35 in main /home/mliska/Programming/binutils/gas/as.c:1499 #8 0x7ffff6adacc9 in __libc_start_main (/lib64/libc.so.6+0x26cc9) #9 0x4136d9 in _start (/dev/shm/3krqkl3k/gas/as-new+0x4136d9)
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2186273ac4ba9fa4c56dc8c5d47ab3a7e358cec9 commit 2186273ac4ba9fa4c56dc8c5d47ab3a7e358cec9 Author: Alan Modra <amodra@gmail.com> Date: Tue Aug 25 15:46:02 2020 +0930 PR26452, ASAN: som_compute_checksum som.c:4293 PR 26452 * som.c (som_compute_checksum): XOR 32-bit words in header, not unsigned long sized words.
Fixed
*** Bug 26454 has been marked as a duplicate of this bug. ***
*** Bug 26451 has been marked as a duplicate of this bug. ***
*** Bug 26456 has been marked as a duplicate of this bug. ***