On Fri, 14 Nov 2008, Ian Anderson wrote: > There seems to be an issue with all the library functions in glibc 2.6 which > search for particular characters including null terminators. Valgrind > frequently reports that reads are being done from uninitialized locations. > Technically this is correct, the library code reads a whole 32 bit word, and > does some clever bit arithmetic on it, including possibly up to 3 bytes past > the terminator, which may never have been initialized, but it seems to be > guaranteed by the algorithm that it doesn't matter that these bytes are > uninitialized. > > I saw that there used to be a --avoid-strlen-errors option in Valgrind, but > this doesn't seem to exist any more. > > Is there any other solution than adding these functions to the suppression > list? I don't really want to do that, as I suspect that in amongst these > false positive, any code does have some real errors. At the moment it's not > really feasible to check every one of these to see if it's valid or > spurious.
--partial-loads-ok=yes may help. But generally we try to replace hyper-optimised functions like this with simpler ones; we do this for strlen, memcpy, strcpy, and various others (see memcheck/mc_replace_strmem.c for details). What functions were causing problems? It's possible that the Valgrind replacements aren't being used, eg. if the functions are being inlined. N ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
