8000 gh-111178: fix UBSan failures in `Objects/codeobject.c` by picnixz · Pull Request #128240 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-111178: fix UBSan failures in Objects/codeobject.c #128240

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

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add macro with assertion as per Mark's recommendation
  • Loading branch information
picnixz committed Jan 11, 2025
commit a77438446b7f90a181bbc247f3b73c22cf4d3b28
2 changes: 2 additions & 0 deletions Objects/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ PyCode_ClearWatcher(int watcher_id)
* generic helpers
******************/

#define _PyCodeObject_CAST(op) (assert(PyCode_Check(op)), (PyCodeObject *)(op))

static int
should_intern_string(PyObject *o)
{
Expand Down
0