|
From: Julian S. <js...@ac...> - 2005-07-22 18:10:31
|
> Does someone know what exactly valgrind here is complaining about? Yes :-) You've probably hit one of the ultra-optimised strlen functions that glibc provides. This is picking up chunks of string 8 bytes at a time and doing some clever tricks with carry chain propagation so it doesn't depend on the uninitialised bytes. Hence it's done an 8-byte read at offset 16 of a malloc'd string of length 22. The memcheck in 2.4.0 doesn't complain about reading at partially valid and partially invalid addresses, precisely to avoid reporting this kind of error, but I thought that was sloppy and removed that behaviour when rewriting it for Valgrind 3. It would help a lot if your /lib/ld-2.3.5.so had symbols, so that V could possibly see it was calling strlen and reroute to a less optimised version. Symbols would also make it possible to write a decent suppression if Plan A failed. If you are a Gentoo insider .. please consider distributing non-stripped /lib/ld-2.3.5.so as removing the symbols from it makes Valgrind's life much more difficult. The same goes for glibc. J |