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
threads leak when detached #10887
Comments
From mmaslano@redhat.comCreated by marca@localhost6.localdomain6Perl appears to leak memory when threads are created and then Version: found on 5.8.8, but it's also reproducible with 5.8.9 Test case: sub ThreadRoutine {} while (1) { It can be tested with attached script measure.pl. After applying Perl Info
|
From mmaslano@redhat.comleak.patchdiff --git a/hv.c b/hv.c
index 0721a14..f581cdb 100644
--- a/hv.c
+++ b/hv.c
@@ -1624,6 +1624,7 @@
/* FIXME - strlen HvNAME */
if(PL_stashcache)
hv_delete(PL_stashcache, name, strlen(name), G_DISCARD);
+ Safefree(HvNAME(hv));
hv_name_set(hv, Nullch, 0, 0);
}
xhv->xhv_max = 7; /* HvMAX(hv) = 7 (it's a normal hash) */
|
From @iabynOn Thu, Dec 09, 2010 at 08:08:42AM -0800, Marcela Maslanova wrote:
But your test code does join rather than detach.
But it's fixed in 5.10.0 onwards, and your patch appears to be against
-- |
The RT System itself - Status changed from 'new' to 'open' |
From mmaslano@redhat.comMy mistake. The original report was about detach, but it was seen better Original test case (with detach): I hope this fix could help users on 5.8.x, but feel free to close it if |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#80484 (status was 'resolved')
Searchable as RT80484$
The text was updated successfully, but these errors were encountered: