I wrote:
Prof A Olowofoyeku (The African Chief) wrote:
This is the result:
(gdb) run -famtmpfile=foo -fautomake -fextended-syntax -fignore- function-results -fno-io-checking -fno-stack-checking -fimplicit-result -fdelphi-method- shadowin g cwindows.pas Starting program: f:/mingw/libexec/gcc/mingw32/3.4.5/gpc1.exe - famtmpfile=foo -f automake -fextended-syntax -fignore-function-results -fno-io-checking - fno-stack -checking -fimplicit-result -fdelphi-method-shadowing cwindows.pas
Program received signal SIGSEGV, Segmentation fault. yyprocessOneStack (yystack=0x174fde0, yyk=0, yyposn=1999, yylvalp=0x80c010, yyllocp=0x80c014) at parse.c:8436 8436 parse.c: No such file or directory. in parse.c (gdb) bt #0 yyprocessOneStack (yystack=0x174fde0, yyk=0, yyposn=1999, yylvalp=0x80c010, yyllocp=0x80c014) at parse.c:8436 #1 0x00410f23 in main_yyparse () at parse.c:9345 #2 0x005147be in toplev_main (argc=10, argv=0x122490) at ../../gcc/toplev.c:1822 #3 0x0054f06a in main (argc=10, argv=0x122490) at ../../gcc/main.c:35 (gdb)
Could you at this point print a few relevanat variables:
print yystack->yyspaceLeft
print (yystack->yynextFree - yystack->yyitems)
Line numbers point into Bison parser. I did some more investigation, it seems that parser stack overflows and couses crash. I think I have found bison bug: in some cases Bison fails to check if stack is not full. When I decrease stack size I can get crashes in the testsuite. Still, it would be nice if you can confirm my findings by printing the above values.