Skip to content

gh-159739: Preserve the normalization buffer on allocation failure - #159755

Merged
JelleZijlstra merged 1 commit into
python:mainfrom
jelle-openai:jelle/codex/gh-159739-unicodedata-buffer
Oct 20, 2026
Merged

JelleZijlstra merged 1 commit into
python:mainfrom
jelle-openai:jelle/codex/gh-159739-unicodedata-buffer

Conversation

@jelle-openai

@jelle-openai jelle-openai commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Save the original buffer before calling PyMem_Resize(), which overwrites
its first argument even on failure.

Save the original buffer before calling PyMem_Resize(), which overwrites
its first argument even on failure.

Backport to 3.15 and 3.14; the affected allocation spans multiple lines
on those branches.
@JelleZijlstra JelleZijlstra added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 19, 2026
@JelleZijlstra
JelleZijlstra enabled auto-merge (squash) October 20, 2026 17:23
@JelleZijlstra
JelleZijlstra merged commit c38d75c into python:main Oct 20, 2026
110 of 112 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @jelle-openai for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @jelle-openai and @JelleZijlstra, I could not cleanly backport this to 3.15 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker c38d75ce321b72a67a04f41589a2e405ed3145a7 3.15

@miss-islington-app

Copy link
Copy Markdown

Sorry, @jelle-openai and @JelleZijlstra, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker c38d75ce321b72a67a04f41589a2e405ed3145a7 3.14

@bedevere-app

bedevere-app Bot commented Oct 20, 2026

Copy link
Copy Markdown

GH-159933 is a backport of this pull request to the 3.14 branch.

@bedevere-app

bedevere-app Bot commented Oct 20, 2026

Copy link
Copy Markdown

GH-159935 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 20, 2026
JelleZijlstra pushed a commit that referenced this pull request Oct 20, 2026
…lure (GH-159755) (#159933)

Save the original buffer before calling PyMem_Resize(), which overwrites its first argument even on failure.

(cherry picked from commit c38d75c)
JelleZijlstra pushed a commit that referenced this pull request Oct 20, 2026
…lure (GH-159755) (#159935)

Save the original buffer before calling PyMem_Resize(), which overwrites its first argument even on failure.

(cherry picked from commit c38d75c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants