On Sun, Aug 12, 2012 at 1:44 PM, John Reiser <jrei...@bitwagon.com> wrote:

>
> memcheck implements intercepting re-directs for both strcpy and strncpy.
> The re-directs remove the possibility of any false positive complaints,
> and also are significantly faster than emulating instructions.
> Therefore, I suggest that the best fix for _this_ case is for memcheck
> to implement a re-direct for stpncpy.


What fraction of time does a typical program -- or indeed, any real-world
program -- spend in stpncpy, do you think?  Amdahl's Law would like to know.

Hey, I have a brilliant idea.  Let's implement redirects for all of the C
standard, C++ standard, POSIX standard, X11, Qt, KDE, zlib, OpenSSL, and
Boost libraries.  Think how much faster so many programs could run under
Valgrind.

Or, you know, we could instead spend effort fixing Valgrind's machine
emulator to match the memory model of real machines.


> Although "--partial-loads-ok=yes"
> might remove the false positive complaint, it would also tend to hide the
> performance problem with the emulation of stpncpy.


What performance problem?

 - Pat
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to