At 4:18 PM -0600 1/23/06, Craig Berry wrote:
>Another thing to check.  This code in Perl_flex_stat looks worrisome to me:
>
>#ifdef _USE_STD_STAT
>    memcpy(&statbufp->st_ino, &statbufp->crtl_stat.st_ino, 8);
>#else
>    memcpy(&statbufp->st_ino, statbufp->crtl_stat.st_ino, 8);
>#endif
>
>It seems to me that when _USE_STD_STAT is not in effect, we should only be 
>copying 6 bytes, not 8. 

I've attached a patch which I'm still testing that addresses this and
a couple of other stat-related nits.  After applying it, I don't get
the accvio when running the stat.t test any more.  I'm not entirely
convinced we've found the bug, as copying 8 bytes when we only needed
6 should have just put the first 2 bytes of the st_mode field into
the high word of our rvn field where it would never be seen.  We
probably need a more thorough review of alignment settings and such.
-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Attachment: statfix.patch
Description: Binary data

Reply via email to