NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.

Hmm this probably even deserves a warning? Like, the mutex goes out of scope 
but we don't know whether we've successfully destroyed it? Even if we perform 
the check later, we can't do anything about it anymore? (not sure how bad it is 
in practice)



================
Comment at: clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp:290-304
   // Existence in DestroyRetVal ensures existence in LockMap.
   // Existence in Destroyed also ensures that the lock state for lockR is 
either
   // UntouchedAndPossiblyDestroyed or UnlockedAndPossiblyDestroyed.
   assert(lstate->isUntouchedAndPossiblyDestroyed() ||
          lstate->isUnlockedAndPossiblyDestroyed());
 
   ConstraintManager &CMgr = state->getConstraintManager();
----------------
ASDenysPetrov wrote:
> I'm just wondering, did you think about such way of fixing?
This involves keeping dead regions in the program state. I'd be pretty worried 
about it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98504/new/

https://reviews.llvm.org/D98504

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to