[PATCH] D119064: [orc] Change LLJIT's dtor to a virtual dtor

Sameer Rahmani via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 5 15:07:53 PST 2022


lxsameer added a comment.

here is an example of the memory leak:

  =================================================================
  ==1915907==ERROR: LeakSanitizer: detected memory leaks
  
  Direct leak of 216 byte(s) in 1 object(s) allocated from:
      #0 0x7fb2d52da42d in operator new(unsigned long) /llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:95:3
      #1 0x7fb2d2c4cbd1 in llvm::orc::LLLazyJIT::LLLazyJIT(llvm::orc::LLLazyJITBuilderState&, llvm::Error&) (/build/src/libserene/libserene.so.0+0x1a00bd1)
  
  Indirect leak of 176 byte(s) in 1 object(s) allocated from:
      #0 0x7fb2d52da42d in operator new(unsigned long) /llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:95:3
      #1 0x7fb2d2c414b4 in llvm::orc::createLocalLazyCallThroughManager(llvm::Triple const&, llvm::orc::ExecutionSession&, unsigned long) (/build/src/libserene/libserene.so.0+0x19f54b4)
  
  Indirect leak of 152 byte(s) in 1 object(s) allocated from:
      #0 0x7fb2d52da42d in operator new(unsigned long) /llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:95:3
      #1 0x7fb2d2c32d93 in llvm::orc::LocalTrampolinePool<llvm::orc::OrcX86_64_SysV>::Create(llvm::unique_function<void (unsigned long, llvm::unique_function<void (unsigned long) const>) const>) IndirectionUtils.cpp
  
  SUMMARY: AddressSanitizer: 544 byte(s) leaked in 3 allocation(s).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119064/new/

https://reviews.llvm.org/D119064



More information about the llvm-commits mailing list