Skip to content

[3.11] gh-127563: use dk_log2_index_bytes=3 in empty dicts (GH-127568) (GH-127813) #135463

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 1 commit into from
Jun 16, 2025

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 13, 2025

This fixes a UBSan failure (unaligned zero-size memcpy) in dictobject.c.
(cherry picked from commit 9af96f4)

(cherry picked from commit 320a1dc)

Co-authored-by: Miss Islington (bot) 31488909+miss-islington@users.noreply.github.com
Co-authored-by: Bénédikt Tran 10796600+picnixz@users.noreply.github.com

…ythonGH-127568) (pythonGH-127813)

This fixes a UBSan failure (unaligned zero-size memcpy) in `dictobject.c`.
(cherry picked from commit 9af96f4)

(cherry picked from commit 320a1dc)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@encukou
Copy link
Member

encukou commented Jun 13, 2025

!buildbot AMD64.Arch.Linux.Usan.Function

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @encukou for commit d36498e 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F135463%2Fmerge

The command will test the builders whose names match following regular expression: AMD64.Arch.Linux.Usan.Function

The builders matched are:

  • AMD64 Arch Linux Usan Function PR

@encukou encukou marked this pull request as draft June 13, 2025 12:59
@encukou encukou marked this pull request as ready for review June 16, 2025 12:24
@encukou
Copy link
Member

encukou commented Jun 16, 2025

@pablogsal: This will fix the Usan Function buildbot on 3.11:

Objects/dictobject.c:1500:40: runtime error: load of misaligned address 0x64c642987861 for type 'PyDictUnicodeEntry *', which requires 8 byte alignment
0x64c642987861: note: pointer points here
 00 00 00  ff ff ff ff ff ff ff ff  00 00 00 00 00 00 00 00  9b e6 72 42 c6 64 00 00  4c 01 00 00 14
              ^ 
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1500:40 

Of course, it is not a security fix, and it's not fixing a real-world issue on supported architectures.

An alternative would be declaring the USan builder unstable on 3.11.

Do you want to merge it?

@encukou encukou requested a review from pablogsal June 16, 2025 12:35
@pablogsal
Copy link
Member

YEah I think is fine to merge I prefer to have the builedbot green

@pablogsal pablogsal merged commit 313544e into python:3.11 Jun 16, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants