mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
GH-96754: Check whether the interpreter frame is complete before creating frame object. (GH-96776)
This commit is contained in:
parent
1756ffd66a
commit
12c5f328d2
4 changed files with 14 additions and 3 deletions
|
@ -5113,9 +5113,11 @@ error:
|
|||
#endif
|
||||
|
||||
/* Log traceback info. */
|
||||
PyFrameObject *f = _PyFrame_GetFrameObject(frame);
|
||||
if (f != NULL) {
|
||||
PyTraceBack_Here(f);
|
||||
if (!_PyFrame_IsIncomplete(frame)) {
|
||||
PyFrameObject *f = _PyFrame_GetFrameObject(frame);
|
||||
if (f != NULL) {
|
||||
PyTraceBack_Here(f);
|
||||
}
|
||||
}
|
||||
|
||||
if (tstate->c_tracefunc != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue