GH-139193: Fix dump_stack when PYTHON_LLTRACE=4 (GH-139384)

This commit is contained in:
Sergey Miryanov 2025-10-22 18:14:25 +05:00 committed by GitHub
parent e53e9eb2f1
commit a4709e525f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -160,6 +160,10 @@ dump_item(_PyStackRef item)
printf("<NULL>");
return;
}
if (PyStackRef_IsMalformed(item)) {
printf("<INVALID>");
return;
}
if (PyStackRef_IsTaggedInt(item)) {
printf("%" PRId64, (int64_t)PyStackRef_UntagInt(item));
return;