[LLVMdev] crash in JIT when running the inliner
Nuno Lopes
nunoplopes at sapo.pt
Wed Aug 6 16:37:45 PDT 2008
Hi,
Today I've been trying to debug a weird bug that makes JIT crash with
certain code and when using the inliner. This may sound weird, but if I
disable the inliner, it doesn't crash.
I include an example gdb dump below. Does something looks wrong? Do you
think it's a bug in JIT or it's just some other piece of code that is
writing on the JIT memory?.. I don't really know how to debug this..
Any help/tips/whatever would be greatly appreciated.
Thanks,
Nuno
---------------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7531910 (LWP 22213)]
0xb7798cec in memcpy () from /lib/libc.so.6
(gdb) bt
#0 0xb7798cec in memcpy () from /lib/libc.so.6
#1 0xb76d2942 in std::string::_S_copy_chars () from
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6
#2 0xb7302315 in std::string::_S_construct<char const*> (__beg=0x9fe020c
"!I4\thC6\tH#6\nçÃ6\npÆF·+", __end=0x13344334 <Address 0x13344334 out of
bounds>,
__a=@0xbf856e3f) at
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.tcc:152
#3 0xb7302361 in std::string::_S_construct_aux<char const*>
(__beg=0x9fe020c "!I4\thC6\tH#6\nçÃ6\npÆF·+", __end=0x13344334 <Address
0x13344334 out of bounds>,
__a=@0xbf856e3f) at
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h:1449
#4 0xb730238b in std::string::_S_construct<char const*> (__beg=0x9fe020c
"!I4\thC6\tH#6\nçÃ6\npÆF·+", __end=0x13344334 <Address 0x13344334 out of
bounds>,
__a=@0xbf856e3f) at
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h:1464
#5 0xb73023ad in basic_string<const char*> (this=0xbf856eb4,
__beg=0x9fe020c "!I4\thC6\tH#6\nçÃ6\npÆF·+", __end=0x13344334 <Address
0x13344334 out of bounds>,
__a=@0xbf856e3f) at
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.tcc:241
#6 0xb730198b in llvm::Value::getNameStr (this=0x9344910) at Value.cpp:162
#7 0xb6d8c641 in llvm::Value::getName (this=0x9344910) at
/cvs/llvm/include/llvm/Value.h:110
#8 0xb6f241c7 in (anonymous namespace)::JITResolver::JITCompilerFn
(Stub=0xb5667620) at JITEmitter.cpp:267
#9 0xb6de70e4 in X86CompilationCallback2 (StackPtr=0xbf856f60,
RetAddr=-1251576288) at X86JITInfo.cpp:350
#10 0xb6de6d31 in X86CompilationCallback_SSE () from phpllvm.so
#11 0xb5667624 in ?? ()
#12 0x0a295548 in ?? ()
#13 0x00000001 in ?? ()
#14 0x0a2920d0 in ?? ()
#15 0x00000000 in ?? ()
(gdb) up 8
#8 0xb6f241c7 in (anonymous namespace)::JITResolver::JITCompilerFn
(Stub=0xb5667620) at JITEmitter.cpp:267
267 << I->first << "\n";
(gdb) p *F
$1 = {<llvm::GlobalValue> = {<llvm::Constant> = {<llvm::User> =
{<llvm::Value> = {_vptr.Value = 0x9fd1708, SubclassID = 0, SubclassData = 0,
VTy = {Ty = 0x9fd1716},
UseList = 0x9364128, Name = 0x9fe0204}, OperandList = 0xa36c3d9,
NumOperands = 167583628}, <No data fields>}, Parent = 0x0, Linkage = 27,
Visibility = 0,
Alignment = 64063, Section = {static npos = 4294967295,
_M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
_M_p = 0xb746c670 "TÉ,·\"É,·\222''·\204ò'·Ìâ+·"}}},
<llvm::Annotable> = {AnnotationList = 0x2b},
<llvm::ilist_node<llvm::Function>> = {Prev = 0x930e810,
Next = 0x9fe0a80},
BasicBlocks = {<llvm::ilist_traits<llvm::BasicBlock>> =
{<llvm::SymbolTableListTraits<llvm::BasicBlock,llvm::Function>> =
{<llvm::ilist_default_traits<llvm::BasicBlock>> =
{<llvm::ilist_nextprev_traits<llvm::BasicBlock>> = {<No data fields>},
<llvm::ilist_sentinel_traits<llvm::BasicBlock>> = {<No data fields>}, <No
data fields>}, <No data fields>}, <No data fields>}, Head = 0xa36c018},
ArgumentList = {<llvm::ilist_traits<llvm::Argument>> =
{<llvm::SymbolTableListTraits<llvm::Argument,llvm::Function>> =
{<llvm::ilist_default_traits<llvm::Argument>> =
{<llvm::ilist_nextprev_traits<llvm::Argument>> = {<No data fields>},
<llvm::ilist_sentinel_traits<llvm::Argument>> = {<No data fields>}, <No data
fields>}, <No data fields>}, <No data fields>}, Head = 0x9344910}, SymTab =
0x3, ParamAttrs = {PAList = 0x9fd1f8c}}
More information about the llvm-dev
mailing list