We are using code generation in our module and have encountered the following problem. There is missing error handling in MCJIT::finalizeLoadedModules in lib/ExecutionEngine/MCJIT/MCJIT.cpp. It calls resolveRelocations of dynamic linker which tries to find missing symbols, in case if symbol is missing in both loaded libraries and in executable, dynamic linker sets error, but MCJIT does not handles it in any way and puts nullptr. It leads to jump on zero address further in program execution.
The fix is quite tiny. I have just added error handling like in other functions of MCJIT. I have no commit access to repository by the way.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo