Create a new heap in start_debugger

Eric Pouech pouech-eric at
Mon May 12 13:54:09 CDT 2003

Robert Shearman wrote:
> Create a new heap when the debugger is started in case the heap has been
> corrupted.

I don't think the fix is completly correct... in all cases, we need to 
keep the current heap... if the debugger continues the execution, then 
the old heap is needed (for example, HeapFree/HeapValidate will no 
longer work...)

so, a proper fix (to deal with this situation) would be to:
- set a new heap (as you did)
- create the process for the debugger, but suspended
- put back the old heap in the pdb
- fire the debugger (ResumeThread)

note anyway that the fix isn't perfect. for example, if an execption 
results from a corrupted heap, we may still use heap related functions 
in the exception handling code (the debugger startup is one of example, 
but is far from being the only one). For example, running with
-debugmsg +seh is another one :-/

Eric Pouech

More information about the wine-devel mailing list