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
Memory leak when called function raises error #8689
Comments
Thanks for the report. Unfortunately this is known behaviour, Numba doesn't implement unwinding etc to permit clean up. Thankfully, if performance is the goal, this doesn't often cause a great deal of impact as exceptions should occur only in "exceptional" circumstances and are not typically used in standard control flow decisions i.e. exception raised causes leak, but program also halts. RE: the first example containing the I think "solving" this problem is likely to be quite involved. |
Is this documented somewhere? I searched before creating the issue. I do agree that it's probably not too important, but it might confuse others, too |
I think this statement in the docs intends to cover it: numba/docs/source/reference/pysemantics.rst Lines 21 to 28 in 61e4b01
|
xref: #1549 (duplicate). |
Ok, I missed that ones. Sorry for the effort. I guess we can close the issue then? |
No problem. I'll close this as a duplicate. Thanks! |
Reporting a bug
visible in the change log (https://github.com/numba/numba/blob/main/CHANGE_LOG).
i.e. it's possible to run as 'python bug.py'.
Prints:
I'm not 100% sure, but I think it's also causing leaks when calling np.argmin or np.argmax with the axis argument and a 0-length sequence:
printing:
The text was updated successfully, but these errors were encountered: