Re: strncpy (maybe others) broken on Alpha

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

 



Ivan Kokshaysky wrote:
> On Fri, Apr 21, 2006 at 01:55:56PM +0200, Mathieu Chouquet-Stringer wrote:
> > I've attached to this email a tarball of what I use to test the
> > compiler/binutils.  It's faster than recompiling the whole kernel on
> > these slow machines!
> 
> Oops. I was using a wrong copy of strncpy.S (remained from previous
> __stxncpy() debugging). What's why I wasn't able to reproduce that...
> 
> It seems that the registers $24 and $27 are mixed up in strncpy().
> This fixes your test case, please check if it fixes kernel problem
> as well.

With this patch applied, the test suite appears to work correctly with
ALL versions of gcc on the Alpha to which I have access.  The binutils
package is currently the 2.16.1cvs20060413-1 version from Debian's
"unstable" tree.

WITHOUT the patch, and everything else the same, gcc-4.0 and gcc-4.1
appear to work, but the gcc-3.3 build produces the bad behavior we've
been seeing.

I'm currently building a 2.6.17-rc2 kernel with gcc-4.1, the binutils
package mentioned above, and Ivan's patch.  Report to follow later.

Pending a knowledgable peer review of Ivan's patch (no insult intended:
I'm not qualified), I'd say we're close to putting this to rest.  If it
turns out the patch is the correct fix, I'm genuinely concerned about
how long this bug went undetected :-(.  The modification date of
arch/alpha/lib/strncpy.S is 28 Jul 2003 in my tree.  The stxncpy.S file
is not quite a year newer: 10 May 2004.

-- 
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
[email protected]
-----------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux