[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold
From: |
nickc at redhat dot com |
Subject: |
[Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin |
Date: |
Tue, 06 Jul 2021 12:36:31 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28040
Nick Clifton <nickc at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Status|RESOLVED |REOPENED
CC| |nickc at redhat dot com
--- Comment #15 from Nick Clifton <nickc at redhat dot com> ---
(In reply to H.J. Lu from comment #14)
Hi H.J.
With the patch applied the new linker tests are failing if you run them with
address sanitization enabled:
Executing on host: sh -c {./ld-new -o tmpdir/main.x -z norelro
-L/work/sources/binutils/branches/2.37/ld/testsuite/ld-plugin -plugin
/home/nickc/work/builds/binutils/branches/2.37/sanitize-address/ld/.libs/libldtestplug2.so.0
-plugin-opt registerclaimfile -plugin-opt registerallsymbolsread -plugin-opt
registercleanup -plugin-opt dumpresolutions tmpdir/main.o
/work/sources/binutils/branches/2.37/ld/testsuite/ld-plugin/func.c
tmpdir/text.o --defsym __stack_chk_fail=0 --defsym printf=main --defsym
puts=main 2>&1} /dev/null ld.tmp (timeout = 300)
spawn [open ...]
=================================================================
==4069616==ERROR: AddressSanitizer: heap-use-after-free on address
0x6120000005a0 at pc 0x000000acfab5 bp 0x7ffd1f7e47b0 sp 0x7ffd1f7e47a0
READ of size 8 at 0x6120000005a0 thread T0
#0 0xacfab4 in bfd_plugin_close_file_descriptor
/work/sources/binutils/branches/2.37/bfd/plugin.c:288
#1 0x46ceb5 in release_plugin_file_descriptor
/work/sources/binutils/branches/2.37/ld/plugin.c:616
#2 0x46cf31 in release_input_file
/work/sources/binutils/branches/2.37/ld/plugin.c:627
#3 0x153a46ab3cdc in onall_symbols_read
/work/sources/binutils/branches/2.37/ld/testplug2.c:632
#4 0x4701b9 in plugin_call_all_symbols_read
/work/sources/binutils/branches/2.37/ld/plugin.c:1322
#5 0x445bda in lang_process
/work/sources/binutils/branches/2.37/ld/ldlang.c:7980
#6 0x450b1f in main /work/sources/binutils/branches/2.37/ld/ldmain.c:495
#7 0x153a49a94041 in __libc_start_main (/lib64/libc.so.6+0x27041)
#8 0x404bad in _start
(/home/nickc/work/builds/binutils/branches/2.37/sanitize-address/ld/ld-new+0x404bad)
0x6120000005a0 is located 224 bytes inside of 296-byte region
[0x6120000004c0,0x6120000005e8)
freed by thread T0 here:
#0 0x153a49cee2c7 in __interceptor_free (/lib64/libasan.so.6+0xb02c7)
#1 0x8af916 in _bfd_delete_bfd
/work/sources/binutils/branches/2.37/bfd/opncls.c:135
#2 0x8b103a in bfd_close_all_done
/work/sources/binutils/branches/2.37/bfd/opncls.c:852
#3 0x8b0f39 in bfd_close
/work/sources/binutils/branches/2.37/bfd/opncls.c:814
#4 0x4700de in plugin_maybe_claim
/work/sources/binutils/branches/2.37/ld/plugin.c:1301
#5 0x466a50 in ldfile_try_open_bfd
/work/sources/binutils/branches/2.37/ld/ldfile.c:320
#6 0x4670aa in ldfile_open_file
/work/sources/binutils/branches/2.37/ld/ldfile.c:403
#7 0x42e413 in load_symbols
/work/sources/binutils/branches/2.37/ld/ldlang.c:3024
#8 0x431267 in open_input_bfds
/work/sources/binutils/branches/2.37/ld/ldlang.c:3627
#9 0x445abb in lang_process
/work/sources/binutils/branches/2.37/ld/ldlang.c:7958
#10 0x450b1f in main /work/sources/binutils/branches/2.37/ld/ldmain.c:495
#11 0x153a49a94041 in __libc_start_main (/lib64/libc.so.6+0x27041)
previously allocated by thread T0 here:
#0 0x153a49cee627 in __interceptor_malloc (/lib64/libasan.so.6+0xb0627)
#1 0x89f874 in bfd_malloc
/work/sources/binutils/branches/2.37/bfd/libbfd.c:289
#2 0x89f98e in bfd_zmalloc
/work/sources/binutils/branches/2.37/bfd/libbfd.c:411
#3 0x8af397 in _bfd_new_bfd
/work/sources/binutils/branches/2.37/bfd/opncls.c:62
Please could you investigate ?
Cheers
Nick
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, (continued)
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, tbaeder at redhat dot com, 2021/07/02
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, hjl.tools at gmail dot com, 2021/07/02
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, hjl.tools at gmail dot com, 2021/07/02
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, hjl.tools at gmail dot com, 2021/07/04
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, hjl.tools at gmail dot com, 2021/07/04
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, tbaeder at redhat dot com, 2021/07/05
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, hjl.tools at gmail dot com, 2021/07/05
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, cvs-commit at gcc dot gnu.org, 2021/07/05
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, cvs-commit at gcc dot gnu.org, 2021/07/05
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, hjl.tools at gmail dot com, 2021/07/05
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin,
nickc at redhat dot com <=
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, hjl.tools at gmail dot com, 2021/07/06
- [Bug ld/28040] libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin, hjl.tools at gmail dot com, 2021/07/07