On Wed, 19 Dec 2007, Sahni, Jitan wrote: > is there any way in memcheck to detect out of bound array access, when > using stl objects like std::string and std::map ? Recently I had once such > bug and took me about 10 days with valgrind before it pin pointed me to > exact error line and I think reason for this may be because stl may be > doing a bit of its own memory management . e.g when a string of say size 5 > bytes is created and then destroyed, stl may request say 64 bytes from the > heap and try to recycle that. I was thinking if there is an option to > directly check stl array bounds so that the error can be caught sooner
Memcheck will only detect such errors if the array edge happens to be at a heap block edge. It's an inherent limitation in Memcheck, one that's extremely difficult to avoid. Nick ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Valgrind-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-developers
