GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-146092: Fix error handling in _BINARY_OP_ADD_UNICODE opcode by vstinner · Pull Request #146117 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Mar 18, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Fix also error handling in _BINARY_OP_ADD_FLOAT,
_BINARY_OP_SUBTRACT_FLOAT and _BINARY_OP_MULTIPLY_FLOAT opcodes. PyStackRef_FromPyObjectSteal() must not be called with a NULL pointer.

  • Issue: Missing PyErr_NoMemory in _zoneinfo load_data and ts_to_local #146092

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
pythongh-146092: Fix error handling in _BINARY_OP_ADD_UNICODE opcode
e7379c0
Fix also error handling in _BINARY_OP_ADD_FLOAT,
_BINARY_OP_SUBTRACT_FLOAT and _BINARY_OP_MULTIPLY_FLOAT opcodes.
PyStackRef_FromPyObjectSteal() must not be called with a NULL
pointer.
@vstinner
vstinner requested review from ericsnowcurrently and markshannon as code owners March 18, 2026 15:11
@vstinner vstinner added the skip news label Mar 18, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Mar 18, 2026
Missing PyErr_NoMemory in _zoneinfo load_data and ts_to_local #146092
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Mar 18, 2026
@vstinner

vstinner commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

I don't know well Python/bytecodes.c DSL, so I'm not sure if inputs are cleared properly on error.

Python 3.14 is also affected by the bug for _BINARY_OP_ADD_FLOAT, _BINARY_OP_SUBTRACT_FLOAT and _BINARY_OP_MULTIPLY_FLOAT opcodes (_BINARY_OP_ADD_UNICODE is not affected), but it needs a different fix. Once this fix will be merged, I will write a different one for 3.14.

cc @Fidget-Spinner @corona10

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Fidget-Spinner
Fidget-Spinner approved these changes Mar 18, 2026
View reviewed changes

@Fidget-Spinner Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Mar 18, 2026
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Mar 18, 2026
@Fidget-Spinner

Fidget-Spinner commented Mar 18, 2026

Copy link
Copy Markdown
Member

I think you accidentally committed an out of date test_frozenmain?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
Regenerate Programs/test_frozenmain.h
3401f15
@vstinner

vstinner commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

I think you accidentally committed an out of date test_frozenmain?

I don't know what happened, but Programs/test_frozenmain.h was regenerated somehow. I fixed the issue.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Fidget-Spinner
Fidget-Spinner approved these changes Mar 18, 2026
View reviewed changes
@vstinner

vstinner commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

Fix for the 3.14 branch: #146119.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner merged commit 1e4ed93 into python:main Mar 18, 2026
73 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner deleted the eval_err branch March 18, 2026 16:23
@miss-islington-app

miss-islington-app Bot commented Mar 18, 2026

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Mar 18, 2026
@miss-islington-app

miss-islington-app Bot commented Mar 18, 2026

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 1e4ed932109c4f8ee4f43bc3e6fdb7710a3606bd 3.14
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned vstinner Mar 18, 2026
@miss-islington-app

miss-islington-app Bot commented Mar 18, 2026

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 1e4ed932109c4f8ee4f43bc3e6fdb7710a3606bd 3.13
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner removed needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Mar 18, 2026
@vstinner

vstinner commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

@serhiy-storchaka added needs backport to 3.13 needs backport to 3.14 labels

As I wrote previously, the 3.14 branch needs a different fix. I wrote the PR gh-146119 for that.

Python 3.13 is not affected by the bug. PyStackRef_FromPyObjectSteal() doesn't exist in Python 3.13 (the function was added to Python 3.14).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

PR merged. Thanks for your review @Fidget-Spinner.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pablogsal pablogsal mentioned this pull request Apr 4, 2026
gh-130273: Fix traceback color output with unicode characters #142529
Merged
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@vstinner @ljfp
pythongh-146092: Fix error handling in _BINARY_OP_ADD_UNICODE opcode (p…
4f4627f
…ython#146117)

Fix also error handling in _BINARY_OP_ADD_FLOAT,
_BINARY_OP_SUBTRACT_FLOAT and _BINARY_OP_MULTIPLY_FLOAT opcodes.
PyStackRef_FromPyObjectSteal() must not be called with a NULL
pointer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@vstinner vstinner

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@vstinner @Fidget-Spinner @serhiy-storchaka
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.