[llvm-bugs] [Bug 32504] New: segfault linking FreeBSD/mips64 base system
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Apr 3 08:47:14 PDT 2017
http://bugs.llvm.org/show_bug.cgi?id=32504
Bug ID: 32504
Summary: segfault linking FreeBSD/mips64 base system
Product: lld
Version: unspecified
Hardware: PC
URL: https://people.freebsd.org/~emaste/lld/lld-mips.tar
OS: FreeBSD
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: emaste at freebsd.org
CC: llvm-bugs at lists.llvm.org
While testing D31528 (Multi-GOT) with the FreeBSD base system I encountered a
segfault (linking libc), and observed that it's reproducible without the patch
applied.
--- libc.so.7.full ---
building shared library libc.so.7
cc -isystem /usr/obj/mips.mips64/usr/home/emaste/src/freebsd/tmp/usr/include
-L/usr/obj/mips.mips64/usr/home/emaste/src/freebsd/tmp/usr/lib
-B/usr/obj/mips.mips64/usr/home/emaste/src/freebsd/tmp/usr/lib
--sysroot=/usr/obj/mips.mips64/usr/home/emaste/src/freebsd/tmp
-B/usr/obj/mips.mips64/usr/home/emaste/src/freebsd/tmp/usr/bin -EB
-nodefaultlibs -Wl,--version-script=Version.map -shared -Wl,-x
-Wl,--fatal-warnings -Wl,--warn-shared-textrel -o libc.so.7.full
-Wl,-soname,libc.so.7 `NM='nm' NMFLAGS='' lorder machdep_ldisd.pico
bt_close.pico ... wcstok.pico wcswidth.pico wcsxfrm.pico wmemchr.pico
wmemcmp.pico wmemcpy.pico wmemmove.pico wmemset.pico | tsort -q`
-lcompiler_rt
cc: Internal error: Segmentation fault (program ld)
Please submit a full bug report.
See <URL:http://www.freebsd.org/support.html> for instructions.
Reproducer is located at https://people.freebsd.org/~emaste/lld/lld-mips.tar.
Backtrace after reproducing on unpatched lld:
nuc% ~/src/llvm/build-debug/bin/ld.lld $(cat response.txt)
zsh: segmentation fault (core dumped) ~/src/llvm/build-debug/bin/ld.lld $(cat
response.txt )
nuc% lldb ~/src/llvm/build-debug/bin/ld.lld -c lld.core
(lldb) target create "/home/emaste/src/llvm/build-debug/bin/ld.lld" --core
"lld.core"
Core file '/home/emaste/bugs/lld/lld-mips/lld.core' (x86_64) was loaded.
(lldb) bt
* thread #1, name = 'lld', stop reason = signal SIGSEGV
* frame #0: ld.lld`lld::elf::DynamicReloc::getOffset(this=0x000000ef2c526020)
const at SyntheticSections.cpp:1182
frame #1:
ld.lld`_ZN3lld3elf17RelocationSectionIN4llvm6object7ELFTypeILNS2_7support10endiannessE0ELb1EEEE7writeToEPh(this=0x000000ef2abc5000,
Buf="") at SyntheticSections.cpp:1230
frame #2:
ld.lld`_ZN3lld3elf12InputSection7writeToIN4llvm6object7ELFTypeILNS3_7support10endiannessE0ELb1EEEEEvPh(this=0x000000ef2abc5008,
Buf="") at InputSection.cpp:649
frame #3:
ld.lld`_ZZN3lld3elf13OutputSection7writeToIN4llvm6object7ELFTypeILNS3_7support10endiannessE0ELb1EEEEEvPhENKUlPNS0_12InputSectionEE_clESB_(this=0x00000000099aab40,
IS=0x000000ef2abc5008) at OutputSections.cpp:242
frame #4:
ld.lld`_ZZN3lld17parallel_for_eachINSt3__111__wrap_iterIPPNS_3elf12InputSectionEEEZNS3_13OutputSection7writeToIN4llvm6object7ELFTypeILNSA_7support10endiannessE0ELb1EEEEEvPhEUlS5_E_EEvT_SI_T0_ENKUlvE_clEv
[inlined]
_ZNSt3__18for_eachINS_11__wrap_iterIPPN3lld3elf12InputSectionEEEZNS3_13OutputSection7writeToIN4llvm6object7ELFTypeILNSA_7support10endiannessE0ELb1EEEEEvPhEUlS5_E_EET0_T_SJ_SI_(__first=__wrap_iter<lld::elf::InputSection
**> @ 0x00000000099aab50, __last=__wrap_iter<lld::elf::InputSection **> @
0x00000000099aab48, __f=(Buf = "")) at algorithm:879
frame #5:
ld.lld`_ZZN3lld17parallel_for_eachINSt3__111__wrap_iterIPPNS_3elf12InputSectionEEEZNS3_13OutputSection7writeToIN4llvm6object7ELFTypeILNSA_7support10endiannessE0ELb1EEEEEvPhEUlS5_E_EEvT_SI_T0_ENKUlvE_clEv(this=0x000000ef2b018018)
at Parallel.h:307
frame #6:
ld.lld`_ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN3lld17parallel_for_eachINS_11__wrap_iterIPPNS3_3elf12InputSectionEEEZNS6_13OutputSection7writeToIN4llvm6object7ELFTypeILNSD_7support10endiannessE0ELb1EEEEEvPhEUlS8_E_EEvT_SL_T0_EUlvE_EEEvDpOT_
[inlined]
_ZNSt3__18__invokeIRZN3lld17parallel_for_eachINS_11__wrap_iterIPPNS1_3elf12InputSectionEEEZNS4_13OutputSection7writeToIN4llvm6object7ELFTypeILNSB_7support10endiannessE0ELb1EEEEEvPhEUlS6_E_EEvT_SJ_T0_EUlvE_JEEEDTclclsr3std3__1E7forwardISJ_Efp_Espclsr3std3__1E7forwardIT0_Efp0_EEEOSJ_DpOSN_(__f=0x000000ef2b018018)
at type_traits:4301
frame #7:
ld.lld`_ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN3lld17parallel_for_eachINS_11__wrap_iterIPPNS3_3elf12InputSectionEEEZNS6_13OutputSection7writeToIN4llvm6object7ELFTypeILNSD_7support10endiannessE0ELb1EEEEEvPhEUlS8_E_EEvT_SL_T0_EUlvE_EEEvDpOT_(__args=0x000000ef2b018018)
at __functional_base:359
frame #8:
ld.lld`_ZNSt3__110__function6__funcIZN3lld17parallel_for_eachINS_11__wrap_iterIPPNS2_3elf12InputSectionEEEZNS5_13OutputSection7writeToIN4llvm6object7ELFTypeILNSC_7support10endiannessE0ELb1EEEEEvPhEUlS7_E_EEvT_SK_T0_EUlvE_NS_9allocatorISM_EEFvvEEclEv(this=0x000000ef2b018010)
at functional:1552
frame #9:
ld.lld`std::__1::function<void()(void)>::operator(this=0x000000ef2b018010)(void)
const at functional:1914
frame #10:
ld.lld`_ZZN3lld9TaskGroup5spawnENSt3__18functionIFvvEEEENKUlvE_clEv(this=0x000000ef2b018010)
at Parallel.h:189
frame #11:
ld.lld`_ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN3lld9TaskGroup5spawnENS_8functionIFvvEEEEUlvE_EEEvDpOT_
[inlined]
_ZNSt3__18__invokeIRZN3lld9TaskGroup5spawnENS_8functionIFvvEEEEUlvE_JEEEDTclclsr3std3__1E7forwardIT_Efp_Espclsr3std3__1E7forwardIT0_Efp0_EEEOS8_DpOS9_(__f=0x000000ef2b018010)
at type_traits:4301
frame #12:
ld.lld`_ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN3lld9TaskGroup5spawnENS_8functionIFvvEEEEUlvE_EEEvDpOT_(__args=0x000000ef2b018010)
at __functional_base:359
frame #13:
ld.lld`_ZNSt3__110__function6__funcIZN3lld9TaskGroup5spawnENS_8functionIFvvEEEEUlvE_NS_9allocatorIS7_EES5_EclEv(this=0x000000ef2b018000)
at functional:1552
frame #14:
ld.lld`std::__1::function<void()(void)>::operator(this=0x00000000099aad20)(void)
const at functional:1914
frame #15:
ld.lld`lld::internal::ThreadPoolExecutor::work(this=0x0000000005466af0) at
Parallel.h:160
frame #16:
ld.lld`_ZZN3lld8internal18ThreadPoolExecutorC1EjENKUlvE_clEv(this=0x000000ef29ebc2e8)
at Parallel.h:129
frame #17:
ld.lld`_ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN3lld8internal18ThreadPoolExecutorC1EjEUlvE_EEEEEPvSC_
[inlined]
_ZNSt3__18__invokeIZN3lld8internal18ThreadPoolExecutorC1EjEUlvE_JEEEDTclclsr3std3__1E7forwardIT_Efp_Espclsr3std3__1E7forwardIT0_Efp0_EEEOS5_DpOS6_(__f=0x000000ef29ebc2e8)
at type_traits:4301
frame #18:
ld.lld`_ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN3lld8internal18ThreadPoolExecutorC1EjEUlvE_EEEEEPvSC_
[inlined]
_ZNSt3__116__thread_executeINS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEZN3lld8internal18ThreadPoolExecutorC1EjEUlvE_JEJEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE(__t=0x000000ef29ebc2e0)
at thread:336
frame #19:
ld.lld`_ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN3lld8internal18ThreadPoolExecutorC1EjEUlvE_EEEEEPvSC_(__vp=0x000000ef29ebc2e0)
at thread:346
frame #20: libthr.so.3`thread_start(curthread=0x000000ef29efbe00) at
thr_create.c:289
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170403/7ec9520e/attachment.html>
More information about the llvm-bugs
mailing list