Summary:ASTERISK-16177: segfault in for loop embedded switch statement
Reporter:var (var)Labels:
Date Opened:2010-05-31 22:50:53Date Closed:2010-06-01 09:25:08
Versions:Frequency of
Description:In extensions.ael, when utilising a for loop and an embedded switch statement, it is possible to cause a segmentation fault loading Asterisk (or aelparse) when trying to 'continue;' or 'break;' the for loop within the switch statement.

This seems to be a conditional sort of bug, it seems to segfault more on 'continue;' than 'break;', but it can pass some switch based 'break;' executions. This has been reproduced on and on separate computers.

Debian 5.0.4 x86
Ubuntu 10.04 x86


Code example:

   for (x=0; ${x} < ${MAXTRY}; x=${x} + 1) {

       // fail attempt if no DTMF entered
       if(${ISNULL(${DEMO})}) {

       // automated check of demo input

       // demo check fail or pass
       if (${GOSUB_RETVAL} == 1) {
       else {
           // demo is correct, playback demo input


           switch (${VALID}) {
               case 1:
               case 2:
Comments:By: Paul Belanger (pabelanger) 2010-06-01 09:24:56

Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. Thanks!