[PATCH] D37806: [analyzer] PthreadLock: Fix return values of XNU lock functions.
Anna Zaks via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 13 08:51:03 PDT 2017
zaks.anna added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp:271
}
- assert(lockFail && lockSucc);
- C.addTransition(lockFail);
-
+ // We might want to handle the case when the mutex lock function was inlined
+ // and returned an Unknown or Undefined value.
----------------
This comment is repeated several times...
================
Comment at: test/Analysis/Inputs/system-header-simulator-for-pthread-lock.h:29
+extern void lck_mtx_unlock(lck_mtx_t *);
+extern boolean_t lck_mtx_try_lock(lck_mtx_t *);
extern void lck_mtx_destroy(lck_mtx_t *lck, lck_grp_t *grp);
----------------
Should there be a test added that uses the function?
https://reviews.llvm.org/D37806
More information about the cfe-commits
mailing list