[LLVMbugs] [Bug 17964] New: [regression] weak_odr global crashes linker on OS X

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Nov 16 17:28:37 PST 2013


            Bug ID: 17964
           Summary: [regression] weak_odr global crashes linker on OS X
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: MC
          Assignee: unassignedbugs at nondot.org
          Reporter: code at klickverbot.at
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

For this module

; ModuleID = 'booltest.ll'
@foo = weak_odr thread_local global i8 1
define i32 @main() {
    ret i32 0

running "llc -filetype=obj booltest.ll && clang booltest.o" yields:

0  0x10feeb098  __assert_rtn + 144
1  0x10ff78b48  ld::passes::tlvp::doPass(Options const&, ld::Internal&) + 1674
2  0x10feeb416  main + 520
3  0x10fedccd4  start + 52
A linker snapshot was created at:
ld: Assertion failed: (0 && "wrong content type for target in tlv defs"),
function doPass, file /SourceCache/ld64/ld64-136/src/ld/passes/tlvp.cpp, line
clang: error: linker command failed with exit code 1 (use -v to see invocation)

(LLVM r94929, ld64-136)

Because of this bug, LDC is still stuck with LLVM 3.2 on OS X (also see bug
15972). It also means that the following is likely not going to work with Clang
template <int N> struct Foo { __thread static int a; };
template <int N> __thread int Foo<N>::a = N;
int main() { return Foo<0>::a; }

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/20131117/e3899a43/attachment.html>

More information about the llvm-bugs mailing list