[asterisk-bugs] [Asterisk 0013593]: [patch] MALLOC_DEBUG causes crash in chan_h323

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Mar 10 23:06:46 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13593 
====================================================================== 
Reported By:                pj
Assigned To:                jpeeler
====================================================================== 
Project:                    Asterisk
Issue ID:                   13593
Category:                   Core/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 145487 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-10-01 14:32 CDT
Last Modified:              2009-03-10 23:06 CDT
====================================================================== 
Summary:                    [patch] MALLOC_DEBUG causes crash in chan_h323
Description: 
When asterisk is compiled also with MALLOC_DEBUG, asterisk crashes after
sip-h323 call is answered. Other debug options like DONT_OPTIMIZE
DEBUG_THREADS DEBUG_CHANNEL_LOCKS doesn't have impact to crash.
Another my asterisk system (SVN-trunk-r141949) is working fine with
chan_h323, even if MALLOC_DEBUG is enabled.

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

---------------------------------------------------------------------- 
 (0101509) svnbot (reporter) - 2009-03-10 23:06
 http://bugs.digium.com/view.php?id=13593#c101509 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 181135

U   trunk/channels/chan_sip.c
U   trunk/channels/h323/ast_h323.cxx
U   trunk/include/asterisk/astmm.h
U   trunk/include/asterisk/utils.h
U   trunk/main/features.c
U   trunk/pbx/pbx_config.c
U   trunk/utils/Makefile
U   trunk/utils/extconf.c

------------------------------------------------------------------------
r181135 | jpeeler | 2009-03-10 23:06:45 -0500 (Tue, 10 Mar 2009) | 20
lines

Fix malloc debug macros to work properly with h323.

The main problem here was that cstdlib was undefining free thereby causing
the
proper debug macros to not be used. ast_h323.cxx has been changed to call
ast_free instead to avoid the issue. 

A few other issues were addressed:
- There were a few instances of functions improperly passing ast_free
instead
of ast_free_ptr.
- Some clean up was done to avoid the debug macros intentionally being
redefined.
(copied below from Kevin's commit, appreciate the help)
- disable astmm.h from doing anything when STANDALONE is defined, which is
used
by the tools in the utils/ directory that use parts of Asterisk header
files in
hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are
compiled with STANDALONE defined.

(closes issue http://bugs.digium.com/view.php?id=13593)
Reported by: pj


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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-03-10 23:06 svnbot         Checkin                                      
2009-03-10 23:06 svnbot         Note Added: 0101509                          
======================================================================




More information about the asterisk-bugs mailing list