Skip to content

UBsan: Remove _Py_NO_SANITIZE_UNDEFINED #133157

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

Open
encukou opened this issue Apr 29, 2025 · 0 comments
Open

UBsan: Remove _Py_NO_SANITIZE_UNDEFINED #133157

encukou opened this issue Apr 29, 2025 · 0 comments
Assignees
Labels
extension-modules C modules in the Modules dir interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-C-API type-bug An unexpected behavior, bug, or error

Comments

@encukou
Copy link
Member

encukou commented Apr 29, 2025

Bug report

Split out from the #111178 monster-issue:

We use the macro _Py_NO_SANITIZE_UNDEFINED to disable the UB sanitizer in some hard-to-fix cases, so that we can get a stable, regression-monitoring checker sooner.
To fully fix UBsan failures, we should get rid of the macro.
At least outside test functions.

Linked PRs

@encukou encukou added topic-C-API type-bug An unexpected behavior, bug, or error labels Apr 29, 2025
@picnixz picnixz self-assigned this May 15, 2025
@picnixz picnixz added interpreter-core (Objects, Python, Grammar, and Parser dirs) extension-modules C modules in the Modules dir labels May 15, 2025
picnixz added a commit that referenced this issue May 18, 2025
…er` (#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-C-API type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants