[Home]

Summary:ASTERISK-15505: [patch] Crash in res_agi when trying to send application usage
Reporter:Ben Klang (bklang)Labels:
Date Opened:2010-01-24 23:55:52.000-0600Date Closed:2010-07-14 13:37:02
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Resources/res_agi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20100209__issue16689__with_tests.diff.txt
( 1) 20100209__issue16689.diff.txt
( 2) gdb.log
Description:I believe this bug is related to the fact that my console documentation is not loaded (see bug ASTERISK-15504).

When sending an invalid AGI command to Asterisk, the system attempts to return usage information for the requested application.  Based on my reading of the crash information from gdb, because the console documentation is not loaded, the usage information is not available (c->usage is uninitialized).  On my system, this causes a segfault when it is referenced.

I have attached output from gdb (bt; bt full; thread apply all bt full).
Comments:By: Ben Klang (bklang) 2010-02-09 15:19:50.000-0600

Tilghman: It looks like there is a typo in your patch at res/res_agi.c near line 1006.  AST_LIST_LOCK() was changed to ST_LIST_LOCK().

I'm applying your patch to my system and will test it over the next few days.

By: Digium Subversion (svnbot) 2010-02-10 10:01:29.000-0600

Repository: asterisk
Revision: 246030

U   trunk/configure
U   trunk/configure.ac
U   trunk/include/asterisk/autoconfig.h.in
U   trunk/res/res_agi.c

------------------------------------------------------------------------
r246030 | tilghman | 2010-02-10 10:01:28 -0600 (Wed, 10 Feb 2010) | 12 lines

Solaris doesn't like outputting a NULL to a %s in format strings.

Detect all platforms that don't like that, either, and ensure that when documentation is
missing, we pass a non-NULL pointer when outputting the corresponding documentation.

(closes issue ASTERISK-15505)
Reported by: bklang
Patches:
      20100209__issue16689__with_tests.diff.txt uploaded by tilghman (license 14)

Review: https://reviewboard.asterisk.org/r/497/

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

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

By: Digium Subversion (svnbot) 2010-02-10 13:49:19.000-0600

Repository: asterisk
Revision: 246199

_U  branches/1.6.2/
U   branches/1.6.2/configure
U   branches/1.6.2/configure.ac
U   branches/1.6.2/include/asterisk/autoconfig.h.in
U   branches/1.6.2/res/res_agi.c

------------------------------------------------------------------------
r246199 | tilghman | 2010-02-10 13:49:19 -0600 (Wed, 10 Feb 2010) | 19 lines

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

........
 r246030 | tilghman | 2010-02-10 10:01:28 -0600 (Wed, 10 Feb 2010) | 12 lines
 
 Solaris doesn't like outputting a NULL to a %s in format strings.
 
 Detect all platforms that don't like that, either, and ensure that when documentation is
 missing, we pass a non-NULL pointer when outputting the corresponding documentation.
 
 (closes issue ASTERISK-15505)
  Reported by: bklang
  Patches:
        20100209__issue16689__with_tests.diff.txt uploaded by tilghman (license 14)
 
 Review: https://reviewboard.asterisk.org/r/497/
........

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

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