LLVMOrcLLJITLookup crash (segfault)


I am trying to utilize the Orcv2 C API. Everything goes smooth, initialized and well-formed, till the point I try to lookup a symbol with LLVMOrcLLJITLookup: I receive a SIGSEGV.

Providing the backtrace:

As far as I can see, the problem with the segfault is the attempt to access the DiagHandler, though I explicitly set it.

I did not provide the code, as it sophisticated enough, but if there is any additional information I can provide that would be helpful, please, let me know.

Can provide the call to LLVMOrcLLJITLookup? e.g:

  LLVMOrcJITTargetAddress addr; 
  LLVMErrorRef error = LLVMOrcLLJITLookup(compile_orc, &addr, "main");
  if (error) {

Postgres embeds LLVM JIT, it’s worth a look (if you haven’t already). They cover a number of LLVM JITs including Orcv2.