[PATCH] D137156: [llvm-debuginfo-analyzer] Fix memory leak reported by sanitizers.
Carlos Alberto Enciso via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 1 22:48:21 PDT 2022
CarlosAlbertoEnciso added a comment.
In D137156#3899661 <https://reviews.llvm.org/D137156#3899661>, @vitalybuka wrote:
> LGTM if this fixes the bug
Thanks very much for your review.
> Still the same questing as before: Can this code avoid using directly new/delete and rely on unique_ptrs?
As per my response to @dblaikie in https://reviews.llvm.org/D125783:
> In D125783#3893003 <https://reviews.llvm.org/D125783#3893003>, @dblaikie wrote:
>
>>> 2. code review feedback (such as memory allocation handling) being pushed back to some much later stage isn't usually the way we do things if it's reasonable observations about how things are done - postcommit (or, it sounds like precommit) feedback is to be addressed "There is a strong expectation that authors respond promptly to post-commit feedback and address it." (perhaps you could link to the other discussion on the raw `new` usage issue? Might help provide explanation for why it's not already addressed?)
>>
>> We are fully aware of the issues related with the current memoy allocation and changing it to use smart pointers is a priority.
>> Based on your suggestion, I can create a GitHub issue to include all the information and add that link to each of the entries in the reviews that refer to the memory handling.
We can't change the `new/delete` to use `unique_ptrs` in just a single place.
The change must be done across the tool, as the `logical elements` (scopes, types, symbols, lines) are used in different modules:
- creation (debug info parsing)
- completion (add extra information)
- comparison/selection
- logical view generation
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137156/new/
https://reviews.llvm.org/D137156
More information about the llvm-commits
mailing list