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