[LLVMdev] issues with lli
Alvin Cheung
akcheung at csail.mit.edu
Sun Apr 12 19:12:14 PDT 2009
Hello,
I was trying to use lli to run a very simple c++ program on linux that uses the
c++ library but the interpreter crashed. But the same works fine with JIT
enabled. I am wondering if anyone has encountered similar issues?
Thanks,
Alvin
-------------------------------------------------------------------------------
#include <string>
void
main()
{
std::string d("hello");
return 0;
}
-------------------------------------------------------------------------------
$ llvm-g++ -emit-llvm -c t.cc -o t.bc
$ lli -force-interpreter=true t.bc
lli[0x880879c]
lli[0x88088ce]
[0xb7f8a420]
lli(_ZN4llvm11Interpreter20callExternalFunctionEPNS_8FunctionERKSt6vectorINS_12G
enericValueESaIS4_EE+0x1f4)[0x84bb354]
lli(_ZN4llvm11Interpreter12callFunctionEPNS_8FunctionERKSt6vectorINS_12GenericVa
lueESaIS4_EE+0x16a)[0x84b3ed8]
lli(_ZN4llvm11Interpreter13visitCallSiteENS_8CallSiteE+0x58b)[0x84b46cb]
lli(_ZN4llvm11Interpreter13visitCallInstERNS_8CallInstE+0x2a)[0x84c1dcc]
lli(_ZN4llvm11InstVisitorINS_11InterpreterEvE9visitCallERNS_8CallInstE+0x18)[0x8
4c1de6]
lli(_ZN4llvm11InstVisitorINS_11InterpreterEvE5visitERNS_11InstructionE+0x422)[0x
84c23de]
lli(_ZN4llvm11Interpreter3runEv+0x97)[0x84b664f]
lli(_ZN4llvm11Interpreter11runFunctionEPNS_8FunctionERKSt6vectorINS_12GenericVal
ueESaIS4_EE+0x103)[0x84bb681]
lli(_ZN4llvm15ExecutionEngine17runFunctionAsMainEPNS_8FunctionERKSt6vectorISsSaI
SsEEPKPKc+0x45f)[0x84c8ebf]
lli(main+0x5f6)[0x837a4e8]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7d05450]
lli[0x8379841]
Segmentation fault
(fyi lli was trying to invoke the dtor std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string() when it choked)
More information about the llvm-dev
mailing list