[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-memchr failure on rawhide
From: |
Bruno Haible |
Subject: |
Re: test-memchr failure on rawhide |
Date: |
Sat, 9 May 2009 03:29:20 +0200 |
User-agent: |
KMail/1.9.9 |
James Youngman wrote:
> > How many bytes is "the object" large?
>
> If s is NULL, there _is_ no object.
> ...
> NULL is not a pointer to an object.
This is not what I'm arguing about.
Does memchr(ptr,c,0) for ptr != NULL now access ptr[0] or not?
If yes, then when ptr is a pointer that points past the end of a read-write
memory page and to the beginning of an unreadable memory page (set up like
this with mprotect), then memchr(ptr,c,0) will crash without justification.
If no, then the fact that memchr(NULL,c,0) now crashes implies the existence
of a 'ptr == NULL' test in the implementation of memchr, which slows down
the code execution and whose only purpose is to be maximally picky about a
standard.
In both cases the memchr implementation is deviating from traditional
behaviour and provoking crashes for programs that worked fine earlier.
This is unreasonable.
Bruno
- test-memchr failure on rawhide, Jim Meyering, 2009/05/07
- Re: test-memchr failure on rawhide, Andreas Schwab, 2009/05/08
- Re: test-memchr failure on rawhide, Bruno Haible, 2009/05/08
- Re: test-memchr failure on rawhide, Andreas Schwab, 2009/05/08
- Re: test-memchr failure on rawhide, Bruno Haible, 2009/05/08
- Re: test-memchr failure on rawhide, Andreas Schwab, 2009/05/08
- Re: test-memchr failure on rawhide, Bruno Haible, 2009/05/08
- Re: test-memchr failure on rawhide, James Youngman, 2009/05/08
- Re: test-memchr failure on rawhide,
Bruno Haible <=
- Re: test-memchr failure on rawhide, Andreas Schwab, 2009/05/09
- Re: test-memchr failure on rawhide, Bruno Haible, 2009/05/09
- Re: test-memchr failure on rawhide, Andreas Schwab, 2009/05/09
- Re: test-memchr failure on rawhide, Bruno Haible, 2009/05/09
- Re: test-memchr failure on rawhide, Andreas Schwab, 2009/05/09
- Re: test-memchr failure on rawhide, Bruno Haible, 2009/05/11
- Re: test-memchr failure on rawhide, Andreas Schwab, 2009/05/11
- Re: test-memchr failure on rawhide, Ben Pfaff, 2009/05/09
- Re: test-memchr failure on rawhide, Bruno Haible, 2009/05/10
- Re: test-memchr failure on rawhide, Jim Meyering, 2009/05/11