[PATCH] D125781: [llvm-debuginfo-analyzer] 06 - Warning and internal options
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 07:38:24 PDT 2022
probinson added inline comments.
================
Comment at: llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp:43
+ else
+ // We found a duplicated.
+ Duplicate.emplace_back(Element, Scope, Iter->second);
----------------
probinson wrote:
>
ping.
================
Comment at: llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp:103
+ }
+ exit(0);
+ }
----------------
CarlosAlbertoEnciso wrote:
> probinson wrote:
> > `exit` in a library function?
> This is a good point.
>
> During the development of the CodeView Reader, due to incorrect parsing of the debug information, in some cases the same logical element was added to more than one logical scope.
>
> If this method detects an error, it means the tool will crash as the memory is corrupted: the same logical element being destroyed more than once. That is the reason to force the `exit`.
Better to have this function return a bool status, and the caller can do the exit or whatever else is appropriate to its context.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125781/new/
https://reviews.llvm.org/D125781
More information about the llvm-commits
mailing list