[Home]

Summary:ASTERISK-13667: AGI GOSUB command causes crash if no Return in routine.
Reporter:Bryant Zimmerman (zktech)Labels:
Date Opened:2009-02-27 14:27:35.000-0600Date Closed:2009-03-02 11:58:22.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090302__bug14571.diff.txt
( 1) gdb.txt
Description:AGI GOSUB Command
Call the GOSUB from an AGI script.
If the called routine does not have a return in it. Astrisk Crashes Hard.

****** ADDITIONAL INFORMATION ******

Here is an Example

[Fred]
exten => 100,1,NoOp(Fred 100)
exten => 100,n,Ringing()
exten => 100,n,Wait(4)
exten => 100,n,SayAlpha(Fred 100)
exten => 100,n,Return()

exten => 300,1,NoOp(Fred 300)
exten => 300,n,Ringing()
exten => 300,n,Wait(4)
exten => 300,n,SayAlpha(Fred 300)

Works AGI Rx << GOSUB Fred 100, 1
Crashes AGI Rx << GOSUB Fred 300,1

I have tested on 1.6.0.5, 1.6.1 rc-1
Comments:By: Bryant Zimmerman (zktech) 2009-02-27 14:40:13.000-0600

Drop the commas from the AGI Rx << examples if testing. I had a typo when I typed the example.



By: Tilghman Lesher (tilghman) 2009-02-27 14:47:41.000-0600

If you're reporting a crash, you need to follow the instructions in doc/backtrace.txt, as documented in the bug guidelines.

By: Bryant Zimmerman (zktech) 2009-02-28 11:57:59.000-0600

The attached gdb.txt has the bt, bt full, and thread apply all bt. I followed the directions so I thing this should be everything. Thanks for your help.

By: Tilghman Lesher (tilghman) 2009-03-02 10:46:19.000-0600

Actually, you missed the step where you add DONT_OPTIMIZE to the compile flags.  This disambiguates the backtrace.  However, it appears that what you're actually seeing is memory corruption, so I'll additionally need the steps in doc/valgrind.txt followed and the output uploaded here.

By: Digium Subversion (svnbot) 2009-03-02 11:58:21.000-0600

Repository: asterisk
Revision: 179363

U   branches/1.6.0/apps/app_stack.c

------------------------------------------------------------------------
r179363 | tilghman | 2009-03-02 11:58:21 -0600 (Mon, 02 Mar 2009) | 7 lines

KeepAlive application no longer exists, so fix gosub implementation to not use it.
(closes issue ASTERISK-13667)
Reported by: zktech
Patches:
      20090302__bug14571.diff.txt uploaded by tilghman (license 14)
Tested by: tilghman

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

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