gh-144316: Fix missing exception in _remote_debugging with debug=False#144442
gh-144316: Fix missing exception in _remote_debugging with debug=False#144442pablogsal merged 14 commits intopython:mainfrom
Conversation
7d1bb63 to
0f2d244
Compare
cffe58f to
66b060d
Compare
Misc/NEWS.d/next/Library/2026-02-03-19-57-41.gh-issue-144316.wop870.rst
Outdated
Show resolved
Hide resolved
|
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). |
|
@pablogsal Found |
picnixz
left a comment
There was a problem hiding this comment.
I think we should instead add assert(PyErr_Occurred()) in _set_debug_exception_cause instead.
|
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. |
|
@pablogsal - do you have any more objections? Otherwise, I'm going to merge this. |
No, let's land this! |
|
Great work @taegyunkim ! |
|
Thanks @taegyunkim for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Sorry, @taegyunkim and @pablogsal, I could not cleanly backport this to |
…th debug=False (pythonGH-144442) (cherry picked from commit c2d3d6b) Co-authored-by: Taegyun Kim <taegyun.kim@datadoghq.com>
|
GH-145280 is a backport of this pull request to the 3.14 branch. |
PyErr_NoMemory()call whenPyMem_RawMalloc()returnedNULL.PyErr_Format()calls before callingset_exception_causemacroset_exception_causemacro to assert an error is set.RemoteUnwinder.get_stack_traceis missing exceptions on some error code paths #144316