[libvirt] [PATCH] maint: update to latest gnulib

Eric Blake eblake at redhat.com
Fri May 27 20:15:50 UTC 2016


On 05/27/2016 09:22 AM, Ján Tomko wrote:
> On Fri, May 27, 2016 at 08:24:36AM -0600, Eric Blake wrote:
>> On 05/27/2016 04:33 AM, Michal Privoznik wrote:
>>
>>>>
>>>> Pushed under gnulib maintenance rule, since RC1 still hasn't been tagged.
>>>>
>>>
>>> Unfortunately, this breaks build on my system:

> I have bisected it to:
> 54615b95ff238e235e806855efc46a9abad09f2e is the first bad commit
> commit 54615b95ff238e235e806855efc46a9abad09f2e
> Author: Paul Eggert <eggert at cs.ucla.edu>
> Date:   Sat Feb 6 18:11:48 2016 -0800
> 
>     misc: port better to gcc -fsanitize=address

Thanks; I independently came to the same conclusion, and have pushed the
new gnulib submodule.


>            char *name2 = realpath ("conftest.d//./..", NULL);
> -          if (! (name1 && name2 && strcmp (name1, name2) != 0))
> +          if ((name1 && name2 && strcmp (name1, name2) != 0))

Not quite. Paul's (buggy) fix was trying to ensure that strcmp() can't
be called on NULL, but the correct fix is:

if (! (name1 && name2) && strcmp (name1, name2) != 0)

or, by deMorgan's law,

if (! name1 || ! name2 || strcmp (name1, name2))

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160527/a1209ec3/attachment-0001.sig>


More information about the libvir-list mailing list