On 06/30/2011 08:34 AM, Szabolcs Nagy wrote: > hm this is actually in the calloc implementation > of a libc (musl) > > i was testing with statically linked binaries > > now i see that with dynamic linking valgrind > knows calloc semantics (i guess it preloads > its own calloc)
Yes. valgrind has an internal form of preloading which it calls 're-directing". Known allocators and various mem*() and str*() functions are re-directed to routines that are internal to valgrind. > is it possible to do the same for statically > linked binaries? (recognize calloc calls > and assume its output is always zeroed) I don't know how to do this except via enhancements inside valgrind. In the case of dynamic linking it is easier to recognize and to redirect calloc, malloc, strchr, memset, etc. -- ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users