[PATCH] D99423: [DebugInfo] Fix incorrect updating of SDNode dependencies for variadic debug values

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 07:21:30 PDT 2021


Orlando added a comment.

In D99423#2679569 <https://reviews.llvm.org/D99423#2679569>, @StephenTozer wrote:

> Sanitizer builds were failing due to memory leaks; these were caused by the fact that SDDbgValues are allocated under a BumpPtrAllocator, which does not call destructors. SDDbgValues contained SmallVectors which did not use this allocator, so when the SDDbgValues were cleared they would not call the SmallVector destructor.
>
> This has been resolved by replacing each SmallVector with a std::shared_ptr that uses the BumpPtrAllocator, so there will be no memory allocated outside of this allocator and hence no leaks.

Nice! imo it would be nice to have a comment somewhere explaining this, otherwise LGTM but please wait for someone else to +1 it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99423



More information about the llvm-commits mailing list