Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

LLJITWithObjectCache example program segfaults #43090

Closed Quuxplusone closed 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR44120
Status RESOLVED FIXED
Importance P normal
Reported by Frank Tetzel (Frank.Tetzel@tu-dresden.de)
Reported on 2019-11-22 08:46:30 -0800
Last modified on 2020-03-15 10:14:17 -0700
Version 9.0
Hardware PC Linux
CC 1101.debian@gmail.com, lhames@gmail.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
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 ..
Quuxplusone commented 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.