[LLVMdev] lli segfaults when using JIT in LLVM 2.6 on OS X 10.6/x86

Christian Plessl christian.plessl at uni-paderborn.de
Fri Jan 8 00:56:55 PST 2010


Hi all

I'm currently porting some code to LLVM 2.6 and I stumbled over a weird problem with using JIT compilation in lli on Mac OS X 10.6.2. When running lli without any specific command line options it crashes with a segfault. When I specify "-force-interpreter" or "-march=x86-64", everything works as expected.

I can reproduce the problem as follows:

// hello.c
int main(int argc, char *argv[]){
	return 42;
}

llvm-gcc -emit-llvm -c hello.c -o hello.bc

lli hello.bc  
    => segfaults
lli -march=x86-64 hello.bc
    => works
lli -force-interpreter hello.bc
    => works

I'm running Mac OS X 10.6.2 on a MacBook Pro (Intel Core2 Duo). I have built LLVM from the released sources of version 2.6 using the CMake build system with the following configuration:

 cmake .. -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:PATH=$HOME/opt/llvm

Does anybody have an idea what causes this problem and how to solve it?

Best regards,
 Christian





More information about the llvm-dev mailing list