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

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

Re: locale-dependent assertion failure in gawk 3.1.5


From: Aharon Robbins
Subject: Re: locale-dependent assertion failure in gawk 3.1.5
Date: Tue, 18 Jul 2006 22:38:40 +0300

This was a "braino" on my part and the code should be working on l->whatever
as you've noted. This is fixed in my code but hasn't been posted to the world.

Arnold

> Date: Mon, 10 Jul 2006 09:40:43 -0400
> From: "Andrew J. Schorr" <address@hidden>
> Subject: Re: locale-dependent assertion failure in gawk 3.1.5
> To: address@hidden
> Cc: =?iso-8859-1?Q?J=FCrgen?= Kahrs <address@hidden>
>
> Hi,
>
> One further question on the topic of wstr caching: in eval.c:r_tree_eval()
> in the Node_assign_concat case, the code currently says (in part):
>
>                 if (l != r && (l->flags & PERM) == 0 && l->stref == 1) {
>                         size_t nlen = l->stlen + r->stlen + 2;
>
>                         erealloc(l->stptr, char *, nlen, "interpret");
>                         memcpy(l->stptr + l->stlen, r->stptr, r->stlen);
>                         l->stlen += r->stlen;
>                         l->stptr[l->stlen] = '\0';
> #if defined MBS_SUPPORT
>                         if (r->wstptr != NULL)
>                                 free(r->wstptr);
>                         r->wstptr = NULL;
>                         r->wstlen = 0;
>                         r->flags &= ~WSTRCUR;
> #endif /* MBS_SUPPORT */
>
> I have 2 questions:
>
> 1. I'm not sure why it is necessary to free r->wstptr; what have we
> done to invalidate r's wstr cache?
>
> 2. On the other hand, isn't it necessary to free l->wstptr
> (if l->flags & WSTRCUR), since we have just changed l->stptr (l's string
> value) -- doesn't this invalidate any cached value in l->wstptr?
>
> Regards,
> Andy




reply via email to

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