libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can you force the use of the internal argz?


From: Eric Blake
Subject: Re: Can you force the use of the internal argz?
Date: Mon, 10 Sep 2012 13:32:58 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

On 09/08/2012 01:02 PM, Jeff Squyres wrote:
> Short version:
> --------------
> 
> The glibc argz functions in RHEL produce valgrind warnings about illegal 
> reads.

That just means that glibc's valgrind suppression hints are incomplete.

> You can see that the error is that the glibc argz_insert is apparently doing 
> an optimized memmove that is assumedly doing some kind of 8 byte read.  The 
> only problem is that there is less than 8 bytes left in the string

but AT LEAST 8 bytes before the next page boundary, so it won't fault.
This is a valid optimization in glibc, and the glibc valgrind
suppression file is supposed to silence warnings about this and other
valid optimizations where glibc does large but aligned reads, and even
does computations on the tail bytes, but where the computations don't
matter because the algorithm necessarily detects the end of string the
the hed bytes.

> I would very much like to avoid the system-level argz for this reason, and 
> use libltdl's internal argz instead.

Why?  glibc's argz is doing nothing wrong, and for that matter, there's
no promise that libltdl's argz won't also start using the same
optimization.  Rather, valgrind is being too noisy, and that's what
suppression files were invented for.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]