[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-memchr failure on rawhide
From: |
Eric Blake |
Subject: |
Re: test-memchr failure on rawhide |
Date: |
Tue, 12 May 2009 19:02:26 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Bruno Haible on 5/12/2009 6:49 PM:
> Jakub Jelinek, when closing the two reported glibc bugs, agreed with
> our interpretation that a NULL pointer is an invalid argument to memchr
> but a pointer to a zero-sized memory region is valid.
>
> Here is a proposed patch to make the gnulib unit tests compliant,
> without removing the particular test.
>
> Opinions? Objections?
I like it. It also means that we can use gcc's attribute((nonnull)) on
the rpc_mem functions in our <string.h> replacement, to match some of the
Linux distros that already made these tests hairy in the first place:
> - void *nil = NULL; /* Use to avoid gcc attribute((nonnull)) warnings. */
> -
> /* Test equal / not equal distinction. */
> - ASSERT (memcmp (nil, nil, 0) == 0);
> + ASSERT (memcmp (zerosize_ptr (), zerosize_ptr (), 0) == 0);
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoKHCIACgkQ84KuGfSFAYDGGACfWyrM8sXqojZ3g+rFX9Umu6+Q
WkIAn2qJnf6Ks+fSQRvnd5GkkOa1Ngh3
=IiHN
-----END PGP SIGNATURE-----
- Re: test-memchr failure on rawhide, (continued)
- 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
- Re: test-memchr failure on rawhide, Bruno Haible, 2009/05/11
- Re: test-memchr failure on rawhide, Bruno Haible, 2009/05/12
- Re: test-memchr failure on rawhide,
Eric Blake <=
- Re: test-memchr failure on rawhide, Jim Meyering, 2009/05/13
- Re: test-memchr failure on rawhide, Bruno Haible, 2009/05/13
- Re: test-memchr failure on rawhide, Eric Blake, 2009/05/13
Re: test-memchr failure on rawhide, Jim Meyering, 2009/05/08