[PATCH] D125782: [llvm-debuginfo-analyzer] 07 - Compare elements
Kevin Athey via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 11:38:29 PDT 2022
kda added a comment.
> These are still broken claiming this target is the trouble:
>
> Failed Tests (1):
> LLVM-Unit :: DebugInfo/LogicalView/./DebugInfoLogicalViewTests/8/15
>
> Appears to be a leak:
Some of it can be cleaned up by deleting CompileUnit, but there is other issues: see comment in test source.
The memory ownership model is pretty unusual here. It seems that this would benefit from more use of unique_ptr to automate ownership (destruction).
Without a fix, this will probably need to be rolled back.
================
Comment at: llvm/unittests/DebugInfo/LogicalView/CompareElementsTest.cpp:211
+ Insert(true, CompileUnit, FunctionOne);
+ Insert(IsTarget, CompileUnit, FunctionTwo);
+ Insert(true, CompileUnit, GlobalVariable);
----------------
In the case of line 437 (below), FunctionTwo is unowned and is not deleted.
I don't know if it is even used when IsTarget is false, but it is allocated and is a leak.
I see this behavior repeated for IsReference.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125782/new/
https://reviews.llvm.org/D125782
More information about the llvm-commits
mailing list