[LLVMdev] sqlite3 crashing jit

Chris Lattner clattner at apple.com
Tue Aug 10 16:47:30 PDT 2010

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.


More information about the llvm-dev mailing list