[Home]

Summary:ASTERISK-15200: segfault in "core show functions"
Reporter:Bruce McAlister (asgaroth)Labels:
Date Opened:2009-11-23 06:23:35.000-0600Date Closed:2010-01-17 13:47:49.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Functions/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-1.6.0.18_gdb_bt_full.txt
( 1) asterisk-1.6.0.18_gdb_bt.txt
( 2) asterisk-1.6.0.18_gdb_thread_apply_all_bt.txt
Description:Whenever I perform a "core show functions" in the asterisk CLI, asterisk crashes with a segfault, see below:

*CLI> core show functions
Installed Custom Functions:
--------------------------------------------------------------------------------
AGENT                 AGENT(<agentid>[:item])              Gets information about an Agent
ARRAY                 ARRAY(var1[,var2[...][,varN]])       Allows setting multiple variables at once
AUDIOHOOK_INHERIT     AUDIOHOOK_INHERIT(source)            Set whether an audiohook may be inherited to another channel
BASE64_DECODE         BASE64_DECODE(<base64_string>)       Decode a base64 string
BASE64_ENCODE         BASE64_ENCODE(<string>)              Encode a string in base64
BLACKLIST             BLACKLIST()                          Check if the callerid is on the blacklist
CALLERID              CALLERID(datatype[,<optional-CID>])  Gets or sets Caller*ID data on the channel.
CALLERPRES            CALLERPRES()                         Gets or sets Caller*ID presentation on the channel.
CDR                   CDR(<name>[,options])                Gets or sets a CDR variable
CHANNEL               CHANNEL(item)                        Gets/sets various pieces of information about the channel.
CHECKSIPDOMAIN        CHECKSIPDOMAIN(<domain|IP>)          Checks if domain is a local domain
Segmentation Fault - core dumped
Comments:By: Bruce McAlister (asgaroth) 2009-11-23 06:32:54.000-0600

Could this issue (or fix) be related to bugid 16193? A short description of what snuffy mentioned in that bug:

--
This is most likely another place where we are strlen() on a null string.
One of these was fixed not too long ago using 'S_OR()' for a printf.
--



By: Leif Madsen (lmadsen) 2009-11-23 18:48:35.000-0600

Yes, it is probably likely. Solaris does not respect NULL's correctly, and thus it causes issues like this one. Other operating systems such as Linux do not have this issue, which is why we don't see these types of crash issues.

I am going to acknowledge this issue for now, and someone will get to it as time permits. Thanks!

By: Digium Subversion (svnbot) 2010-01-17 13:45:50.000-0600

Repository: asterisk
Revision: 240717

U   trunk/main/pbx.c

------------------------------------------------------------------------
r240717 | seanbright | 2010-01-17 13:45:49 -0600 (Sun, 17 Jan 2010) | 5 lines

Avoid a crash on Solaris when running 'core show functions.'

(closes issue ASTERISK-15200)
Reported by: asgaroth

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

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

By: Digium Subversion (svnbot) 2010-01-17 13:47:44.000-0600

Repository: asterisk
Revision: 240718

_U  branches/1.6.0/
U   branches/1.6.0/main/pbx.c

------------------------------------------------------------------------
r240718 | seanbright | 2010-01-17 13:47:44 -0600 (Sun, 17 Jan 2010) | 12 lines

Merged revisions 240717 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r240717 | seanbright | 2010-01-17 14:45:48 -0500 (Sun, 17 Jan 2010) | 5 lines
 
 Avoid a crash on Solaris when running 'core show functions.'
 
 (closes issue ASTERISK-15200)
 Reported by: asgaroth
........

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

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

By: Digium Subversion (svnbot) 2010-01-17 13:47:46.000-0600

Repository: asterisk
Revision: 240719

_U  branches/1.6.1/
U   branches/1.6.1/main/pbx.c

------------------------------------------------------------------------
r240719 | seanbright | 2010-01-17 13:47:46 -0600 (Sun, 17 Jan 2010) | 12 lines

Merged revisions 240717 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r240717 | seanbright | 2010-01-17 14:45:48 -0500 (Sun, 17 Jan 2010) | 5 lines
 
 Avoid a crash on Solaris when running 'core show functions.'
 
 (closes issue ASTERISK-15200)
 Reported by: asgaroth
........

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

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

By: Digium Subversion (svnbot) 2010-01-17 13:47:48.000-0600

Repository: asterisk
Revision: 240720

_U  branches/1.6.2/
U   branches/1.6.2/main/pbx.c

------------------------------------------------------------------------
r240720 | seanbright | 2010-01-17 13:47:48 -0600 (Sun, 17 Jan 2010) | 12 lines

Merged revisions 240717 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r240717 | seanbright | 2010-01-17 14:45:48 -0500 (Sun, 17 Jan 2010) | 5 lines
 
 Avoid a crash on Solaris when running 'core show functions.'
 
 (closes issue ASTERISK-15200)
 Reported by: asgaroth
........

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

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