-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
BUG: Memory leaks in numpy.nested_iters #19400
Copy link
Copy link
Closed
Labels
00 - BugsprintableIssue fits the time-frame and setting of a sprintIssue fits the time-frame and setting of a sprint
Description
This code is generated by a fuzzing testing tool, and I find that the memory use is increasing as the times of calls.
Reproducing code example:
import sys
import tracemalloc
import numpy
memory_recorder = []
tracemalloc.start()
start_snapshot = tracemalloc.take_snapshot()
for i in range(0, 1000):
try:
numpy.nested_iters(['e', 'f'], [[1], [2]])
except: pass
if i % 100 == 0:
one_snapshot = tracemalloc.take_snapshot()
memory_recorder.append(one_snapshot.compare_to(start_snapshot, 'lineno')[0])
for i in range(1, len(memory_recorder)):
print(memory_recorder[i].traceback)
print(memory_recorder[i].size)
print()
tracemalloc.stop()
Error message:
..py:15
16160
..py:15
32160
..py:15
48160
..py:15
64160
..py:15
80160
..py:15
96160
..py:15
112160
..py:15
128160
..py:15
144160
NumPy/Python version information:
In commit 6d9e294
Date: Thu Jul 1 09:42:16 2021
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
00 - BugsprintableIssue fits the time-frame and setting of a sprintIssue fits the time-frame and setting of a sprint