[LLVMbugs] [Bug 6683] New: Crash in llvm_shutdown with simple bitcode file

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 23 09:26:46 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=6683

           Summary: Crash in llvm_shutdown with simple bitcode file
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Linker
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: ggreif at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=4574)
 --> (http://llvm.org/bugs/attachment.cgi?id=4574)
clang repro recipe

Compile the attached c++ file so:

Release/bin/clang repro.cpp -c -O0 -emit-llvm -o repro.bc

Then invoke the llvm linker:

Release/bin/llvm-ld -stats repro.bc -lc -disable-inlining -o /dev/null

Observe crash:

llvm-ld: Error opening output file '/dev/null.bc'
===-------------------------------------------------------------------------===
                          ... Statistics Collected ...
===-------------------------------------------------------------------------===

1 deadargelim      - Number of unread args removed
1 functionattrs    - Number of arguments marked nocapture
2 globaldce        - Number of functions removed
1 globalopt        - Number of functions converted to fastcc
1 globalsmodref-aa - Number of functions that only read memory
1 globalsmodref-aa - Number of functions without address taken
3 instcombine      - Number of dead inst eliminated
3 instcombine      - Number of insts combined
1 jump-threading   - Number of jumps threaded
2 jump-threading   - Number of terminators folded
1 mem2reg          - Number of PHI nodes inserted
2 mem2reg          - Number of alloca's promoted with a single store
2 memdep           - Number of uncached non-local responses
4 scalarrepl       - Number of allocas promoted
1 sccp             - Number of arguments constant propagated by IPSCCP
1 sccp             - Number of basic blocks unreachable
4 sccp             - Number of instructions removed

While deleting: i8* %
Use still stuck around after Def is destroyed:  store i8* getelementptr
inbounds (0  llvm-ld         0x0000000000801525
1  llvm-ld         0x0000000000801af9
2  libpthread.so.0 0x00000034abf0c790
3  llvm-ld         0x00000000006d5b41
4  llvm-ld         0x00000000006d4551
5  llvm-ld         0x00000000006d6b90 (anonymous
namespace)::AssemblyWriter::writeOperand(llvm::Value const*, bool) + 128
6  llvm-ld         0x00000000006d87b0 (anonymous
namespace)::AssemblyWriter::printInstruction(llvm::Instruction const&) + 6896
7  llvm-ld         0x00000000006dbfc1 llvm::Value::print(llvm::raw_ostream&,
llvm::AssemblyAnnotationWriter*) const + 369
8  llvm-ld         0x0000000000795cc0 llvm::Value::~Value() + 432
9  llvm-ld         0x000000000075e30a
llvm::GetElementPtrConstantExpr::~GetElementPtrConstantExpr() + 74
10 llvm-ld         0x000000000075f35b llvm::LLVMContextImpl::~LLVMContextImpl()
+ 219
11 llvm-ld         0x000000000075de15 llvm::LLVMContext::~LLVMContext() + 21
12 llvm-ld         0x000000000075e23e
llvm::object_deleter<llvm::LLVMContext>::call(void*) + 14
13 llvm-ld         0x00000000007e404e llvm::ManagedStaticBase::destroy() const
+ 46
14 llvm-ld         0x00000000007e40b5 llvm::llvm_shutdown() + 21
15 llvm-ld         0x00000000004babc4 tan + 16124
16 llvm-ld         0x00000000004bafa4 GenerateBitcode(llvm::Module*,
std::string const&) + 388
17 llvm-ld         0x00000000004bd32b main + 1227
18 libc.so.6       0x00000034ab21c40b __libc_start_main + 219
19 llvm-ld         0x00000000004b73ea fmod + 114
Stack dump:
0.      Program arguments: Release/bin/llvm-ld -stats repro.bc -lc
-disable-inlining -o /dev/null 
Segmentation fault


I'll seek a confirmation on another machine whether this is a reproducible
problem elsewhere.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list