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-144316: Fix missing exception in _remote_debugging with debug=False by taegyunkim · Pull Request #144442 · python/cpython

Conversation

@taegyunkim

@taegyunkim taegyunkim commented Feb 3, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  1. Adds missing PyErr_NoMemory() call when PyMem_RawMalloc() returned NULL.
  2. Adds missing PyErr_Format() calls before calling set_exception_cause macro
  3. Modifies set_exception_cause macro to assert an error is set.
  • Issue: RemoteUnwinder.get_stack_trace is missing exceptions on some error code paths #144316

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot mentioned this pull request Feb 3, 2026
RemoteUnwinder.get_stack_trace is missing exceptions on some error code paths #144316
Closed
@taegyunkim
pythongh-144316: Fix missing exception in _remote_debugging with debu…
0f2d244
…g=False
@taegyunkim
taegyunkim force-pushed the gh-144316-get_stack_trace branch from 7d1bb63 to 0f2d244 Compare February 3, 2026 19:50
@blurb-it @taegyunkim
📜🤖 Added by blurb_it.
66b060d
@taegyunkim
taegyunkim force-pushed the gh-144316-get_stack_trace branch from cffe58f to 66b060d Compare February 3, 2026 20:01
picnixz
picnixz reviewed Feb 3, 2026
View reviewed changes
Comment thread Modules/_remote_debugging/_remote_debugging.h Resolved

Uh oh!

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

Comment thread Misc/NEWS.d/next/Library/2026-02-03-19-57-41.gh-issue-144316.wop870.rst Resolved

Uh oh!

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

taegyunkim added 2 commits February 3, 2026 15:11
@taegyunkim
Vertically algin continuation character (\) per PEP-7
3c72749
@taegyunkim
Shorten news entry as suggested
c42b64c
@taegyunkim
taegyunkim marked this pull request as ready for review February 3, 2026 20:14
@taegyunkim
taegyunkim requested a review from pablogsal as a code owner February 3, 2026 20:14
@bedevere-app bedevere-app Bot added the awaiting review label Feb 3, 2026
@pablogsal

pablogsal commented Feb 4, 2026

Copy link
Copy Markdown
Member

This macro is intended to add context to an exception not to be the actual cause of the error. Doing this will mask actual bugs in the code where we are not setting exceptions properly in places that should catch it and fail. Unfortunately this is not only is a partial fix but it will hide errors. The correct solution is finding the error paths that are not properly handling errors and fix there (and perhaps chain).

All reactions

Sorry, something went wrong.

Uh oh!

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

taegyunkim added 4 commits February 4, 2026 12:26
@taegyunkim
Call PyErr_NoMemory() on when PyMem_RawMalloc() returns NULL; typo am…
f2ad0ef
…mount->amount
@taegyunkim
Update macro to crash in debug mode when error is not set
c0a8037
@taegyunkim
Merge branch 'main' into pythongh-144316-get_stack_trace
07cb6e9
@taegyunkim
Adjust vertical bars per PEP-7
173cde8
@taegyunkim

taegyunkim commented Feb 4, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

@pablogsal Found PyMem_RawMalloc() call which didn't set PyErr when it returned NULL. Let me know if the changes to the macro look unnecessary.

All reactions

Sorry, something went wrong.

Uh oh!

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

picnixz
picnixz reviewed Feb 4, 2026
View reviewed changes

@picnixz picnixz 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.

I think we should instead add assert(PyErr_Occurred()) in _set_debug_exception_cause instead.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Modules/_remote_debugging/_remote_debugging.h Resolved

Uh oh!

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

taegyunkim added 2 commits February 4, 2026 15:18
@taegyunkim
Assert before calling _set_debug_exception_cause
29774d7
@taegyunkim
Merge branch 'main' into pythongh-144316-get_stack_trace
0691413
@taegyunkim
taegyunkim marked this pull request as draft February 4, 2026 20:37
@bedevere-app bedevere-app Bot removed the awaiting review label Feb 4, 2026
taegyunkim added 2 commits February 4, 2026 15:37
@taegyunkim
Merge branch 'main' into pythongh-144316-get_stack_trace
9e622ab
@taegyunkim
Make sure to call PyErr before calling set_exception_cause
39b6abe
@taegyunkim
taegyunkim marked this pull request as ready for review February 4, 2026 21:29
@bedevere-app bedevere-app Bot added the awaiting review label Feb 4, 2026
taegyunkim added 2 commits February 5, 2026 10:19
@taegyunkim
Merge branch 'main' into pythongh-144316-get_stack_trace
a1b0590
@taegyunkim
Merge branch 'main' into pythongh-144316-get_stack_trace
51f5997
@picnixz

picnixz commented Feb 5, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Please, stop updating the branch when there is nothing to do. It wastes CI resources and notifies everyone subscribed to the thread. See https://devguide.python.org/getting-started/pull-request-lifecycle/#update-branch-button.

taegyunkim reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@colesbury
colesbury self-requested a review February 26, 2026 19:58
@colesbury

colesbury commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

@pablogsal - do you have any more objections? Otherwise, I'm going to merge this.

All reactions

Sorry, something went wrong.

Uh oh!

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

@pablogsal

pablogsal commented Feb 26, 2026

Copy link
Copy Markdown
Member

@pablogsal - do you have any more objections? Otherwise, I'm going to merge this.

No, let's land this!

All reactions

Sorry, something went wrong.

Uh oh!

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

@pablogsal
pablogsal merged commit c2d3d6b into python:main Feb 26, 2026
47 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting review label Feb 26, 2026
@pablogsal

pablogsal commented Feb 26, 2026

Copy link
Copy Markdown
Member

Great work @taegyunkim !

All reactions

Sorry, something went wrong.

Uh oh!

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

@pablogsal pablogsal added the needs backport to 3.14 bugs and security fixes label Feb 26, 2026
@miss-islington-app

miss-islington-app Bot commented Feb 26, 2026

Copy link
Copy Markdown

Thanks @taegyunkim for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 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 commented Feb 26, 2026

Copy link
Copy Markdown

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

cherry_picker c2d3d6b0dd87aaea2f3a72419e1d1488d3ab9503 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 pablogsal Feb 26, 2026
pablogsal pushed a commit to pablogsal/cpython that referenced this pull request Feb 26, 2026
@taegyunkim @pablogsal
pythongh-144316: Fix missing exception in _remote_debugging with debu…
dcd1c74
…g=False (python#144442)
pablogsal pushed a commit to pablogsal/cpython that referenced this pull request Feb 26, 2026
@taegyunkim @pablogsal
[3.14] pythongh-144316: Fix missing exception in _remote_debugging wi…
24ef36a
…th debug=False (pythonGH-144442)

(cherry picked from commit c2d3d6b)

Co-authored-by: Taegyun Kim <[email protected]>
pablogsal added a commit to pablogsal/cpython that referenced this pull request Feb 26, 2026
@pablogsal
[3.14] pythongh-144316: Fix missing exception in _remote_debugging (p…
0b5eaae
…ythonGH-144442)
@bedevere-app

bedevere-app Bot commented Feb 26, 2026

Copy link
Copy Markdown

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

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 needs backport to 3.14 bugs and security fixes label Feb 26, 2026
pablogsal added a commit that referenced this pull request Feb 26, 2026
@pablogsal
[3.14] gh-144316: Fix missing exception in _remote_debugging with deb…
ded533b
…ug=False (GH-144442) (#145280)
brijkapadia pushed a commit to brijkapadia/cpython that referenced this pull request Feb 28, 2026
@taegyunkim @brijkapadia
pythongh-144316: Fix missing exception in _remote_debugging with debu…
b9b2499
…g=False (python#144442)
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@taegyunkim @ljfp
pythongh-144316: Fix missing exception in _remote_debugging with debu…
41c93ef
…g=False (python#144442)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picnixz picnixz picnixz left review comments
@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal is a code owner
@colesbury colesbury Awaiting requested review from colesbury

Uh oh!

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

Assignees

@pablogsal pablogsal

Labels

None yet

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.

4 participants

@taegyunkim @pablogsal @picnixz @colesbury
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.