| [3076] | 1 | #Date: Mon, 7 Jun 2004 10:40:28 -0500
|
|---|
| 2 | #From: [email protected]
|
|---|
| 3 | #To: [email protected]
|
|---|
| 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; }'
|
|---|
| 14 | #gawk: fatal error: internal error
|
|---|
| 15 | #Aborted
|
|---|
| 16 | #
|
|---|
| 17 | #------------------------------------------------------------------
|
|---|
| 18 | #--- awkgram.y.orig 2004-06-07 09:42:14.000000000 -0500
|
|---|
| 19 | #+++ awkgram.y 2004-06-07 09:45:58.000000000 -0500
|
|---|
| 20 | #@@ -387,7 +387,7 @@
|
|---|
| 21 | # * Check that the body is a `delete a[i]' statement,
|
|---|
| 22 | # * and that both the loop var and array names match.
|
|---|
| 23 | # */
|
|---|
| 24 | #- if ($8 != NULL && $8->type == Node_K_delete) {
|
|---|
| 25 | #+ if ($8 != NULL && $8->type == Node_K_delete && $8->rnode != NULL) {
|
|---|
| 26 | # NODE *arr, *sub;
|
|---|
| 27 | #
|
|---|
| 28 | # assert($8->rnode->type == Node_expression_list);
|
|---|
| 29 | #------------------------------------------------------------------
|
|---|
| 30 | #
|
|---|
| 31 | #
|
|---|
| 32 | #[2]
|
|---|
| 33 | #
|
|---|
| 34 | #$> ./gawk 'BEGIN { printf("%3$*10$.*1$s\n", 20, 10, "hello"); }'
|
|---|
| 35 | 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
|
|---|