Article View: comp.bugs.4bsd
Article #459"awk" drops core on many syntax errors
From: Guy Harris
Date: Sat, 10 Jan 1987 05:09
Date: Sat, 10 Jan 1987 05:09
32 lines
1483 bytes
1483 bytes
Index: bin/awk/awk.g.y 4.3BSD
Description:
In a number of cases, "awk" will drop core when it encounters
a syntax error. If "awk"s standard error is redirected to a
file, it may not even print the error messages.
Repeat-By:
Run the following command:
awk '{ ng[] = ; goop = 1; }' </dev/null
and watch it drop core.
Fix:
*** /arch/4.3/usr/src/bin/awk/awk.g.y Sun Feb 27 14:24:47 1983
--- ./awk.g.y Fri Jan 9 21:01:29 1987
***************
*** 235,241 ****
{ PUTS("printf list"); $$ = stat3($1, $2, nullstat, nullstat); }
| expr { PUTS("expr"); $$ = exptostat($1); }
| { PUTS("null simple statement"); $$ = (hack)nullstat; }
! | error { yyclearin; yyerror("illegal statement"); }
;
statement:
--- 235,241 ----
{ PUTS("printf list"); $$ = stat3($1, $2, nullstat, nullstat); }
| expr { PUTS("expr"); $$ = exptostat($1); }
| { PUTS("null simple statement"); $$ = (hack)nullstat; }
! | error { yyclearin; yyerror("illegal statement"); $$ = (int)0; }
;
statement:
Technical Details
Message-ID:
<11220@sun.uucp>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!oliveb!sun!gorodish!guyShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!oliveb!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.bugs.4bsd Subject: "awk" drops core on many syntax errors Message-ID: <11220@sun.uucp> Date: Sat, 10-Jan-87 00:09:35 EST Article-I.D.: sun.11220 Posted: Sat Jan 10 00:09:35 1987 Date-Received: Sat, 10-Jan-87 06:17:35 EST Sender: news@sun.uucp Lines: 32