Skip to content

BUG: Fix leak of void scalar buffer info #12784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 17, 2019

Conversation

charris
Copy link
Member

@charris charris commented Jan 17, 2019

Backport of #12696.

The void scalar was missing the clearing logic for the buffer info
cache (or storage).

It should maybe be checked whether we can replace all of this logic
when not supporting Python 2 anymore.


This is a followup on gh-12624. After this, the test suit should be clean in the sense of valgrind definitely lost leaks (except for the outstanding gh-12650 and more tricky gh-12633 for f2py) [1]. I think if we drop python 2, there may be a reorganizing happening here anyway. Also I am not sure if Matti's changes touch similar things (but doubt it). There is a similar path for object, but I do not think those really exists?!

[1] Note that there is still a "leak" (detected, but not true) of one or two buffer info's, because the singletons np.bool_(True) and np.bool_(False) get never cleared, and so their cached buffer_info also does not get cleared.

The vois scalar was missing the clearing logic for the buffer info
cache (or storage).

It should maybe be checked whether we can replace all of this logic
when not supporting Python 2 anymore.
When the buffer was created and an error was found during the format
string construction, the buffer was not freed correctly.
@charris charris added this to the 1.16.1 release milestone Jan 17, 2019
@charris charris merged commit e9fa679 into numpy:maintenance/1.16.x Jan 17, 2019
@charris charris deleted the backport-12696 branch January 17, 2019 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants