|
From: <pa...@fr...> - 2017-02-08 21:12:28
|
----- Original Message -----
> 2017-02-05 20:31 GMT+01:00 <pa...@fr...>:
> > Hi all
> >
> > I'm trying to understand how valgrind resolves replacement
> > functions at runtime.
>
> Hi Paul,
> Have a look at pub_tool_redir.h, mechanics and Z-encoding rules are
> described there.
Hi Ivo
Thanks for the info. What was confusing me the most was why code that called operator delete(void* ptr, std::size_t) was being detected by an unmodified valgrind as operator delete(void* ptr). Looking at the libstdc++ source this is now obvious:
_GLIBCXX_WEAK_DEFINITION void
operator delete(void* ptr, std::size_t) _GLIBCXX_USE_NOEXCEPT
{
::operator delete (ptr);
}
[and libcxx does the same]
So currently this works because the new functions just wrap the old ones.
A+
Paul
|