BUG: Fix some bugs found via valgrind#30680
Merged
ngoldbaum merged 3 commits intonumpy:mainfrom Jan 22, 2026
Merged
Conversation
seberg
commented
Jan 20, 2026
2031f31 to
b54bca6
Compare
Member
|
@kumaraditya303 If backported there is still 3.11 to consider. |
ngoldbaum
reviewed
Jan 21, 2026
Member
|
Thanks @seberg! |
charris
pushed a commit
to charris/numpy
that referenced
this pull request
Jan 22, 2026
charris
added a commit
that referenced
this pull request
Jan 22, 2026
BUG: Fix some bugs found via valgrind (#30680)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A hodgepodge of reference leaks, mostly small or rather irrelevant stuff (although the unique one is large).
Maybe valgrind has it's ups, it did find a Python issue as well, of course that issue was already fixed in 3.14.2 :).
EDIT: Also note, I have not run valgrind on f2py tests here.
EDIT3: There is also a small leak in
numpy/_core/tests/test_dtype.py::TestUserDType::test_custom_structured_dtype_errors. I am ignoring it (namesis not cleaned up on the last error, because user dtypes are never fully cleaned up and it is too late, but I don't feel like hard-coding partial cleanup there, if would have to do the full cleanup there).Since I have no shame, I used this ridiculous script to parallelize. Your favorite LLM will write a prettier one though easily :).
Details