xref: /illumos-gate/usr/src/test/util-tests/tests/awk/gnu/fordel.awk (revision 8a2b682e57a046b828f37bcde1776f131ef4629f)
1#Date: Mon, 7 Jun 2004 10:40:28 -0500
2#From: mary1john8@earthlink.net
3#To: arnold@skeeve.com
4#Subject: gawk internal errors
5#Message-ID: <20040607154028.GA2457@apollo>
6#
7#Hello,
8#
9#    gawk-3.1.3i internal errors:
10#
11#[1]
12#
13#$> ./gawk 'BEGIN { for (i in a) delete a; }'
14BEGIN { for (i in a) delete a; }
15#gawk: fatal error: internal error
16#Aborted
17#
18#------------------------------------------------------------------
19#--- awkgram.y.orig	2004-06-07 09:42:14.000000000 -0500
20#+++ awkgram.y	2004-06-07 09:45:58.000000000 -0500
21#@@ -387,7 +387,7 @@
22# 		 * Check that the body is a `delete a[i]' statement,
23# 		 * and that both the loop var and array names match.
24# 		 */
25#-		if ($8 != NULL && $8->type == Node_K_delete) {
26#+		if ($8 != NULL && $8->type == Node_K_delete && $8->rnode != NULL) {
27# 			NODE *arr, *sub;
28#
29# 			assert($8->rnode->type == Node_expression_list);
30#------------------------------------------------------------------
31#
32#
33#[2]
34#
35#$> ./gawk 'BEGIN { printf("%3$*10$.*1$s\n", 20, 10, "hello"); }'
36#gawk: fatal error: internal error
37#Aborted
38#
39#------------------------------------------------------------------
40#--- builtin.c.orig	2004-06-07 10:04:20.000000000 -0500
41#+++ builtin.c	2004-06-07 10:06:08.000000000 -0500
42#@@ -780,7 +780,10 @@
43# 					s1++;
44# 					n0--;
45# 				}
46#-
47#+				if (val >= num_args) {
48#+					toofew = TRUE;
49#+					break;
50#+				}
51# 				arg = the_args[val];
52# 			} else {
53# 				parse_next_arg();
54#------------------------------------------------------------------
55#
56#
57#    Finally, a test for the rewritten get_src_buf():
58#
59#$> AWKBUFSIZE=2 make check
60#
61#I get 3 failed tests. Not sure this is of any interest.
62#
63#
64#Thanks,
65#John
66