Version: (using Devel) OS: Linux Installed from: Compiled sources The client request VG_USERREQ__MALLOCLIKE_BLOCK does not allow the caller to specify the allocation type (malloc,new,new[]) and therefore memcheck can not detect mismatches between the allocation and free type. A prime example of where this is a problem is in bug 217615 (http://bugs.kde.org/show_bug.cgi?id=217615) One likely reason that this isn't already implemented is that the MC_Chunk structure is short on space to store addition state. Attached is a patch that adds additional user requests to mark block as new-like and new[]-like. It steals a bit from ExeContext in order to store the additional state.
Created attachment 39060 [details] Add new-like and new[]-like block client requests. Add new-like and new[]-like block client requests. (C) Google.