inkwell
inkwell copied to clipboard
MCJIT MemoryManager access
llvm.stackmap
requires to provide custom memory MCJIT memory manager to allow interception of .llvm_stackmaps
section
Currently, it is not possible due to 3 problems
-
There are no bindings for the default memory manager for delegation to
-
Default memory manager implementation aka
SectionMemoryManager
has no C-exports -
There is no access to
fn LLVMCreateMCJITCompilerForModule( OutJIT: *mut LLVMExecutionEngineRef, M: LLVMModuleRef, Options: *mut LLVMMCJITCompilerOptions, SizeOfOptions: ::libc::size_t, OutError: *mut *mut ::libc::c_char, ) -> LLVMBool
Which allows providing more options than just opt level when creating an execution engine One of those options is
MCJMM
which is a wrapper for user-created custom memory-manager
I also need this feature, I'm using a global variable linking to the stackmap section in static compile mode, which however causing segmentation fault in jited code.