[asterisk-bugs] [Asterisk 0016311]: Recursion crash in pbx_ael.c

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Nov 23 08:11:45 CST 2009


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16311 
====================================================================== 
Reported By:                dferrer
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16311
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.27 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-11-23 08:11 CST
Last Modified:              2009-11-23 08:11 CST
====================================================================== 
Summary:                    Recursion crash in pbx_ael.c
Description: 
Attached extensions.ael makes asterisk crash on an 'ael reload'. Only
crashes for recursion >= 7, if delete 1 recursion step it doesn't crash.
Something about this is mentioned in
http://www.voip-info.org/wiki/view/Asterisk+AEL2:
"Macros have a serious limitation, in that one cannot recursively nest
macro calls deeper than 7 levels, due to limitations on thread stack
allocation sizes."

The insteresting thing is that only it crashes if attach via 'asterisk -r'
and do 'ael reload'. If I run within a console 'asterisk -vvvc' (or in tty9
if ran from asterisk init script) it doesn't crash, only crash if in
another tty I attach to asterisk process via asterisk -r. Because of that,
if I use /etc/init.d/asterisk script, pbx_ael.so gets loaded an compiled at
startup, when asterisk loads all its modules, but when I want to reload AEL
it crashes.

Attached bt and AEL code. If this is a thread stack allocation
restriction, I suggest to limit if-recursion to 7 levels, avoiding asterisk
crashes for "malformed" AEL code.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-11-23 08:11 dferrer        New Issue                                    
2009-11-23 08:11 dferrer        Asterisk Version          => 1.4.27          
2009-11-23 08:11 dferrer        Regression                => No              
2009-11-23 08:11 dferrer        SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list