[LLVMbugs] [Bug 18704] New: llc segfaults on custom bc

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Feb 2 21:10:28 PST 2014


            Bug ID: 18704
           Summary: llc segfaults on custom bc
           Product: new-bugs
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: cplusplus328 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11997
  --> http://llvm.org/bugs/attachment.cgi?id=11997&action=edit
the file that causes the crash

I am tinkering with making my own compiler for my own language. Attached is a
bc file my frontend generates. This may be invalid input, but llc does not give
any error print besides a backtrace and segfault, so I can't figure out where
my error is if there is one.
I tried running the attached bc through llc and it crashed. bugpoint also
segfaults on the file.

Printed backtrace:
0  libLLVM-3.3.so.1 0x00002b843f3de382 llvm::sys::PrintStackTrace(_IO_FILE*) +
1  libLLVM-3.3.so.1 0x00002b843f3de711
2  libpthread.so.0  0x00002b843fe2fcb0
3  libLLVM-3.3.so.1 0x00002b843eae2a98
llvm::BitcodeReader::ParseFunctionBody(llvm::Function*) + 1672
4  libLLVM-3.3.so.1 0x00002b843eae7465
llvm::BitcodeReader::Materialize(llvm::GlobalValue*, std::string*) + 309
5  libLLVM-3.3.so.1 0x00002b843eae170d
llvm::BitcodeReader::MaterializeModule(llvm::Module*, std::string*) + 77
6  libLLVM-3.3.so.1 0x00002b843ed459fb
llvm::Module::MaterializeAllPermanently(std::string*) + 27
7  libLLVM-3.3.so.1 0x00002b843eae23e9
llvm::ParseBitcodeFile(llvm::MemoryBuffer*, llvm::LLVMContext&, std::string*) +
8  libLLVM-3.3.so.1 0x00002b843ede4b2c llvm::ParseIR(llvm::MemoryBuffer*,
llvm::SMDiagnostic&, llvm::LLVMContext&) + 396
9  libLLVM-3.3.so.1 0x00002b843ede51c9 llvm::ParseIRFile(std::string const&,
llvm::SMDiagnostic&, llvm::LLVMContext&) + 761
10 llc              0x000000000040a044
11 llc              0x0000000000409a81 main + 385
12 libc.so.6        0x00002b844036976d __libc_start_main + 237
13 llc              0x0000000000409af1
Stack dump:
0.    Program arguments: llc example.bc -o - 
Segmentation fault (core dumped)

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/20140203/0ba901a6/attachment.html>

More information about the llvm-bugs mailing list