[LLVMbugs] [Bug 17042] New: Sefault on (corrupted ?) input from the ocaml binding

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 30 12:38:59 PDT 2013


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

            Bug ID: 17042
           Summary: Sefault on (corrupted ?) input from the ocaml binding
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: unassignedbugs at nondot.org
          Reporter: jp.deplaix at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I'm using the Llvm_bitwriter functions to generate the LLVM bitcode and then to
compile it into native assembler using llc.

The thing is: llc segfault with the following backtrace:
0  libLLVM-3.2svn.so 0x00007fb7fbf9862f
1  libLLVM-3.2svn.so 0x00007fb7fbf98989
2  libpthread.so.0   0x00007fb7fafe6210
3  libLLVM-3.2svn.so 0x00007fb7fb79d976
llvm::BitcodeReader::ParseFunctionBody(llvm::Function*) + 10742
4  libLLVM-3.2svn.so 0x00007fb7fb7a28bc
llvm::BitcodeReader::Materialize(llvm::GlobalValue*, std::string*) + 316
5  libLLVM-3.2svn.so 0x00007fb7fb7a29bd
llvm::BitcodeReader::MaterializeModule(llvm::Module*, std::string*) + 77
6  libLLVM-3.2svn.so 0x00007fb7fba2c389
llvm::Module::MaterializeAllPermanently(std::string*) + 9
7  libLLVM-3.2svn.so 0x00007fb7fb7a232c
llvm::ParseBitcodeFile(llvm::MemoryBuffer*, llvm::LLVMContext&, std::string*) +
44
8  llc               0x0000000000412597 llvm::ParseIRFile(std::string const&,
llvm::SMDiagnostic&, llvm::LLVMContext&) + 727
9  llc               0x000000000040e948 main + 2904
10 libc.so.6         0x00007fb7fa231995 __libc_start_main + 245
11 llc               0x000000000040f3cf
Stack dump:
0.    Program arguments: llc - 
Segmentation fault

The original source is here:
https://github.com/jpdeplaix/cervoise/tree/051c39797972102d17a5f0deee4f89b3f60ed902

If someone wants to test it, this is the command line (after having compiled
the project): ./main.native examples/test.sfw

-- 
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/20130830/8c74e6c4/attachment.html>


More information about the llvm-bugs mailing list