Module LockFlow

Provides classes and predicates for analyzing mutexes and the control flow regions where they might be locked.

Import path

Security.CWE.CWE-764.LockFlow

Imports

Synchronization

Utilities for analyzing synchronization primitives, such as mutexes and semaphores.

cpp

Provides classes and predicates for working with C/C++/ObjC/ObjC++ code.

Predicates

lockedInCall

Holds if mutex access is locked either directly or indirectly by this function call. This is a generalization of lockCall.

lockedOnEntry

Holds if the mutex locked at access might still be locked before control flow node node executes. That is, if it might be locked after a predecessor of node has executed.

lockedOnExit

Holds if the mutex locked at access might still be locked after control flow node node has executed. That is, the lock which was obtained at access has not been canceled by a matching unlock or superseded by a more recent call to the lock method.

pathToLock

Holds if mutex access might be locked at node or one of its successors.

tryLockCondition

Holds if cond is a test for whether locking access succeeded, and failNode is the control flow node we continue with if it did not. Suitable locking statements may look like if(tryLock(m)) or like if(lock(m) != 0).

Classes

BasicBlockWithReturn

A basic block that ends with a return statement.