Calls LLJIT deinitailize on exit. This will correctly run dtors of emitted modules so that cleanup can be done properly.
Details
Diff Detail
Event Timeline
Some notes: this is probably not related to asan errors of clang-repl popping up recently. There is no dtors emitted in related test cases. There's a chance this can fix things, though. Nevertheless, This is the right thing to do.
Hi @sunho Did you test the changes after stage 2 asan build? The execute.cpp fails in my asan build area after adding this patch
Hi @Purva-Chaudhari I haven't set up asan build setting yet. It's sad to hear it's still mem leaking. We need to look into somewhere else then...
Adding this patch is causing the original execute.cpp to fail in my area (i.e without my additions which were previously causing memory leak). I would suggest to test patch in stage2 build and confirm the behavior once
Here is the log :
Fix in windows build requires improving on ORC side. (extending GenericLLVMIRPlatformSupport or write new platform support) I'll reopen this once I have done this groundwork. For asan failiures, I believe https://reviews.llvm.org/D127991 should be enough.