Skip to content

gh-161863: Fix possible NULL deref in _PyErr_Display - #161979

Merged
sobolevn merged 1 commit into
python:mainfrom
sobolevn:issue-161863
Nov 14, 2026
Merged

sobolevn merged 1 commit into
python:mainfrom
sobolevn:issue-161863

Conversation

@sobolevn

@sobolevn sobolevn commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Continues the work of #161860

Before:

» ./Programs/_freeze_module crash crash.py crash.h
Exception ignored in the internal traceback machinery:
SystemError: null argument to internal routine
SystemError: Codecs are not initialized

After:

» ./Programs/_freeze_module crash crash.py crash.h
SystemError: Codecs are not initialized

The credit for this change goes to @vstinner, thanks a lot for helping with the debug! It was very helpful :)

@vstinner vstinner 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

@sobolevn
sobolevn merged commit 3403de5 into python:main Nov 14, 2026
66 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Nov 14, 2026

Copy link
Copy Markdown

GH-162018 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 Nov 14, 2026
@bedevere-app

bedevere-app Bot commented Nov 14, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Nov 14, 2026
sobolevn added a commit that referenced this pull request Nov 14, 2026
…61979) (#162019)

gh-161863: Fix possible `NULL` deref in `_PyErr_Display` (GH-161979)
(cherry picked from commit 3403de5)

Co-authored-by: sobolevn <mail@sobolevn.me>
sobolevn added a commit that referenced this pull request Nov 14, 2026
…61979) (#162018)

gh-161863: Fix possible `NULL` deref in `_PyErr_Display` (GH-161979)
(cherry picked from commit 3403de5)

Co-authored-by: sobolevn <mail@sobolevn.me>
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.

3 participants