-
-
Notifications
You must be signed in to change notification settings - Fork 11k
BUG: Fix refcounting in ufunc object loops #15036
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
Conversation
Previously `func` was leaked on both success and failure paths.
@seberg had a script that could check for leaks with a debug build of python. I wonder why it didn't catch this one. Is this path tested? |
At least to some extent, yes - before my force push, tests failed. |
Nice catch @eric-wieser. The original code leaked a reference, sorry. Merging. |
No need to apologies, I approved the original code too! |
@mattip yes, I was checking this. I do not have a script it is pytest-leaks plugin. And it runs the whole test suit fine with only minor things. It would seem that this path does not have test coverage. (I just ran the whole test suit yesterday, and I think all are known – fairly harmless – leaks (f2py/distutils compilation, things that have to leak and one tiny leak in |
Hmmm, the test seems like it actually does pick it up even before. I might have misremembered the single failure in the ufunc tests. Anyway, some additional tests coming up. |
These loops should give the same results as when run on the equivalent numeric/floatingpoint values. Adds additional tests for numpygh-15036
* TST: Add test for object method (and general unary) loops These loops should give the same results as when run on the equivalent numeric/floatingpoint values. Adds additional tests for gh-15036
Previously
func
was leaked on both success and failure paths.Fixes #14950, hopefully.
This was introduced in #12700, so needs a backport to 1.17, probably. You can create one by clicking this link.