|
From: <br...@gi...> - 2006-01-19 04:44:56
|
I've seen a few references in the archives to the ultra-optimized glibc strlen function (and various other functions that use the same optimization). This must be quite familiar to all Valgrind users -- I myself am getting tired of dealing with it. But as a reminder: Some functions read a byte-granularity block of memory one word at a time, for speed. That means they tend to overrun the block of memory by a few bytes at the end, and Valgrind/Memcheck screams. My personal strategy is to look at every "Invalid read of size 4" and if it just runs off the end of an odd-sized block, I write a suppression for it. I don't try to determine if there's a real problem; I just presume there isn't. So why can't Valgrind do that for me? I assume it can't or it would have been mentioned in this context. But I'd love to be able to tell Valgrind to ignore invalid reads of size one word that happen in the last word of a block. -- Bryan Henderson Phone 408-621-2000 San Jose, California |