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 Leaks #547
Comments
This is with version 1.001009. I've not checked other versions. |
I will check against the latest master, if there are no leaks in master I will move this to the backlog, and close it when the new stuff is released. The variable in question is shared for threads, so that may have something to do with it. Master does not use shared variables anymore. But I am getting ahead of myself. |
Test::LeakTrace complained about state variables in some modules that I am working on, but I've not been able to isolate a simple test case to submit as a bug for that. But I did find changing the "state" vars to global "my" vars fixed complaints about those particular variables. (It wasn't ideal, so I've stopped using it on a project.) |
If it's an easy fix for 1.001009, I think it's worth doing another stable release to fix it. |
I would happily accept any patches that fix this. I am not sure when I am going to have a chance to dig into it myself. I will do so as soon as I can make the time. |
This test also fails on master, but with different/more leaks. |
oh, I think I know the issue in both cases. And it cannot be fixed. Test::Builder (old and new) stores all results in an internal structure for later inspection. That is what is leaking in the old version. In the new version we get the same leak, but it results in more objects leaked. However the legacy behavior is deprecated and can be turned off (is on by default) in the new stuff.
When that is used before the test runs there are no leaks on the new stuff. There is no such toggle for the old stuff. Disabling the behavior will make anything that uses Test::Tester fail to run. I have not yet looked at the leak check module in question, I will do so to see if I can find why this is considered a leak. |
That is from the module. That defines leaks as any variables created in the scope that last past the scope. It is run multiple times to filter out globals and such.. but since the block produces results each time, and stores them, it will always appear to have a leak. This is not actually a leak, it is a defined, expected, and necessary behavior. |
If someone can confirm my findings I will go ahead and close the ticket. |
talked in #toolchain, there is not anything we can do for this right now. |
The following code:
returns the following output:
The text was updated successfully, but these errors were encountered: