Subject: Re: CVS commit: src/lib/libc/arch/i386/string
To: Matthias Drochner <M.Drochner@fz-juelich.de>
From: J.T. Conklin <jtc@acorntoolworks.com>
List: current-users
Date: 02/04/2005 11:47:08
David Laight <david@l8s.co.uk> writes:
>> I've been running these implementations on my main development
>> box for many months, without problems.
>
> I looked at the sources last night
> - they probably shouldn't have been committed...
>
> Those routines will core dump when given a string that ends on the last
> byte of a page, and when the following page isn't mapped.

Really?  I tried to be very careful not to go outside the bounds of
the aligned word.  Is this true of all of the functions?  Can you
point me at the failure?

> Also the optimisation '(word32 - 0x01010101) & 0x80808080' is only
> valid for 7-bit ascii data.  For 8-bit data it is rather pointless.

Even for 8 bit data, it only fails a small percentage of the time.  In
my measurements, it still outperformed the current implementations
with random 8 bit data.

    --jtc

-- 
J.T. Conklin