|
From: Nicholas N. <nj...@ca...> - 2003-03-23 15:57:29
|
On Fri, 21 Mar 2003, Nicholas Nethercote wrote: > > An alternative solution for function wrapping would be not to use the runtime > > linker (symbol overwriding, hack with __libc_malloc), but to change > > instrumentation of the first BB of the given function, and do a "jmp" into > > the valgrind wrapper version if the skin would like to use it. > > Hey, good idea. I'll have to think about that some more... Hmm, one problem is that it requires glibc to not be stripped, since spotting function entries relies on symbol information being present. I'm not sure whether this is likely or not. Also, there's the issue of whether malloc() gets called before Valgrind gains control, possibly because of static C++ constructors. I've discussed this with Julian before but I cannot remember what the outcome was, so maybe I'm wrong. N |