[llvm-dev] How to debug .ll file with segmentation fault? (original) (raw)

Chandler Carruth via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 25 21:44:26 PST 2019


Hey Peng,

I'm really excited that you're working with LLVM, but I don't think this list is really the best place to get help with the basics of debugging. I'm afraid you'll need to debug this (and learn how to debug this) kind of failure yourself. There are lots of documents and even some good books about this you can find with a quick search.

If you get to the point where there is clearly a bug in LLVM upstream, you can file it on our bug tracker of course.

-Chandler

On Fri, Jan 25, 2019 at 6:50 PM Peng Yu via llvm-dev < llvm-dev at lists.llvm.org> wrote:

Hi,

I edited a working .ll file and llvm-as it to a .bc file. But it causes segmentation fault. I don't know how to debug such errors. Could anybody show me the best way to debug such errors? Thanks. $ TRACEOUTFILE=/tmp/trace.txt lli /tmp/y/bashtrcr.bc --norc _traceinit LLVMSymbolizer: error reading file: No such file or directory #0 0x00007f162b1ee0ea llvm::sys::PrintStackTrace(llvm::rawostream&) (/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x81e0ea) #1 0x00007f162b1ec366 llvm::sys::RunSignalHandlers() (/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x81c366) #2 0x00007f162b1ec49b (/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x81c49b) _#3 0x00007f162a7c3890 restorert (/lib/x8664-linux-gnu/libpthread.so.0+0x12890) #4 0x00007f162a0923cc IOvfprintf /build/glibc-OTsEL5/glibc-2.27/stdio-common/vfprintf.c:1283:0 #5 0x00007f162a09be54 IOfprintf /build/glibc-OTsEL5/glibc-2.27/stdio-common/fprintf.c:36:0 #6 0x00007f1628ff648e #7 0x00007f1628e37bc0 #8 0x00007f1628ff63a4 #9 0x00007f1628fc89e5 #10 0x00007f162c3cd79d llvm::MCJIT::runFunction(llvm::Function*, llvm::ArrayRefllvm::GenericValue) (/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x19fd79d) #11 0x00007f162c3a67f7 llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::_cxx11::basicstring<char, std::chartraits, std::allocator >, std::allocator<std::_cxx11::basicstring<char,_ _std::chartraits, std::allocator > > > const&, char const* const*) (/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x19d67f7) #12 0x0000563cd2ca472b (lli+0x2772b) _#13 0x00007f162a058b97 libcstartmain /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0 #14 0x0000563cd2cad34a (lli+0x3034a) Stack dump: 0. Program arguments: lli /tmp/y/bashtrcr.bc --norc Segmentation fault -- Regards, Peng


LLVM Developers mailing list llvm-dev at lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190125/8562f14a/attachment-0001.html>



More information about the llvm-dev mailing list