Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlockIncriticalSectionChecker.cpp seems to have a logical problem #61704

Open
wcy1997 opened this issue Mar 26, 2023 · 1 comment
Open

BlockIncriticalSectionChecker.cpp seems to have a logical problem #61704

wcy1997 opened this issue Mar 26, 2023 · 1 comment

Comments

@wcy1997
Copy link

wcy1997 commented Mar 26, 2023

https://github.com/llvm/llvm-project/blob/main/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp#L138
It seems that code cannot run to this branch.
After filtering through the first if statement, only the lock function or mutexCount <= 0 to enter the following branch;
After filtering through the second if statement, only mutexCount <= 0 can enter the third branch.
However, he condition for the third statement is that mutexcount is greater than 0...

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 26, 2023

@llvm/issue-subscribers-clang-static-analyzer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants