[llvm-dev] How to debug .ll file with segmentation fault?
Peng Yu via llvm-dev
llvm-dev at lists.llvm.org
Fri Jan 25 18:50:37 PST 2019
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.
$ TRACE_OUTFILE=/tmp/trace.txt lli /tmp/y/bash_trcr.bc --norc
__trace_init
LLVMSymbolizer: error reading file: No such file or directory
#0 0x00007f162b1ee0ea llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/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 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#4 0x00007f162a0923cc _IO_vfprintf
/build/glibc-OTsEL5/glibc-2.27/stdio-common/vfprintf.c:1283:0
#5 0x00007f162a09be54 _IO_fprintf
/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::ArrayRef<llvm::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::basic_string<char, std::char_traits<char>,
std::allocator<char> >,
std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > const&, char const*
const*) (/usr/lib/llvm-6.0/bin/../lib/libLLVM-6.0.so.1+0x19d67f7)
#12 0x0000563cd2ca472b (lli+0x2772b)
#13 0x00007f162a058b97 __libc_start_main
/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/bash_trcr.bc --norc
Segmentation fault
--
Regards,
Peng
More information about the llvm-dev
mailing list