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
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;