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)
Hello> (fyi lli was trying to invoke the dtor std::basic_string<char, > std::char_traits<char>, std::allocator<char> >::~basic_string() when > it choked)Interpreter tried to execute external function, but failed, since this function is not known to interpreter. In general, interpreter does not support calling external functions. --- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University