[Bug 237068] /usr/local/bin/ld: BFD (GNU Binutils) 2.30 assertion fail elflink.c:2824
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Apr 8 13:56:48 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237068
--- Comment #5 from Dimitry Andric <dim at FreeBSD.org> ---
(In reply to Ed Maste from comment #4)
> Is there an associated GNU binutils ld bug report?
Not yet, I'm working on a small test case. The issue appears to be caused by a
versioned weak symbol:
llvm::hashing::detail::get_execution_seed()::seed@@JL_LLVM_6.0
I added some debug printfs around the failing assertion, with binutils master,
and this shows:
DBG h : llvm::hashing::detail::get_execution_seed()::seed@@JL_LLVM_6.0
DBG def: __bss_start@@JL_LLVM_6.0
/home/dim/ins/binutils-master-e392bad3e/bin/ld: BFD (GNU Binutils)
2.32.51.20190407 assertion fail /share/dim/src/binutils-gdb/bfd/elflink.c:2974
DBG h : llvm::hashing::detail::get_execution_seed()::seed@@JL_LLVM_6.0
DBG def: __bss_start@@JL_LLVM_6.0
/home/dim/ins/binutils-master-e392bad3e/bin/ld: BFD (GNU Binutils)
2.32.51.20190407 assertion fail /share/dim/src/binutils-gdb/bfd/elflink.c:2974
The 'seed' variable is a static variable in an inline function in
include/llvm/ADT/Hashing.h:
/// \brief A global, fixed seed-override variable.
///
/// This variable can be set using the \see llvm::set_fixed_execution_seed
/// function. See that function for details. Do not, under any circumstances,
/// set or read this variable.
extern size_t fixed_seed_override;
inline size_t get_execution_seed() {
// FIXME: This needs to be a per-execution seed. This is just a placeholder
// implementation. Switching to a per-execution seed is likely to flush out
// instability bugs and so will happen as its own commit.
//
// However, if there is a fixed seed override set the first time this is
// called, return that instead of the per-execution seed.
const uint64_t seed_prime = 0xff51afd7ed558ccdULL;
static size_t seed = fixed_seed_override ? fixed_seed_override
: (size_t)seed_prime;
return seed;
}
In libLLVM-6.0.so's .symtab, it looks like:
$ readelf -sW
/wrkdirs/share/dim/ports/lang/julia/work/julia-1.0.3/deps/scratch/llvm-6.0.0/build_Release/lib/libLLVM-6.0.so
| grep _ZZN4llvm7hashing6detail18get_execution_seedEvE4seed
3490: 00000000027c5380 8 OBJECT WEAK DEFAULT 28
_ZZN4llvm7hashing6detail18get_execution_seedEvE4seed@@JL_LLVM_6.0
31450: 00000000027c5380 8 OBJECT WEAK DEFAULT 28
_ZZN4llvm7hashing6detail18get_execution_seedEvE4seed
For some reason, there is both a symbol with versionJL_LLVM_6.0, and one
without.
libLLVM-6.0.so gets built with the following very simple version script:
JL_LLVM_6.0 { global: *; };
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-toolchain
mailing list