Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-133157: remove usage of_Py_NO_SANITIZE_UNDEFINED inpyexpat#134050

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
picnixz wants to merge3 commits intopython:main
base:main
Choose a base branch
Loading
frompicnixz:fix/ubsan/expat-133157

Conversation

picnixz
Copy link
Member

@picnixzpicnixz commentedMay 15, 2025
edited by bedevere-appbot
Loading

IIUC ISO C11, we can use "union casts" (which are actually compound literals, and thus constructors) to pass use unions. The idea is to consider each different function pointer as a union of possible function pointers and store them as such. In some sense, we're doing singledispatch with known registered types.

@picnixz

This comment was marked as resolved.

@picnixzpicnixz marked this pull request as draftMay 15, 2025 13:09
@picnixz

This comment was marked as resolved.

@picnixz
Copy link
MemberAuthor

Hum, looks like it worked. But I don't know why the pointer alternative didn't work (in clang it does?). I guess it's because of some optimization and it got eliminated (or maybe what I did was also a UB c:)

@picnixzpicnixz marked this pull request as ready for reviewMay 15, 2025 13:52
@picnixzpicnixz requested a review fromvstinnerMay 15, 2025 15:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@batellerbatellerbateller approved these changes

@encukouencukouAwaiting requested review from encukou

@vstinnervstinnerAwaiting requested review from vstinner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@picnixz@bateller

[8]ページ先頭

©2009-2025 Movatter.jp