Closed llvmbot closed 4 years ago
Hi Frank,
This appears to have been fixed on LLVM trunk. I'm not sure exactly which patch fixed it, but there have been a number of tweaks to this part of the codebase recently as part of the effort to move the Swift interpreter over to OrcV2.
Unfortunately these fixes came after we branched for LLVM 10, but this should be fixed in LLVM 11.
The test case should work on Darwin in LLVM 10 (and LLVM 9 too, I believe).
-- Lang.
assigned to @lhames
Extended Description
The example program crashes with SIGSEGV.
The symbol lookup of the generated function fails which leads to the function pointer being NULL. The indirect call through the function pointer results in the segfault.
My build configuration is nearly default: cmake -DCMAKE_BUILD_TYPE=Release/Debug -DLLVM_BUILD_LLVM_DYLIB=ON ..