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   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool

Reply via email to