-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
3.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
Description
The static types LineIterator and PositionsIterator in codeobject.c are not finalized at exit leading to memory leak.
Reproducer:
def func() -> None:
pass
print(type(func.__code__.co_positions()).mro())
print(type(func.__code__.co_lines()).mro())Memory leak:
[<class 'positions_iterator'>, <class 'object'>]
[<class 'line_iterator'>, <class 'object'>]
[138 refs, 54 blocks]Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)