[LLVMdev] sqlite3 crashing jit

Bueno, Denis denbuen at sandia.gov
Tue Aug 10 12:42:05 PDT 2010


I'm trying to compile sqlite3 using llvm-gcc, then run it with lli.  I've attached a Makefile and a main.c that simply invokes sqlite3_initialize().  You'll need to download sqlite3 (it was too big to attach) and copy main.c and the Makefile into the directory where sqlite3.c is [Link: sqlite-amalgamation-3_7_0_1.zip <http://www.sqlite.org/sqlite-amalgamation-3_7_0_1.zip> ].  The Makefile compiles sqlite3 with flags disabling pthreads and libdl.

  1) make

This builds sqlite3 with llvm-gcc but does not emit llvm bitcode.  It should create executable `test.gcc' which should terminate normally.

  2) make LLVM=1

This builds with the exact same flags as above, but with -emit-llvm added.  It should create executable `test.llvm' which is a just a script that invokes `lli' on `test.llvm.bc'.  This crashes lli (for me).

In an effort to debug this, I've built llvm-2.6 with -disable-optimized and -ggdb against the llvm-gcc frontend because I thought that would give me a stacktrace when running lli under gdb, but no such luck.  I tried running `lli -jit-emit-debug' but lli says it doesn't support that flag.

Does anyone know why the jit crashes?  If not, what's the next step?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100810/71d51e3f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 660 bytes
Desc: Makefile
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100810/71d51e3f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: application/octet-stream
Size: 99 bytes
Desc: main.c
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100810/71d51e3f/attachment-0001.obj>

More information about the llvm-dev mailing list