[asterisk-bugs] [Asterisk 0013678]: tcptls.c: ast_make_file_from_fd() memory leak if DEBUG_THREADLOCALS defined.

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Dec 16 11:06:25 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13678 
====================================================================== 
Reported By:                ys
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   13678
Category:                   Core/Netsock
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 148469 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-13 09:06 CDT
Last Modified:              2008-12-16 11:06 CST
====================================================================== 
Summary:                    tcptls.c: ast_make_file_from_fd()  memory leak if
DEBUG_THREADLOCALS defined.
Description: 
If i compile and run current asterisk trunk with DEBUG_THREADLOCALS options
enabled, after each "wget http://localhost:8088/" memory usage by utils.c
are increased...






====================================================================== 

---------------------------------------------------------------------- 
 (0096455) svnbot (reporter) - 2008-12-16 11:06
 http://bugs.digium.com/view.php?id=13678#c96455 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 164736

U   branches/1.4/include/asterisk/threadstorage.h
U   branches/1.4/main/threadstorage.c

------------------------------------------------------------------------
r164736 | russell | 2008-12-16 11:06:24 -0600 (Tue, 16 Dec 2008) | 14
lines

Fix memory leak and invalid reporting issues with DEBUG_THREADLOCALS.

One issue was that the ast_mutex_* API was being used within the context
of the
thread local data destructors.  We would go off and allocate more thread
local data
while the pthread lib was in the middle of destroying it all.  This led to
a memory 
leak.

Another issue was an invalid argument being provided to the the object_add
API call.

(closes issue http://bugs.digium.com/view.php?id=13678)
Reported by: ys
Tested by: Russell

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=164736 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-16 11:06 svnbot         Checkin                                      
2008-12-16 11:06 svnbot         Note Added: 0096455                          
======================================================================




More information about the asterisk-bugs mailing list