Skip to content

Commit 0780c36

Browse files
Fix dump_item to check is the item valid or no
1 parent e0ff9f8 commit 0780c36

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/ceval.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ dump_item(_PyStackRef item)
160160
printf("<NULL>");
161161
return;
162162
}
163+
if (PyStackRef_IsError(item)) {
164+
printf("<INVALID>");
165+
return;
166+
}
163167
if (PyStackRef_IsTaggedInt(item)) {
164168
printf("%" PRId64, (int64_t)PyStackRef_UntagInt(item));
165169
return;

0 commit comments

Comments
 (0)