[PATCH] D107078: [analyzer] Catch leaking stack addresses via stack variables

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 29 10:10:01 PDT 2021


steakhal requested review of this revision.
steakhal added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:397-399
+      Report->addNote("The temporary object gets destroyed at the end of the "
+                      "full expression",
+                      L);
----------------
steakhal wrote:
> I'm actually not sure about this. We the `genName()` returns the appropriate `SourceRange` for `CXXTempObject`s, which will be added to the bug report regardless. That might be enough. I'm going to check that.
> 
`getName()` operates on the `Referred` memregion, although I'm highlighting the `Referrer` memregion. So, the note is not redundant.


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

https://reviews.llvm.org/D107078



More information about the cfe-commits mailing list