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
+Lang, Veteran of the JIT Wars (/owner of LLVM JIT infrastructure) - might have some ideas here. On Mon, Feb 24, 2020 at 1:34 PM Frank Winter via llvm-dev < llvm-dev at lists.llvm.org> wrote:> 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 > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200224/3cd7d9ab/attachment.html>
Praveen Velliengiri via llvm-dev
2020-Feb-25 05:30 UTC
[llvm-dev] segfault with HowToUseJIT
Hi Frank, Actually, IR generated in the code is incomplete. IR module must contain two function definitions but when printing the IRModule you get only ;ModuleID = 'test' source_filename = "test" On Tue, 25 Feb 2020 at 03:35, David Blaikie via llvm-dev < llvm-dev at lists.llvm.org> wrote:> +Lang, Veteran of the JIT Wars (/owner of LLVM JIT infrastructure) - might > have some ideas here. > > On Mon, Feb 24, 2020 at 1:34 PM Frank Winter via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> 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 >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200225/21bfd01d/attachment.html>
Reasonably Related Threads
- [LLVMdev] API on JIT, code snippets
- [LLVMdev] Possible memory leakage in the LLVM JIT Engine
- [LLVMdev] Possible memory leakage in the LLVM JIT Engine
- [LLVMdev] API on JIT, code snippets
- [LLVMdev] HowToUseJIT.cpp - file: 'llvm/ADT/iterator': No such file or directory