[llvm-dev] segfault with HowToUseJIT

Frank Winter via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 24 13:34:06 PST 2020


Hi!

I've started looking porting our application which uses LLVM JIT to 
using LLVM 9 (9.0.1).

To begin, I tried running the HowToUseJIT.cpp (example directory) 
program and it fails with a segfault:


./HowToUseJIT
We just constructed this LLVM module:

; ModuleID = 'test'
source_filename = "test"

Running foo: Segmentation fault (core dumped)



Running it through GDB:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000404912 in main () at HowToUseJIT.cc:131
131      GenericValue gv = EE->runFunction(FooF, noargs);
(gdb) bt
#0  0x0000000000404912 in main () at HowToUseJIT.cc:131


It seems it fails when the JIT-compiled function gets called.



I freshly downloaded LLVM 9.0.1 and build it with the backend "X86". The 
machine I am running this on is a 'Intel(R) Core(TM) i7-6820HQ CPU @ 
2.70GHz'


Any ideas?


Frank





More information about the llvm-dev mailing list