[asterisk-bugs] [Asterisk 0013566]: ast_moh_free_class in res_musiconhold.c:195
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Dec 22 10:17:53 CST 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13566
======================================================================
Reported By: igorcarneiro
Assigned To: russell
======================================================================
Project: Asterisk
Issue ID: 13566
Category: Resources/res_musiconhold
Reproducibility: sometimes
Severity: crash
Priority: normal
Status: closed
Asterisk Version: 1.6.0-rc6
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2008-09-26 13:41 CDT
Last Modified: 2008-12-22 10:17 CST
======================================================================
Summary: ast_moh_free_class in res_musiconhold.c:195
Description:
Segment Fault on asterisk
the back trace is:
gdb /usr/sbin/asterisk /tmp/core.9128
------------------------------------------------------------------------------
Core was generated by `/usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg
-c'.
Program terminated with signal 11, Segmentation fault.
http://bugs.digium.com/view.php?id=0 0x0016cd17 in ast_moh_free_class
(mohclass=0xb7620068) at
res_musiconhold.c:195
195 while ((member = AST_LIST_REMOVE_HEAD(&class->members,
list)))
------------------------------------------------------------------------------
the function with problema is ast_moh_free_class
section res_musiconhold.c:195
------------------------------------------------------------------------------
static void ast_moh_free_class(struct mohclass **mohclass)
{
struct mohdata *member;
struct mohclass *class = *mohclass;
int i;
while ((member = AST_LIST_REMOVE_HEAD(&class->members, list)))
ast_free(member);
if (class->thread) {
pthread_cancel(class->thread);
class->thread = 0;
}
if (class->filearray) {
for (i = 0; i < class->total_files; i++)
ast_free(class->filearray[i]);
ast_free(class->filearray);
}
ast_free(class);
*mohclass = NULL;
}
------------------------------------------------------------------------------
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
has duplicate 0013567 Segment Fault in asterisk "pthread...
======================================================================
----------------------------------------------------------------------
(0096797) svnbot (reporter) - 2008-12-22 10:17
http://bugs.digium.com/view.php?id=13566#c96797
----------------------------------------------------------------------
Repository: asterisk
Revision: 166276
_U branches/1.6.0/
U branches/1.6.0/res/res_musiconhold.c
------------------------------------------------------------------------
r166276 | russell | 2008-12-22 10:17:52 -0600 (Mon, 22 Dec 2008) | 15
lines
Merged revisions 166273 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r166273 | russell | 2008-12-22 10:10:40 -0600 (Mon, 22 Dec 2008) | 7 lines
Re-work ref count handling of MoH classes using astobj2 to resolve
crashes.
(closes issue http://bugs.digium.com/view.php?id=13566)
Reported by: igorcarneiro
Tested by: russell
Review: http://reviewboard.digium.com/r/106/
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=166276
Issue History
Date Modified Username Field Change
======================================================================
2008-12-22 10:17 svnbot Checkin
2008-12-22 10:17 svnbot Note Added: 0096797
======================================================================
More information about the asterisk-bugs
mailing list