Skip to content

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

Merged
encukou merged 3 commits into
python:mainfrom
picnixz:fix/ubsan/codeobject-111178
Jan 13, 2025
Merged

gh-111178: fix UBSan failures in Objects/codeobject.c#128240
encukou merged 3 commits into
python:mainfrom
picnixz:fix/ubsan/codeobject-111178

Conversation

@picnixz

@picnixzpicnixz commented Dec 25, 2024

Copy link
Copy Markdown
Member

@markshannonmarkshannon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would benefit from adding a couple of asserts. Otherwise, looks good.

Comment threadObjects/codeobject.c Outdated
Comment threadObjects/codeobject.c Outdated
@picnixz

Copy link
Copy Markdown
MemberAuthor

Would benefit from adding a couple of asserts. Otherwise, looks good.

Victor modified those files previously and decided on a non-macro formulation (pure pointer cast). I followed the same idea as I didn't want to introduce inconsistencies. Would it make sense to create a macro that performs the assertion on the self itself and replace pointer casts by that macro?

@encukou
encukou merged commit 4533036 into python:mainJan 13, 2025
@picnixz
picnixz deleted the fix/ubsan/codeobject-111178 branch January 13, 2025 13:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@picnixz@markshannon@encukou