[all-commits] [llvm/llvm-project] 9f6b7b: [analyzer] StackAddrEscapeChecker: also check retu...
Michael Flanders via All-commits
all-commits at lists.llvm.org
Sun Feb 16 07:59:04 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9f6b7b4e5f792bc5167a3bcfab400160cc1803ed
https://github.com/llvm/llvm-project/commit/9f6b7b4e5f792bc5167a3bcfab400160cc1803ed
Author: Michael Flanders <flanders.michaelk at gmail.com>
Date: 2025-02-16 (Sun, 16 Feb 2025)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
M clang/test/Analysis/stack-addr-ps.cpp
M clang/test/Analysis/stackaddrleak.c
Log Message:
-----------
[analyzer] StackAddrEscapeChecker: also check return for child stack frames (#126986)
Fixes #123459.
This changes checking of the returned expr to also look for memory
regions whose stack frame context was a child of the current stack frame
context, e.g., for cases like this given in #123459:
```
struct S { int *p; };
S f() {
S s;
{
int a = 1;
s.p = &a;
}
return s;
}
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list