https://bugs.kde.org/show_bug.cgi?id=372347

Philippe Waroquiers <philippe.waroqui...@skynet.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |philippe.waroquiers@skynet.
                   |                            |be

--- Comment #1 from Philippe Waroquiers <philippe.waroqui...@skynet.be> ---
I am not a specialist in c++ (in fact, I know close to 0),
but what I think is happening is:

In c++14, a new operator
   void operator delete  ( void* ptr, std::size_t sz );
was added. The compiler seems to emit automatically this operator
if it knows the size (at compile time?).
The operator new in your program is compiled as:
   callq  0x400858 <_Znwm>
which matches the symbol name replaced by valgrind.
The operator delete in your program is compiled as:
   callq  0x40088d <_ZdlPvm>
and this is unknown by valgrind replacement logic.
If I compiled with -std=c++11, it gives:
   callq  0x400872 <_ZdlPv>
which is replaced by Valgrind.

As I understand, the problem is that the valgrind replacement logic
has not been updated to support the additional new and delete operators
of c++14 (and c++17).

So, this seems to be a real Valgrind bug.

You might bypass this by using
   --show-mismatched-frees=no
or by compiling in c++11.

When using c++14 or above:
I am wondering what such half replacement can cause as other problems:
we might have that the memory allocated by the valgrind replacement cannot
properly be deleted by the (not replaced) delete operator.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to