[PATCH] D107078: [analyzer] Catch leaking stack addresses via stack variables
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 26 13:43:24 PDT 2021
NoQ accepted this revision.
NoQ added a comment.
Thanks, all clear now!
================
Comment at: clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:325-326
+ if (ReferrerMemSpace && ReferredMemSpace) {
+ if (ReferredFrame == PoppedFrame &&
+ ReferrerFrame->isParentOf(PoppedFrame)) {
+ V.emplace_back(Referrer, Referred);
----------------
steakhal wrote:
> NoQ wrote:
> > You probably meant `||`?
> No, I think `&&` is justified here. We have to make sure that the popped frame is the one that was referred to by some other frame, below that frame.
>
> {F18569514}
Uh-oh, I misunderstood the whole thing. Looks correct indeed!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107078/new/
https://reviews.llvm.org/D107078
More information about the cfe-commits
mailing list