Assignees
@picnixz
Labels
extension-modulesC modules in the Modules dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)topic-C-API type-bugAn unexpected behavior, bug, or error

Comments

@encukou

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

@encukouencukou added topic-C-API type-bugAn unexpected behavior, bug, or errorlabels Apr 29, 2025
@picnixzpicnixz self-assigned this May 15, 2025
@picnixzpicnixz added interpreter-core(Objects, Python, Grammar, and Parser dirs)extension-modulesC modules in the Modules dirlabels 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.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 10, 2025
…er/pegen.c` (pythonGH-134048)

(cherry picked from commit 754e7c9)

Co-authored-by: Bénédikt Tran <[email protected]>
pablogsal pushed a commit that referenced this issue Jun 10, 2025
…ser/pegen.c` (GH-134048) (#135320)

gh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in `Parser/pegen.c` (GH-134048)
(cherry picked from commit 754e7c9)

Co-authored-by: Bénédikt Tran <[email protected]>
picnixz added a commit to picnixz/cpython that referenced this issue Jun 10, 2025
…n `Parser/pegen.c` (pythonGH-134048)

(cherry picked from commit 754e7c9)

Co-authored-by: Bénédikt Tran <[email protected]>
picnixz added a commit that referenced this issue Jun 10, 2025
…135334)

[3.13] gh-133157: fix UBSan failures in `Parser/pegen.c` (GH-134048)
(cherry picked from commit 754e7c9)
encukou added a commit to encukou/cpython that referenced this issue Jun 10, 2025
Sign up for free to join this conversation on . Already have an account? Sign in to comment
extension-modulesC modules in the Modules dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)topic-C-API type-bugAn unexpected behavior, bug, or error
None yet

No branches or pull requests