-
-
Couldn't load subscription status.
- Fork 33.2k
gh-133157: remove use of _Py_NO_SANITIZE_UNDEFINED in faulthandler
#134047
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
Conversation
- reading from NULL is no more an undefined behavior for C11 - instead of using 1/0 arithmetic, we explicitly raise SIGFPE
Reading from NULL is an undefined behavior and `faulthandler` should not check for low-level C about undefined behaviors.
|
Should I actually add a NEWS entry? the function was not documented but it had a docstring. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It doesn't need a NEWS entry since it's a private function written for test_faulthandler. |
…thandler` (python#134047) In `faulthandler_sigfpe()`, instead of using 1/0 arithmetic, we explicitly raise SIGFPE. We also remove `faulthandler._read_null()` since reading from NULL is an undefined behavior and `faulthandler` should not check for low-level C undefined behaviors.
…thandler` (python#134047) In `faulthandler_sigfpe()`, instead of using 1/0 arithmetic, we explicitly raise SIGFPE. We also remove `faulthandler._read_null()` since reading from NULL is an undefined behavior and `faulthandler` should not check for low-level C undefined behaviors.
_read_null()as it's a tricky one (and the compiler didn't seem to complain)