[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Oddity in pgawk-3.0.95
From: |
Aharon Robbins |
Subject: |
Re: Oddity in pgawk-3.0.95 |
Date: |
Tue, 27 Feb 2001 12:09:56 +0200 |
Greetings. Re this:
> Date: Mon, 26 Feb 2001 16:49:09 +0100
> From: Michael Mauch <address@hidden>
> To: address@hidden
> Subject: Oddity in pgawk-3.0.95
>
> Hi Arnold,
>
> I played around with the great new beta and found a little oddity with
> pgawk. The smallest example is:
>
> % LC_ALL=C pgawk '1 in a' </dev/null
> pp_list: got Node_val
> pgawk: profile.c:946: pp_list: Assertion `tree->type == Node_expression_list'
> failed.
> zsh: abort LC_ALL=C pgawk 1 in a < /dev/null
>
> The same happens with "gawk --profile" instead of "pgawk". Replacing
> "gawk" by "pgawk" in the test/ directory's Makefile reveals the same
> behaviour in the "funstack" test.
>
> Of course that's not a real problem, because profiling was just added to
> gawk, so it won't break any existing code (and I'm not even sure if I
> should have reported that, but then, it's a beta, and if I can't find a
> real bug...).
>
> Thanks for the great work!
>
> Regards...
> Michael
>
> P.S.: I'm using Linux kernel 2.4.2, glibc-2.1.3, gcc-2.95.2.
Thanks for the bug report.
Here's the fix:
*** profile.c.save Sun Feb 4 14:57:41 2001
--- profile.c Tue Feb 27 12:05:01 2001
***************
*** 998,1004 ****
static void
pp_in_array(NODE *array, NODE *subscript)
{
! if (subscript->rnode != NULL) {
fprintf(prof_fp, "(");
pp_list(subscript);
fprintf(prof_fp, ")");
--- 998,1004 ----
static void
pp_in_array(NODE *array, NODE *subscript)
{
! if (subscript->type == Node_expression_list) {
fprintf(prof_fp, "(");
pp_list(subscript);
fprintf(prof_fp, ")");
--
Aharon (Arnold) Robbins --- Pioneer Consulting Ltd. address@hidden
P.O. Box 354 Home Phone: +972 8 979-0381 Fax: +1 603 761-6761
Nof Ayalon Cell Phone: +972 51 297-545 (See www.efax.com)
D.N. Shimshon 99785 Laundry increases exponentially in the
ISRAEL number of children. -- Miriam Robbins