Skip to content

gh-111178: fix UBSan for custom.c examples - #131606

Merged
encukou merged 5 commits into
python:mainfrom
picnixz:fix/ubsan/doc-custom-111178
Mar 24, 2025
Merged

gh-111178: fix UBSan for custom.c examples#131606
encukou merged 5 commits into
python:mainfrom
picnixz:fix/ubsan/doc-custom-111178

Conversation

@picnixz

@picnixzpicnixz commented Mar 23, 2025

Copy link
Copy Markdown
Member

@picnixzpicnixz self-assigned this Mar 24, 2025

@vstinnervstinner 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.

LGTM

cc @encukou

@encukou

encukou commented Mar 24, 2025

Copy link
Copy Markdown
Member

These are included in the docs (newtypes_tutorial.rst), which redundantly define most of those in the prose, and have some notes that reference the casts. Could you change those as well?
(Perhaps there's a way to consolidate this with something like Sphinx's :start-at:, but that might be a distraction right now. In any case, some of the actual prose does need to be updated.)

@picnixz

Copy link
Copy Markdown
MemberAuthor

I observed that I incorrectly called a function as well, so thanks Petr for pointing out the docs.

@picnixz
picnixz requested a review from encukouMarch 24, 2025 10:52
Comment threadDoc/extending/newtypes_tutorial.rst
Comment threadDoc/extending/newtypes_tutorial.rst Outdated
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Comment threadDoc/extending/newtypes_tutorial.rst
Comment threadDoc/extending/newtypes_tutorial.rst
@picnixz

Copy link
Copy Markdown
MemberAuthor

@encukou feel free to merge this one tomorrow or whenever you want, I'm not on my dev session so I can only edit from the web UI.

@encukou
encukou merged commit 1d6a2e6 into python:mainMar 24, 2025
@encukou

Copy link
Copy Markdown
Member

Thanks!
FWIW, there's also newtypes.rst with some UB examples.

@picnixz
picnixz deleted the fix/ubsan/doc-custom-111178 branch March 24, 2025 18:31
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 1, 2025
…torial` docs (pythonGH-131606)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
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.

4 participants

@picnixz@encukou@vstinner@skirpichev