-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
See
cpython/Modules/_remote_debugging_module.c
Lines 1876 to 1894 in cf8941c
| *previous_frame = GET_MEMBER(uintptr_t, frame, unwinder->debug_offsets.interpreter_frame.previous); | |
| if (GET_MEMBER(char, frame, unwinder->debug_offsets.interpreter_frame.owner) == FRAME_OWNED_BY_CSTACK || | |
| GET_MEMBER(char, frame, unwinder->debug_offsets.interpreter_frame.owner) == FRAME_OWNED_BY_INTERPRETER) { | |
| return 0; // C frame | |
| } | |
| if (GET_MEMBER(char, frame, unwinder->debug_offsets.interpreter_frame.owner) != FRAME_OWNED_BY_GENERATOR | |
| && GET_MEMBER(char, frame, unwinder->debug_offsets.interpreter_frame.owner) != FRAME_OWNED_BY_THREAD) { | |
| PyErr_Format(PyExc_RuntimeError, "Unhandled frame owner %d.\n", | |
| GET_MEMBER(char, frame, unwinder->debug_offsets.interpreter_frame.owner)); | |
| return -1; | |
| } | |
| *code_object = GET_MEMBER(uintptr_t, frame, unwinder->debug_offsets.interpreter_frame.executable); | |
| // Strip tag bits for consistent comparison | |
| *code_object &= ~Py_TAG_BITS; | |
| assert(code_object != NULL); |
Here it is clear that *code_object = might not be executed in several cases. I have a PR ready.
Linked PRs
Metadata
Metadata
Assignees
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error