On Sun, 2012-08-12 at 18:10 +0200, Francis Giraldeau wrote:
> Of course you are right! Thought, I just tested without updating dst and
> the problem is raised anyway. The error is not caused in the printf(),
> but in the stpncpy().
String functions might be optimised very specially by the compiler
and then might not be redirected  by Valgrind.
There has been some changes in the area of sse instructions
and some replacement of string functions in 3.8.0.
=> would be good to try with the 3.8.0.

If problem is still there, you might try to compile telling gcc
to not use string builtins or similar.

You can also (with or without the previous builtin trial)
examine the output of Valgrind (-v) to see if the stpncpy
function is properly redirected to the valgrind one.

>From what I can see, there is no replacement for stpncpy.
So, the optimised code is then not replaced.
And as it is optimised a lot, it can gives false positive.
(this is one of the reasons for which some "string" functions
are replaced. See memcheck/mc_replace_strmem.c)

Philippe



------------------------------------------------------------------------------
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