On Tue, Aug 10, 2010 at 1:35 PM, Eric Christopher <echristo at apple.com> wrote:> > On Aug 10, 2010, at 1:30 PM, Bueno, Denis wrote: > >> Running lli under gdb gives >> >> Program received signal SIGSEGV, Segmentation fault. >> [address] in ?? () >> (gdb) bt >> #0 [address] in ?? () >> Cannot access memory at address [address2] >> >> > > Wow. Something has really trashed your stack.No, he's just on linux x86_64 using JITed frames with no unwind information. That was the whole point of adding the support here: http://llvm.org/docs/DebuggingJITedCode.html See if you can get a stack trace using the directions there. Reid
On Aug 10, 2010, at 4:09 PM, Reid Kleckner wrote:> On Tue, Aug 10, 2010 at 1:35 PM, Eric Christopher <echristo at apple.com> wrote: >> >> On Aug 10, 2010, at 1:30 PM, Bueno, Denis wrote: >> >>> Running lli under gdb gives >>> >>> Program received signal SIGSEGV, Segmentation fault. >>> [address] in ?? () >>> (gdb) bt >>> #0 [address] in ?? () >>> Cannot access memory at address [address2] >>> >>> >> >> Wow. Something has really trashed your stack. > > No, he's just on linux x86_64 using JITed frames with no unwind > information. That was the whole point of adding the support here: > http://llvm.org/docs/DebuggingJITedCode.html > > See if you can get a stack trace using the directions there.If you build the JIT as an x86-64 application, it can't run code compiled with -m32. For example, on my system: $ file `which lli` /Users/sabre/llvm/Debug/bin/lli: Mach-O 64-bit executable x86_64 Trying to run code built with -m32 will randomly crash in lots of different ways. The solution to this is to rebuild (lli in this case) as an x86-32 app. -Chris
On Tue, 10 Aug 2010 16:47:30 -0700 Chris Lattner <clattner at apple.com> wrote:> > On Aug 10, 2010, at 4:09 PM, Reid Kleckner wrote: > > > On Tue, Aug 10, 2010 at 1:35 PM, Eric Christopher > > <echristo at apple.com> wrote: > >> > >> On Aug 10, 2010, at 1:30 PM, Bueno, Denis wrote: > >> > >>> Running lli under gdb gives > >>> > >>> Program received signal SIGSEGV, Segmentation fault. > >>> [address] in ?? () > >>> (gdb) bt > >>> #0 [address] in ?? () > >>> Cannot access memory at address [address2] > >>> > >>> > >> > >> Wow. Something has really trashed your stack. > > > > No, he's just on linux x86_64 using JITed frames with no unwind > > information. That was the whole point of adding the support here: > > http://llvm.org/docs/DebuggingJITedCode.html > > > > See if you can get a stack trace using the directions there. > > If you build the JIT as an x86-64 application, it can't run code > compiled with -m32. For example, on my system: > > $ file `which lli` > /Users/sabre/llvm/Debug/bin/lli: Mach-O 64-bit executable x86_64 > > Trying to run code built with -m32 will randomly crash in lots of > different ways. The solution to this is to rebuild (lli in this > case) as an x86-32 app.I think lli should be enhanced to warn/fail when running something with a wildly different triple/data layout than what it was built for. At least it should check the arch. Best regards, --Edwin
On Aug 10, 2010, at 5:09 PM, Reid Kleckner wrote: No, he's just on linux x86_64 using JITed frames with no unwind information. That was the whole point of adding the support here: http://llvm.org/docs/DebuggingJITedCode.html See if you can get a stack trace using the directions there. I had followed the directions on that page with llvm 2.6 to no avail. The Makefile I posted does use -fexceptions. When I ran `lli -jit-emit-debug' with llvm 2.6, lli said that -jit-emit-debug was an unrecognised command line argument. -Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100811/4ae24f09/attachment.html>
On Wed, Aug 11, 2010 at 7:15 AM, Bueno, Denis <denbuen at sandia.gov> wrote:> > On Aug 10, 2010, at 5:09 PM, Reid Kleckner wrote: > > No, he's just on linux x86_64 using JITed frames with no unwind > information. That was the whole point of adding the support here: > http://llvm.org/docs/DebuggingJITedCode.html > > See if you can get a stack trace using the directions there. > > I had followed the directions on that page with llvm 2.6 to no avail. > The Makefile I posted does use -fexceptions. When I ran `lli > -jit-emit-debug' with llvm 2.6, lli said that -jit-emit-debug was an > unrecognised command line argument.It was added between 2.6 and 2.7. What Chris said may help more though. Reid