-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Reference leak in code object with reference loop #148722
Copy link
Copy link
Open
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
If the code object creates a reference loop, this causes a reference leak. For example (see :
(See
cpython/Lib/test/test_marshal.py
Lines 354 to 360 in d61fcf8
This is because in the GIL-enabled build the code object does not support GC and does not have
tp_traverse.