File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
cpp/common/src/codingstandards/cpp Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ pragma[inline]
231
231
ControlFlowNode getAThreadContextAwarePredecessor ( ControlFlowNode start , ControlFlowNode end ) {
232
232
result = getAThreadContextAwareSuccessor ( start ) and
233
233
not result = getAThreadContextAwareSuccessor ( end ) and
234
- not result = end
234
+ not result = end
235
235
}
236
236
237
237
/**
@@ -402,6 +402,13 @@ class LockProtectedControlFlowNode extends ThreadedCFN {
402
402
unlock .( MutexFunctionCall ) .isUnlock ( )
403
403
// note that we don't check that it's the same lock -- this is left
404
404
// to the caller to enforce this condition.
405
+
406
+ // Because of the way that `getAThreadContextAwarePredecessor` works, it is possible
407
+ // for operations PAST it to be technically part of the predecessors.
408
+ // Thus, we need to make sure that this lock (to be actually)
409
+ // an unlock along the same path it must be the case that when we
410
+ // supply it as the starting point of the search it hits the try lock
411
+ and getAThreadContextAwareSuccessor ( unlock ) = this
405
412
) and
406
413
( lock instanceof MutexFunctionCall implies not this .( MutexFunctionCall ) .isUnlock ( ) )
407
414
)
You can’t perform that action at this time.
0 commit comments