bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Memory corruption after asort() in gawk 4.1.0 on Solaris


From: Andrew J. Schorr
Subject: Re: [bug-gawk] Memory corruption after asort() in gawk 4.1.0 on Solaris 10
Date: Tue, 6 Aug 2013 14:28:55 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

On Tue, Aug 06, 2013 at 07:55:43AM +0000, Joakim Östlund XO wrote:
> After some experimentation, we managed to narrow the issue down to line 919 
> of array.c:
> 
> *array = *result; /* copy result into array */
> 
> If this line is replaced with "memcpy(array, result, sizeof(NODE));", the 
> problem disappears.
> I have looked at the source for gawk 4.0.1, and this part of the code is 
> identical, but I also noticed that the implementation of freenode() has been 
> changed, which might be the root cause here.

Perhaps I am being idiotic, but it appears to me that those statements should
do the same thing.  The only reasons I can imagine for an error when using the
direct assignment vs memcpy are an alignment problem, or a compiler bug.  Are
you using gcc on Solaris?  Is it the same version that works OK on Linux?  Do
you have the same problem if you disable all compiler optimizations?

Regards,
Andy



reply via email to

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