Sorry that I missed something important: First I suspected that there is something wrong with the C lib function strlen(). Then I wrote a small C program to read in the whole script file, put it in a string and checked if it would crash using strlen(). Fortunately, it didnot. So I decided that there may be something wrong with the code in SWFC. Maybe it's because of the preprocessing of the script file, maybe. Besides, not only the strlen() but also the printf() function would crash in the readToken(). The printf() didnot cause the small C program to crash either. Thanks, Liang
-----Original----- >From : Ricardo Pedroso [mailto:[email protected]] Date : Tuesday, November 17, 2009 7:27 AM To : swftools-common Cc : WU Liang Subject : Re: [Swftools-common] SWFC crashes encountered on Linux On Mon, Nov 16, 2009 at 11:29 AM, WU Liang <[email protected]> wrote: > Hi, nice guys, > > I just ran into a crash when using SWFC to compile a SWF file. > The source image is downloaded from: > http://www.swftools.org/swftools-2009-08-24-2042.tar.gz > > I just checked the Win32 version; it works fine. > > I put some printfs in the function readToken() where SWFC crashed. > Seemingly the crash occurred in the C lib function strlen(). > Refer to the script file I used for your information. > It crashes if str_3096 and more variables are added to the script, but > it works fine within str_3095. > I tested many times. Similar results were produced. > Seemingly there is a buffer limit somewhere. It's working for me, it didn't crash with 3096+ vars Maybe it's worth to check your environment limits with: ulimit -a This is the output of my laptop, for you to compare with yours: rica...@laptop:~$ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 20 file size (blocks, -f) unlimited pending signals (-i) 16382 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) unlimited virtual memory (kbytes, -v) unlimited file locks (-x) unlimited Regards, Ricardo
