[LLVMdev] sqlite3 crashing jit

Török Edwin edwintorok at gmail.com
Wed Aug 11 01:35:12 PDT 2010


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



More information about the llvm-dev mailing list