fix(python): walk slice members in the code hashability stack

The key resolver followed slice members, but the explicit-stack hashability
walk skipped them, so a code object reached through a slice constant started
a recursive hashability check. A 3,000-link slice-wrapped TYPE_REF code chain
overflowed the JavaScript stack. Push slice members onto the same explicit
stack as tuple and frozenset members.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
This commit is contained in:
gensokyo-devandgensokyo-dev authored and Ysopwnable committed 2026-11-14 13:37:55 +01:00
1 parent ca147d7c4d
commit 2caa2598d3
2 files changed
+44 -1

No files matched your search

+3 -1
View File
@@ -1413,7 +1413,9 @@ class MarshalReader {
malformed("Code object is missing equality material.")
).constsTuple,
]
: value.kind === "tuple" || value.kind === "frozenset"
: value.kind === "tuple" ||
value.kind === "frozenset" ||
value.kind === "slice"
? value.items
: [];
gray.add(identity);