bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gawk: multibyte aware problem


From: Aharon Robbins
Subject: Re: gawk: multibyte aware problem
Date: Wed, 16 Feb 2005 10:05:38 +0200

This is actually a bit of a tough call.  In unref, we're concerned
about storage management.  Not checking the flag is inconsistent,
that's true.  But the correct check is `tmp->wstptr != NULL', and
that's the check being made.  I may add some assertions here and in
fmt_val so that both conditions are checked before the free in
both places.

Thanks,

Arnold

> Date: Wed, 16 Feb 2005 09:48:53 +0900
> From: =?ISO-2022-JP?B?GyRCTFpCPDlAMGwbKEI=?= <address@hidden>
> Subject: gawk: multibyte aware problem
> To: address@hidden
>
> Hi,
>
> I had checked unofficial patch again.
> In node.c/unref() of patch, 
>
> @@ -456,6 +479,13 @@
>                                 return;
>                         }
>                         free(tmp->stptr);
> +#if defined MBS_SUPPORT
> +                       if (tmp->wstptr != NULL)
> +                               free(tmp->wstptr);
> +                       tmp->flags &= ~WSTRCUR;
> +                       tmp->wstptr = NULL;
> +                       tmp->wstlen = 0;
> +#endif
>
> here, I guess shoud check (tmp->flags & WSTRCUR) != 0 before
> tmp->wstptr != NULL line (other free wstptr routine did check it).
>
> How though thought whether should do so?
>
> -- 
> Kimura Koichi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]