[asterisk-bugs] [Asterisk 0012780]: [patch] logger.c may random crash asterisk on module unload for some OS

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Jun 3 08:22:41 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12780 
====================================================================== 
Reported By:                ys
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   12780
Category:                   PBX/pbx_config
Reproducibility:            random
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 119891 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             06-03-2008 08:13 CDT
Last Modified:              06-03-2008 08:22 CDT
====================================================================== 
Summary:                    [patch] logger.c may random crash asterisk on module
unload for some OS
Description: 

logmsg structure contain file and function pointer, which hold pointer to
file name and function name accordingly.
But memory, which these pointer refer, may be already freed and
inaccessible by logger thread - logger_thread(), if the module is already
unloaded at moment that logger thread call function to print this log
entry.

This mainly affected OS that use constructor/destructor.


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

---------------------------------------------------------------------- 
 svnbot - 06-03-08 08:22  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 119892

U   trunk/main/logger.c

------------------------------------------------------------------------
r119892 | russell | 2008-06-03 08:22:38 -0500 (Tue, 03 Jun 2008) | 9 lines

Do a deep copy of file and function strings to avoid a potential crash
when
modules are unloaded.

(closes issue http://bugs.digium.com/view.php?id=12780)
Reported by: ys
Patches:
      logger.diff uploaded by ys (license 281)
	  -- modified by me for coding guidelines

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

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

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-03-08 08:22  svnbot         Note Added: 0087704                          
======================================================================




More information about the asterisk-bugs mailing list