-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
regression: false positive from clang-analyzer-unix.StdCLibraryFunctions
with getcwd()
#128882
Comments
@llvm/issue-subscribers-clang-static-analyzer Author: Sean McBride (seanm)
clang-tidy / clang static analyzer tells me:
But the macOS man page for getcwd says: "If buf is NULL [1st param], space is allocated as necessary to store the pathname and size [2nd param] is ignored. This space may later be free(3)'d." Looks like the responsible line is : https://github.com/llvm/llvm-project/blob/defe43bbffb0d25ec468f0e54b20548ec192ff90/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp#L2662C1-L2662C46 from this commit: 7dd2063 from this PR: #77040 @benshi001 |
Hi! This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below. |
@llvm/issue-subscribers-good-first-issue Author: Sean McBride (seanm)
clang-tidy / clang static analyzer tells me:
But the macOS man page for getcwd says: "If buf is NULL [1st param], space is allocated as necessary to store the pathname and size [2nd param] is ignored. This space may later be free(3)'d." Looks like the responsible line is : https://github.com/llvm/llvm-project/blob/defe43bbffb0d25ec468f0e54b20548ec192ff90/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp#L2662C1-L2662C46 from this commit: 7dd2063 from this PR: #77040 @benshi001 |
i want to work on this, please assign me. |
@FantasqueX are you going to work on this soon? If not, I will, because it looks pretty trivial to fix... |
Sorry, I'm a bit busy these days. May not be able to fix this. |
clang-tidy / clang static analyzer tells me:
But the macOS man page for getcwd says:
"If buf is NULL [1st param], space is allocated as necessary to store the pathname and size [2nd param] is ignored. This space may later be free(3)'d."
Looks like the responsible line is : https://github.com/llvm/llvm-project/blob/defe43bbffb0d25ec468f0e54b20548ec192ff90/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp#L2662C1-L2662C46
from this commit: 7dd2063
from this PR: #77040
@benshi001
The text was updated successfully, but these errors were encountered: