[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: locale-dependent assertion failure in gawk 3.1.5
From: |
Andrew J. Schorr |
Subject: |
Re: locale-dependent assertion failure in gawk 3.1.5 |
Date: |
Fri, 7 Jul 2006 16:36:00 -0400 |
User-agent: |
Mutt/1.4.2.1i |
On Fri, Jul 07, 2006 at 12:17:44PM -0400, Andrew J. Schorr wrote:
> The attached patch seems to fix the problem, but I'm still not
> sure why there was no error on my 64-bit linux opteron system,
> and I'm not 100% confident that this fix is OK...
I now understand why the problem was not appearing on the 64-bit opteron
system. In awk.h, freenode is defined as follows:
#define freenode(n) ((n)->flags = 0,\
(n)->exec_count = 0, (n)->nextp = nextfree, nextfree = (n))
But the NODE structure is a union, and I believe that setting exec_count
(sub.nodep.reflags) to 0 was causing wstptr (sub.val.wsp) to be set to NULL
on 64-bit opteron, whereas this collision does not occur on 32 bit systems.
So I think the patch is good. If anybody feels otherwise, please
let me know.
Regards,
Andy
--- ../gawk-3.1.5-64/node.c 2005-07-26 14:07:43.000000000 -0400
+++ ./node.c 2006-07-07 12:12:29.535992000 -0400
@@ -524,6 +524,15 @@ unref(register NODE *tmp)
return;
}
if ((tmp->flags & FIELD) != 0) {
+#if defined MBS_SUPPORT
+ if (tmp->wstptr != NULL) {
+ assert((tmp->flags & WSTRCUR) != 0);
+ free(tmp->wstptr);
+ }
+ tmp->flags &= ~WSTRCUR;
+ tmp->wstptr = NULL;
+ tmp->wstlen = 0;
+#endif
freenode(tmp);
return;
}
- locale-dependent assertion failure in gawk 3.1.5, Andrew J. Schorr, 2006/07/06
- Re: locale-dependent assertion failure in gawk 3.1.5, Andrew J. Schorr, 2006/07/07
- Message not available
- Re: locale-dependent assertion failure in gawk 3.1.5, Jürgen Kahrs, 2006/07/07
- Message not available
- Re: locale-dependent assertion failure in gawk 3.1.5, Jürgen Kahrs, 2006/07/07
- Re: locale-dependent assertion failure in gawk 3.1.5, Andrew J. Schorr, 2006/07/07
- Re: locale-dependent assertion failure in gawk 3.1.5, Andrew J. Schorr, 2006/07/07
- Re: locale-dependent assertion failure in gawk 3.1.5, Andrew J. Schorr, 2006/07/10
- Re: locale-dependent assertion failure in gawk 3.1.5, Andrew J. Schorr, 2006/07/10
- Re: locale-dependent assertion failure in gawk 3.1.5, Andrew J. Schorr, 2006/07/11
- Re: locale-dependent assertion failure in gawk 3.1.5, Andrew J. Schorr, 2006/07/12
- Message not available
- Re: locale-dependent assertion failure in gawk 3.1.5, Jürgen Kahrs, 2006/07/10