From: Jeremy F. <je...@go...> - 2003-05-29 23:54:24
|
On Thu, 2003-05-29 at 14:56, Alex Ivershen wrote: > Now, as you can see the allocation is done by __builtin_new, and > deallocation by __builtin_delete - no mismatch here. What is strange > though is that __builtin_delete is intercepted by valgrind, whereas > __builtin_new goes into compiler and valgrind sees only malloc from > there. Quite naturally, it reports a mismatch in this case. Does > anyone know a reason why this is happening and how to fix it ? The problem is that Valgrind isn't intercepting __builtin_new, so its using the compiler's version of it, which ends up calling malloc(); therefore, Valgrind sees the block as being allocated with malloc(). It does successfully intercept __builtin_delete, so that's why it sees the mismatch. What compiler version are you using? Are you linking with g++ (rather than just plain gcc)? J |