Summary:ASTERISK-09100: A segmentation fault occurs when two context have the same name
Reporter:Mathieu Rene (math)Labels:
Date Opened:2007-03-25 23:23:53Date Closed:2007-03-27 13:23:52
Versions:Frequency of
Environment:Attachments:( 0) btfull.txt
Description:Defining two contexts with the same name crashes asterisk instead of just failing AEL2 compile.


Full backtrace attached
Comments:By: Steve Murphy (murf) 2007-03-26 16:38:17

You probably won't like this, but I turned a duplicate context from a warning to an error. The result will be a module load failure, and asterisk will not start at all.

By: Mathieu Rene (math) 2007-03-26 16:41:42

so this way if somebody does an ael reload its not gonna crash and drop all calls?

By: Steve Murphy (murf) 2007-03-26 16:48:08

fix in 1.4, 59228.
  in trunk, 59233.

By: Steve Murphy (murf) 2007-03-26 16:55:53

Test the changes and see... it would seem a bit excessive to have all of Asterisk stop on a module load failure! I can DENY loading instead, if that will help.

The absolute best thing to do is use aelparse before you give the .ael file to asterisk. That's already well documented! You don't have to give asterisk a defective dialplan, and you don't have to use asterisk to find out if you have a problem!

By: Steve Murphy (murf) 2007-03-26 17:05:04

Just tested... with the above fixes, at run-time, the FAIL will stop asterisk from coming up. That may be just as well.

But after asterisk is running, if you change the .ael file, and introduce an error, and do an "ael reload", the FAIL will not cause Asterisk to abort. That's

By: Steve Murphy (murf) 2007-03-27 13:23:52

kpfleming advises I return DECLINE when AEL has errors instead of FAIL.

This will not abort asterisk as it did previously.

See r. 59264 (trunk) and r. 59261 (1.4).