linux-alpha.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: current state of sid (unstable)
       [not found] ` <9AF94B53-DBAB-456E-B7FC-1E503375EB94@orcon.net.nz>
@ 2010-09-20 10:18   ` Michael Cree
  2010-09-27  6:53     ` Michael Cree
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Cree @ 2010-09-20 10:18 UTC (permalink / raw)
  To: debian-alpha; +Cc: 521737, linux-alpha

On 04/08/10 09:35, Michael Cree wrote:
> On 4/08/2010, at 1:48 AM, Bob Tracy wrote:
>> (5) Some long-standing compiler and libc issues have been fixed
>> upstream and in Debian, but recently, a build of libc in Debian
>> Unstable failed.
>
> I see the memchr seg fault bug (521737) is still open. I have a hunch
> that it may be a false-positive,

Darn, it's a true-positive.

>  It's a standard ldq_u for loading a byte within a
> quadword that is failing. If the correct quadword is being loaded then
> that shouldn't trip a seg fault no matter what byte in it is being
> loaded, even if the byte is pass the end of the string, right?

If there are fewer than eight bytes to search it loads a quadword (via 
ldq_u) encompassing the address one byte before the start address plus 
the length to search.  If the start address is quadword aligned then 
that will always be safe, but it appears to me that the author forgot 
about the possibility that the start address may not be quadword 
aligned, and then adding on the length-1 may step across the next 
quadword boundary, and whoops, we've gone past the valid end of buffer.

The problem is in both the Alpha generic and the Alpha ev6 code for 
memchr in libc.

Ohh, the kernel code (arch/alpha/lib/memchr.S) has the same problem!

Cheers
Michael.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: current state of sid (unstable)
  2010-09-20 10:18   ` current state of sid (unstable) Michael Cree
@ 2010-09-27  6:53     ` Michael Cree
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Cree @ 2010-09-27  6:53 UTC (permalink / raw)
  To: debian-alpha; +Cc: 521737, linux-alpha

On 20/09/10 22:18, Michael Cree wrote:
> On 04/08/10 09:35, Michael Cree wrote:
>> On 4/08/2010, at 1:48 AM, Bob Tracy wrote:
>>> (5) Some long-standing compiler and libc issues have been fixed
>>> upstream and in Debian, but recently, a build of libc in Debian
>>> Unstable failed.
>>
>> I see the memchr seg fault bug (521737) is still open. I have a hunch
>> that it may be a false-positive,
>
> Darn, it's a true-positive.

A new version of memchr is now upstream in the glibc ports repository 
(many thanks to RTH). In addition to fixing the seg fault it is more 
than twice as fast as the old version when searching through large 
memory buffers.

Cheers
Michael.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-27  6:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20100803134859.GA9030@gherkin.frus.com>
     [not found] ` <9AF94B53-DBAB-456E-B7FC-1E503375EB94@orcon.net.nz>
2010-09-20 10:18   ` current state of sid (unstable) Michael Cree
2010-09-27  6:53     ` Michael Cree

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).