Created
June 30, 2020 22:03
-
-
Save agustingianni/b719594a4b7dd359d23fc07b394cfe97 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from FunctionCall call, FunctionCall lock | |
where | |
// Assert that `lock` is your lock function. | |
lock.getTarget().getName() = "lock_function" and | |
// Assert that `call` is your target function. | |
call.getTarget().getName() = "yrp" and | |
// Assert that there is not a predecesor to `call` that is a call to the lock function. | |
not call.getAPredecessor+() = lock | |
select call, "Function is called without locking" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment