-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Mechanism to deprecate standard library functions in OpenZFS needs replacement #14134
Labels
Comments
ryao
added
Type: Defect
Incorrect behavior (e.g. crash, hang)
Bot: Not Stale
Override for the stale bot
labels
Nov 3, 2022
ryao
added a commit
to ryao/zfs
that referenced
this issue
Jan 25, 2024
The LLVM/Clang developers pointed out that using the CPP to detect use of functions that our QA policies prohibit risks invoking undefined behavior. To resolve this, we configure CodeQL to detect forbidden function usage. Note that cpp in the context of CodeQL refers to C/C++, rather than the C PreProcessor, which C++ also uses. It really should have been written cxx, but that ship sailed a long time ago. This misuse of the term cpp is retained in the CodeQL configuration for consistency with upstream CodeQL. As a side benefit, verbose make no longer is a wall of text showing a bunch of CPP macros, which can make debugging slightly easier. Signed-off-by: Richard Yao <[email protected]> Closes openzfs#14134
behlendorf
pushed a commit
to behlendorf/zfs
that referenced
this issue
Jan 29, 2024
The LLVM/Clang developers pointed out that using the CPP to detect use of functions that our QA policies prohibit risks invoking undefined behavior. To resolve this, we configure CodeQL to detect forbidden function usage. Note that cpp in the context of CodeQL refers to C/C++, rather than the C PreProcessor, which C++ also uses. It really should have been written cxx, but that ship sailed a long time ago. This misuse of the term cpp is retained in the CodeQL configuration for consistency with upstream CodeQL. As a side benefit, verbose make no longer is a wall of text showing a bunch of CPP macros, which can make debugging slightly easier. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes openzfs#15819 Closes openzfs#14134
behlendorf
pushed a commit
that referenced
this issue
Jan 29, 2024
The LLVM/Clang developers pointed out that using the CPP to detect use of functions that our QA policies prohibit risks invoking undefined behavior. To resolve this, we configure CodeQL to detect forbidden function usage. Note that cpp in the context of CodeQL refers to C/C++, rather than the C PreProcessor, which C++ also uses. It really should have been written cxx, but that ship sailed a long time ago. This misuse of the term cpp is retained in the CodeQL configuration for consistency with upstream CodeQL. As a side benefit, verbose make no longer is a wall of text showing a bunch of CPP macros, which can make debugging slightly easier. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #15819 Closes #14134
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this issue
Mar 13, 2024
The LLVM/Clang developers pointed out that using the CPP to detect use of functions that our QA policies prohibit risks invoking undefined behavior. To resolve this, we configure CodeQL to detect forbidden function usage. Note that cpp in the context of CodeQL refers to C/C++, rather than the C PreProcessor, which C++ also uses. It really should have been written cxx, but that ship sailed a long time ago. This misuse of the term cpp is retained in the CodeQL configuration for consistency with upstream CodeQL. As a side benefit, verbose make no longer is a wall of text showing a bunch of CPP macros, which can make debugging slightly easier. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes openzfs#15819 Closes openzfs#14134
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this issue
Mar 13, 2024
The LLVM/Clang developers pointed out that using the CPP to detect use of functions that our QA policies prohibit risks invoking undefined behavior. To resolve this, we configure CodeQL to detect forbidden function usage. Note that cpp in the context of CodeQL refers to C/C++, rather than the C PreProcessor, which C++ also uses. It really should have been written cxx, but that ship sailed a long time ago. This misuse of the term cpp is retained in the CodeQL configuration for consistency with upstream CodeQL. As a side benefit, verbose make no longer is a wall of text showing a bunch of CPP macros, which can make debugging slightly easier. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes openzfs#15819 Closes openzfs#14134
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
In llvm/llvm-project#57954, the LLVM/Clang developers make it clear that they are strongly opposed to using the preprocessor in the way that we do to mark functions such as
strncpy()
as deprecated.Initially, I did not consider their arguments to be persuasive, but then I posed the question:
To which, @erichkeane replied:
It sounds like compiler optimizations can cause the checks defined in
config/Rules.am
that are intended to ban certain functions from the codebase to fail to cause build failures when they are used. Thus, the mechanism should be replaced.Two competing ideas that I have for replacing it are:
The text was updated successfully, but these errors were encountered: