summaryrefslogtreecommitdiff
path: root/clang/test/Analysis/stackaddrleak.cpp
AgeCommit message (Collapse)Author
2025-02-11[analyzer] Reapply recent stack addr escape checker changes + buildbot fix ↵Michael Flanders
(#126620) Reapplying changes from https://github.com/llvm/llvm-project/pull/125638 after buildbot failures. Buildbot failures fixed in 029e7e98dc9956086adc6c1dfb0c655a273fbee6, latest commit on this PR. It was a problem with a declared class member with same name as its type. Sorry!
2025-02-10Revert "[analyzer] Remove some false negatives in StackAddrEscapeChec… ↵Gábor Horváth
(#126614) …ker (#125638)" This reverts commit 7ba3c55d91dcd7da5a5eb1c58225f648fb38b740. Co-authored-by: Gabor Horvath <gaborh@apple.com>
2025-02-10[analyzer] Remove some false negatives in StackAddrEscapeChecker (#125638)Michael Flanders
Fixes https://github.com/llvm/llvm-project/issues/123459. Previously, when the StackAddrEscapeChecker checked return values, it did not scan into the structure of the return SVal. Now it does, and we can catch some more false negatives that were already mocked out in the tests in addition to those mentioned in https://github.com/llvm/llvm-project/issues/123459. The warning message at the moment for these newly caught leaks is not great. I think they would be better if they had a better trace of why and how the region leaks. If y'all are happy with these changes, I would try to improve these warnings and work on normalizing this SVal checking on the `checkEndFunction` side of the checker also. Two of the stack address leak test cases now have two warnings, one warning from return expression checking and another from` checkEndFunction` `iterBindings` checking. For these two cases, I prefer the warnings from the return expression checking, but I couldn't figure out a way to drop the `checkEndFunction` without breaking other `checkEndFunction` warnings that we do want. Thoughts here?
2023-09-20[analyzer] Fix StackAddrEscapeChecker crash on temporary object fields (#66493)Balazs Benics
Basically, the issue was that we should have unwrapped the base region before we special handle temp object regions. Fixes https://github.com/llvm/llvm-project/issues/66221 I also decided to add some extra range information to the diagnostics to make it consistent with the other reporting path.