Summary:ASTERISK-04715: [patch] AEL seems to have a maximum character limit
Reporter:tgledhill (tgledhill)Labels:
Date Opened:2005-07-27 20:30:43Date Closed:2008-01-15 15:43:22.000-0600
Versions:Frequency of
Environment:Attachments:( 0) 20050728__pbx_ael__buffer_fix.diff.txt
( 1) extensions.ael.test
( 2) pbx_ael.diff
Description:AEL seems to have a maximum character limit although the limit seems to vary.

I have attached a file full of Waits that causes Asterisk to hang.  This file is 4542 bytes and changing the file to 4541 bytes allows it to parse the file again.

On a different file, the byte limit was a little higher, but we still experience the same problem just by adding or deleting a single character.

Comments:By: tgledhill (tgledhill) 2005-07-27 20:38:22

There is the vim line on the bottom, but it still crashed when I took that out.

By: Clod Patry (junky) 2005-07-27 21:28:16

Did you know you could use a loop or something else like Wait(150); ?

By: tgledhill (tgledhill) 2005-07-27 21:37:03

I added a patch where I doubled the size of the buffer.  Is this the correct way to fix this?  Why was the limit set so low (4096)?

By: tgledhill (tgledhill) 2005-07-27 21:38:42

I suspect it will still crash if I exceed the buffer limit.

By: tgledhill (tgledhill) 2005-07-27 21:39:53

Junky:  That was just a demonstration of how to reproduce the problem.  That was not a real scenario.  It happens in my real scripts, but I prefer not to post the whole thing here.

By: Tilghman Lesher (tilghman) 2005-07-28 01:01:45

Why are we even allocating a buffer that small, when we can just do a stat(2) and learn the size of the file, and allocate that size?  After all, we're not overwriting lines already processed; instead, we're concatenating onto the end of the string.

See rewrite of the line reading and processing code.

By: Terry Wilson (twilson) 2005-08-01 14:28:11

Anyone know where we are on getting this fixed in CVS?

By: Tilghman Lesher (tilghman) 2005-08-01 15:12:55

We need people to apply the patch and test it.

By: tgledhill (tgledhill) 2005-08-01 21:23:39

I'll be out of town until next week.  I can test it when I get back.

By: Mark Spencer (markster) 2005-08-02 22:22:39

Fixed in CVS head.  Patch was much simpler.

By: Digium Subversion (svnbot) 2008-01-15 15:43:22.000-0600

Repository: asterisk
Revision: 6259

U   trunk/pbx/pbx_ael.c

r6259 | markster | 2008-01-15 15:43:22 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix AEL max character bug (bug ASTERISK-4715)