Summary: | ASTERISK-11357: Wrong error file shown if includes used | ||
Reporter: | Atis Lezdins (atis) | Labels: | |
Date Opened: | 2008-02-01 12:35:33.000-0600 | Date Closed: | 2008-03-18 10:10:12 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | PBX/pbx_ael |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) extensions_2.ael ( 1) extensions.ael | |
Description: | I have a bug in extensions.ael that includes extensions_2.ael (but that is ok), however aelparse says that bug is in extensions_2.ael Line numbers indicating bug are from extensions.ael See .ael files attached. Buggy for both 1.4 and trunk. Just tested - the same is valid when loading ael in asterisk, so it's general AEL processing bug ****** ADDITIONAL INFORMATION ****** [atis@ast-dev14 utils]$ [atis@ast-dev14 a]$ ./aelparse -d (If you find progress and other non-error messages irritating, you can use -q to suppress them) (You can use the -n option if you aren't interested in seeing all the instructions generated by the compiler) (You can use the -w option to dump extensions.conf format to extensions.conf.aeldump) LOG: lev:2 file:pbx_ael.c line:113 func: pbx_load_module Starting AEL load process. LOG: lev:2 file:ael.flex line:672 func: setup_filestack --Read in included file ././extensions_2.ael, 83 chars LOG: lev:4 file:ael.y line:772 func: ael_yyerror ==== File: ././extensions_2.ael, Line 9, Cols: 11-11: Error: syntax error, unexpected '(', expecting '{' LOG: lev:2 file:pbx_ael.c line:126 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. LOG: lev:4 file:pbx_ael.c line:139 func: pbx_load_module Sorry, but 1 syntax errors and 0 semantic errors were detected. It doesn't make sense to compile. LOG: lev:4 file:ael2_parse line:542 func: main 0 contexts, 0 extensions, 0 priorities [Feb 1 10:36:16] NOTICE[653] pbx_ael.c: Starting AEL load process. [Feb 1 10:36:16] NOTICE[653] pbx_ael.c: AEL load process: calculated config file name '/etc/asterisk/extensions.ael'. [Feb 1 10:36:16] NOTICE[653] ael.flex: --Read in included file /etc/asterisk/extensions_2.ael, 83 chars [Feb 1 10:36:16] ERROR[653] ael.y: ==== File: /etc/asterisk/extensions_2.ael, Line 9, Cols: 11-11: Error: syntax error, unexpected '(', expecting '{' [Feb 1 10:36:16] NOTICE[653] pbx_ael.c: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'. [Feb 1 10:36:16] ERROR[653] pbx_ael.c: Sorry, but 1 syntax errors and 0 semantic errors were detected. It doesn't make sense to compile. | ||
Comments: | By: Digium Subversion (svnbot) 2008-03-18 01:33:10 Repository: asterisk Revision: 109309 A branches/1.4/pbx/ael/ael-test/ael-ntest23/ A branches/1.4/pbx/ael/ael-test/ael-ntest23/extensions.ael A branches/1.4/pbx/ael/ael-test/ael-ntest23/qq.ael A branches/1.4/pbx/ael/ael-test/ael-ntest23/t1/ A branches/1.4/pbx/ael/ael-test/ael-ntest23/t1/a.ael A branches/1.4/pbx/ael/ael-test/ael-ntest23/t1/b.ael A branches/1.4/pbx/ael/ael-test/ael-ntest23/t1/c.ael A branches/1.4/pbx/ael/ael-test/ael-ntest23/t2/ A branches/1.4/pbx/ael/ael-test/ael-ntest23/t2/d.ael A branches/1.4/pbx/ael/ael-test/ael-ntest23/t2/e.ael A branches/1.4/pbx/ael/ael-test/ael-ntest23/t2/f.ael A branches/1.4/pbx/ael/ael-test/ael-ntest23/t3/ A branches/1.4/pbx/ael/ael-test/ael-ntest23/t3/g.ael A branches/1.4/pbx/ael/ael-test/ael-ntest23/t3/h.ael A branches/1.4/pbx/ael/ael-test/ael-ntest23/t3/i.ael A branches/1.4/pbx/ael/ael-test/ael-ntest23/t3/j.ael A branches/1.4/pbx/ael/ael-test/ref.ael-ntest23 U branches/1.4/pbx/ael/ael.flex U branches/1.4/pbx/ael/ael_lex.c ------------------------------------------------------------------------ r109309 | murf | 2008-03-18 01:33:08 -0500 (Tue, 18 Mar 2008) | 17 lines (closes issue ASTERISK-11357) Reported by: atis Many thanks to atis for spotting this problem and reporting it. The fix was to straighten out how items are placed on and removed from the file stack. Regressions as well as the provided test case helped to straighten out all code paths. valgrind was used to make sure all memory allocated was freed. Sorry for not solving this earlier. I got distracted. Added the ntest23 regression test, which is mainly a copy of ntest22, but with a few juicy errors thrown in, to replicate the kind of error that atis spotted. ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=109309 By: Digium Subversion (svnbot) 2008-03-18 09:05:42 Repository: asterisk Revision: 109357 _U trunk/ U trunk/include/asterisk/extconf.h A trunk/pbx/ael/ael-test/ael-ntest23/ D trunk/pbx/ael/ael-test/ael-ntest23/extensions.ael A trunk/pbx/ael/ael-test/ael-ntest23/extensions.ael D trunk/pbx/ael/ael-test/ael-ntest23/qq.ael A trunk/pbx/ael/ael-test/ael-ntest23/qq.ael D trunk/pbx/ael/ael-test/ael-ntest23/t1/ A trunk/pbx/ael/ael-test/ael-ntest23/t1/ D trunk/pbx/ael/ael-test/ael-ntest23/t1/a.ael A trunk/pbx/ael/ael-test/ael-ntest23/t1/a.ael D trunk/pbx/ael/ael-test/ael-ntest23/t1/b.ael A trunk/pbx/ael/ael-test/ael-ntest23/t1/b.ael D trunk/pbx/ael/ael-test/ael-ntest23/t1/c.ael A trunk/pbx/ael/ael-test/ael-ntest23/t1/c.ael D trunk/pbx/ael/ael-test/ael-ntest23/t2/ A trunk/pbx/ael/ael-test/ael-ntest23/t2/ D trunk/pbx/ael/ael-test/ael-ntest23/t2/d.ael A trunk/pbx/ael/ael-test/ael-ntest23/t2/d.ael D trunk/pbx/ael/ael-test/ael-ntest23/t2/e.ael A trunk/pbx/ael/ael-test/ael-ntest23/t2/e.ael D trunk/pbx/ael/ael-test/ael-ntest23/t2/f.ael A trunk/pbx/ael/ael-test/ael-ntest23/t2/f.ael D trunk/pbx/ael/ael-test/ael-ntest23/t3/ A trunk/pbx/ael/ael-test/ael-ntest23/t3/ D trunk/pbx/ael/ael-test/ael-ntest23/t3/g.ael A trunk/pbx/ael/ael-test/ael-ntest23/t3/g.ael D trunk/pbx/ael/ael-test/ael-ntest23/t3/h.ael A trunk/pbx/ael/ael-test/ael-ntest23/t3/h.ael D trunk/pbx/ael/ael-test/ael-ntest23/t3/i.ael A trunk/pbx/ael/ael-test/ael-ntest23/t3/i.ael D trunk/pbx/ael/ael-test/ael-ntest23/t3/j.ael A trunk/pbx/ael/ael-test/ael-ntest23/t3/j.ael A trunk/pbx/ael/ael-test/ref.ael-ntest23 U trunk/res/ael/ael.flex U trunk/res/ael/ael_lex.c U trunk/utils/ael_main.c U trunk/utils/conf2ael.c U trunk/utils/extconf.c ------------------------------------------------------------------------ r109357 | murf | 2008-03-18 09:05:41 -0500 (Tue, 18 Mar 2008) | 25 lines Merged revisions 109309 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r109309 | murf | 2008-03-18 00:37:15 -0600 (Tue, 18 Mar 2008) | 17 lines (closes issue ASTERISK-11357) Reported by: atis Many thanks to atis for spotting this problem and reporting it. The fix was to straighten out how items are placed on and removed from the file stack. Regressions as well as the provided test case helped to straighten out all code paths. valgrind was used to make sure all memory allocated was freed. Sorry for not solving this earlier. I got distracted. Added the ntest23 regression test, which is mainly a copy of ntest22, but with a few juicy errors thrown in, to replicate the kind of error that atis spotted. ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=109357 By: Digium Subversion (svnbot) 2008-03-18 10:10:12 Repository: asterisk Revision: 109397 _U branches/1.6.0/ A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/ D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/extensions.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/extensions.ael D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/qq.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/qq.ael D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t1/ A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t1/ D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t1/a.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t1/a.ael D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t1/b.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t1/b.ael D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t1/c.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t1/c.ael D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t2/ A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t2/ D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t2/d.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t2/d.ael D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t2/e.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t2/e.ael D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t2/f.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t2/f.ael D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t3/ A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t3/ D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t3/g.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t3/g.ael D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t3/h.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t3/h.ael D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t3/i.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t3/i.ael D branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t3/j.ael A branches/1.6.0/pbx/ael/ael-test/ael-ntest23/t3/j.ael A branches/1.6.0/pbx/ael/ael-test/ref.ael-ntest23 U branches/1.6.0/res/ael/ael.flex U branches/1.6.0/res/ael/ael_lex.c ------------------------------------------------------------------------ r109397 | murf | 2008-03-18 10:10:10 -0500 (Tue, 18 Mar 2008) | 33 lines Merged revisions 109357 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r109357 | murf | 2008-03-18 08:09:50 -0600 (Tue, 18 Mar 2008) | 25 lines Merged revisions 109309 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r109309 | murf | 2008-03-18 00:37:15 -0600 (Tue, 18 Mar 2008) | 17 lines (closes issue ASTERISK-11357) Reported by: atis Many thanks to atis for spotting this problem and reporting it. The fix was to straighten out how items are placed on and removed from the file stack. Regressions as well as the provided test case helped to straighten out all code paths. valgrind was used to make sure all memory allocated was freed. Sorry for not solving this earlier. I got distracted. Added the ntest23 regression test, which is mainly a copy of ntest22, but with a few juicy errors thrown in, to replicate the kind of error that atis spotted. ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=109397 |