diff options
| author | Ziqing Luo <ziqing_luo@apple.com> | 2026-02-03 13:23:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-03 13:23:02 -0800 |
| commit | a6c926b0cf6bde1f46146e66cf17b72b62597818 (patch) | |
| tree | ae1812ddf310a0d548a9f3fe860f2a25f2a784ce /libc/src/fenv/feholdexcept.h | |
| parent | 4b4c32ce09e4a7d993607c40056a4805564188c4 (diff) | |
| download | llvm-main.zip llvm-main.tar.gz llvm-main.tar.bz2 | |
The commit b4c98fcbe1504841203e610c351a3227f36c92a4 introduces
alias-analysis and conservatively invalidates variable definitions at
function calls. For each invalidated argument, it creates and pushes a
context. So if there are multiple arguments being invalidated, there are
more than one context being pushed. However, the analysis expects one
context at the program point of a call, causing context mismatch. This
issue could lead to false negatives.
For example,
```
MyLock->Lock(); // 'MyLock' holds the lock
Lock_t *Ptr = MyLock; // 'Ptr' aliases with 'MyLock'
// Before the fix, two contexts are saved and pushed at the call below, causing context mismatch later.
escapeAliasMultiple(&Irrelevant, &Ptr);
Ptr->Unlock(); // 'Ptr' may no longer hold the lock but the analyzer missed it due to context mismatch
```
This commit fixes the issue.
---------
Co-authored-by: Marco Elver <me@marcoelver.com>
Diffstat (limited to 'libc/src/fenv/feholdexcept.h')
0 files changed, 0 insertions, 0 deletions
