[clang] [Thread Analysis] Fix a bug in context update in alias-analysis (PR #178952)
Bart Van Assche via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 6 07:15:06 PST 2026
================
@@ -7493,7 +7493,21 @@ void testPointerAliasEscapeMultiple(Foo *F) {
escapeAliasMultiple(&L, &L, &Fp);
Fp->mu.Unlock(); // expected-warning{{releasing mutex 'Fp->mu' that was not held}}
} // expected-warning{{mutex 'F->mu' is still held at the end of function}}
-
+
+void unlockFooWithEscapablePointer(Foo **Fp) EXCLUSIVE_UNLOCK_FUNCTION((*Fp)->mu);
+void testEscapeInvalidationHappensRightAfterTheCall(Foo* F) {
+ Foo* L;
+ L = F;
+ L->mu.Lock();
+ // Release the lock hold by 'L' before clear its definition.
----------------
bvanassche wrote:
hold -> held
clear -> clearing
https://github.com/llvm/llvm-project/pull/178952
More information about the cfe-commits
mailing list