Bug 210935

Summary: port valgrind.h (not valgrind) to win32 so apps run under wine can make client requests
Product: [Developer tools] valgrind Reporter: Dan Kegel <dank>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: wishlist CC: bart.vanassche+kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Demo showing that current annotations with mingw
updated to use 32 bit opcodes. makes valgrind crash...

Description Dan Kegel 2009-10-18 05:21:10 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

(This is kind of a continuation of bug 148441, which
was closed prematurely.)

valgrind+wine can indeed already spot leaks in programs
that call the win32 heap directly, but not in programs
which use a higher level heap (e.g. tcmalloc,
jemalloc, hoard, nedmalloc, etc).

To fix this properly, we need to port valgrind.h to win32 
so that client requests can be made from win32 apps. 
The attached demo that shows this works from win32 apps
compiled with gcc, so fixing valgrind.h for that case
shouldn't be hard at all.
Supporting Visual C++ is a bit harder, since its inline
assembly is different.  (The demo tries to support that, 
but I made a mistake somewhere.)
Comment 1 Dan Kegel 2009-10-18 05:28:04 UTC
Created attachment 37643 [details]
Demo showing that current annotations with mingw
Comment 2 Dan Kegel 2009-10-18 15:59:14 UTC
Created attachment 37646 [details]
updated to use 32 bit opcodes.  makes valgrind crash...
Comment 3 Bart Van Assche 2010-08-27 12:03:03 UTC
Should be fixed in r11295. Please test.