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

2021-08-27 Thread Balázs Benics via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6ad47e1c4fbf: [analyzer] Catch leaking stack addresses via stack variables (authored by steakhal). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107078/new/

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

2021-08-26 Thread Artem Dergachev via Phabricator via cfe-commits
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->i

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

2021-08-26 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Oh wait, it's not yet accepted by @NoQ. Then, consider this as a polite ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107078/new/ https://reviews.llvm.org/D107078 ___ cfe-commits mailing list cfe-commits@lists.

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

2021-08-26 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked an inline comment as done. steakhal added a comment. I plan to commit to this tomorrow. @NoQ @martong CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107078/new/ https://reviews.llvm.org/D107078 ___ cfe-commits mailing list cfe-

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

2021-08-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked an inline comment as done. steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:325-326 + if (ReferrerMemSpace && ReferredMemSpace) { +if (ReferredFrame == PoppedFrame && +ReferrerFrame->

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

2021-08-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > In D107078#2933682 , @NoQ wrote: > >> In D107078#2927899 , @steakhal >> wrote: >> >>> I did not fix the extra blue 'bubble' note issue, and I think that is out >>> of the scope of this patc

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

2021-08-17 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. It looks good to me, my concerns are addressed. But please wait for @NoQ 's approval. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107078/new/ https://reviews.llvm.org/D107078 __

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

2021-08-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 365133. steakhal marked 2 inline comments as done. steakhal added a comment. Removed the extra note about the temporary expression. --- In D107078#2933682 , @NoQ wrote: > In D107078#2927899

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

2021-08-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D107078#2927899 , @steakhal wrote: > I did not fix the extra blue 'bubble' note issue, and I think that is out of > the scope of this patch. This is an on-by-default checker. We should not knowingly regress it, even if temporari

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

2021-08-05 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 364393. steakhal added a comment. - `The temporary` -> `Temporary ` - `full expression` -> `full-expression` I did not fix the extra blue 'bubble' note issue, and I think that is out of the scope of this patch. CHANGES SINCE LAST ACTION https://reviews.

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

2021-08-05 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked an inline comment as done. steakhal added a comment. In D107078#2917892 , @NoQ wrote: > Y'all writing really good patches lately. Awesome, thank you! Comment at: clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker

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

2021-07-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Y'all writing really good patches lately. The updates on the C++ tests look spot on to me. I'm not sure if these tests contain any actual UB but the checker was anyway designed to be a bit more aggressive than that and that's exactly the kind of stuff we wanted it to warn

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

2021-07-30 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked an inline comment as done. steakhal added inline comments. Comment at: clang/test/Analysis/copy-elision.cpp:9-10 +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -std=c++17 \ +// RUN:-analyzer-config elide-constructors=false -DNO_ELIDE_

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

2021-07-30 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 363101. steakhal added a comment. Removed the deceiving `-DNO_ELIDE_FLAG` define from the c++17 run line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107078/new/ https://reviews.llvm.org/D107078 Files: cl

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

2021-07-30 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/test/Analysis/copy-elision.cpp:9-10 +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -std=c++17 \ +// RUN:-analyzer-config elide-constructors=false -DNO_ELIDE_FLAG \ +// RUN:-analyzer-c

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

2021-07-29 Thread Balázs Benics via Phabricator via cfe-commits
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", +

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

2021-07-29 Thread Balázs Benics via Phabricator via cfe-commits
steakhal planned changes to this revision. steakhal marked an inline comment as done. steakhal added a comment. I'm going to check how the notes look like on real code. Comment at: clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:397-399 + Report->addNote("The

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

2021-07-29 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked an inline comment as done. steakhal added a comment. Thanks for the quick response. Comment at: clang/test/Analysis/copy-elision.cpp:9-10 +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -std=c++17 \ +// RUN:-analyzer-config elide-con

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

2021-07-29 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. This is awesome! Comment at: clang/test/Analysis/copy-elision.cpp:9-10 +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -std=c++17 \ +// RUN:-analyzer-config elide-constructors=false -DNO_ELIDE_FLAG \ +// RUN:

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

2021-07-29 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 362791. steakhal added a comment. Remove the CXXThisRegion edge case handling. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107078/new/ https://reviews.llvm.org/D107078 Files: clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp clang

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

2021-07-29 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: NoQ, vsavchenko, martong, Szelethus. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity. steakhal requested review of this revision. H