vern@horse.ee.lbl.gov (Vern Paxson) (03/29/91)
This patch fixes a bug which can on some machines lead to bad tables being generated. In general, if your site has the proper conditions for tickling the bug then you almost certainly were unable to install flex (once flex was built it would fail to run, so "make test" would fail completely). I imagine, though, that it's possible to have successfully installed flex and yet still get a bogus scanner generated due to this bug, so it would be wise to incorporate the patch in any case. Sun 3's and 4's appear to be particularly susceptible. Vern Vern Paxson vern@ee.lbl.gov Computer Systems Engineering ucbvax!ee.lbl.gov!vern Lawrence Berkeley Laboratory (415) 486-7504 diff -c Patch-6/Changes Patch-7/Changes *** Patch-6/Changes Wed Aug 29 12:11:34 1990 --- Patch-7/Changes Thu Mar 28 12:02:17 1991 *************** *** 1,3 **** --- 1,11 ---- + Changes between 2.3 Patch #7 (28Mar91) and 2.3 Patch #6: + + - Fixed out-of-bounds array access that caused bad tables + to be produced on machines where the bad reference happened + to yield a 1. This caused problems installing or running + flex on some Suns, in particular. + + Changes between 2.3 Patch #6 (29Aug90) and 2.3 Patch #5: - Fixed a serious bug in yymore() which basically made it diff -c Patch-6/gen.c Patch-7/gen.c *** Patch-6/gen.c Wed Aug 29 12:11:25 1990 --- Patch-7/gen.c Thu Mar 28 12:02:18 1991 *************** *** 28,34 **** #ifndef lint static char rcsid[] = ! "@(#) $Header: /usr/helios/u0/vern/flex/RCS/gen.c,v 2.10 90/08/29 12:11:13 vern Exp $ (LBL)"; #endif #include "flexdef.h" --- 28,34 ---- #ifndef lint static char rcsid[] = ! "@(#) $Header: /home/horse/u0/vern/flex/RCS/gen.c,v 2.12 91/03/28 12:01:38 vern Exp $ (LBL)"; #endif #include "flexdef.h" *************** *** 799,805 **** if ( variable_trailing_context_rules && ! (accnum & YY_TRAILING_HEAD_MASK) && ! accnum > 0 && rule_type[accnum] == RULE_VARIABLE ) { /* special hack to flag accepting number as part --- 799,805 ---- if ( variable_trailing_context_rules && ! (accnum & YY_TRAILING_HEAD_MASK) && ! accnum > 0 && accnum <= num_rules && rule_type[accnum] == RULE_VARIABLE ) { /* special hack to flag accepting number as part