Create a new heap in start_debugger
Robert Shearman
R.J.Shearman at warwick.ac.uk
Mon May 12 12:32:40 CDT 2003
Create a new heap when the debugger is started in case the heap has been
corrupted.
Found by Valgrind. Thanks to Adam!
Rob
-------------- next part --------------
Index: wine/win32/except.c
===================================================================
RCS file: /home/wine/wine/win32/except.c,v
retrieving revision 1.67
diff -u -r1.67 except.c
--- wine/win32/except.c 27 Apr 2003 00:31:34 -0000 1.67
+++ wine/win32/except.c 12 May 2003 15:42:47 -0000
@@ -233,6 +233,13 @@
static const WCHAR DebuggerW[] = {'D','e','b','u','g','g','e','r',0};
static const WCHAR AutoW[] = {'A','u','t','o',0};
+ /* create the a new heap and make it the process heap
+ * just in case the reason for the exception was a
+ * corrupted heap
+ */
+ HANDLE *pdb = (HANDLE *)NtCurrentTeb()->process;
+ pdb[0x18 / sizeof(HANDLE)] = HeapCreate(0, 0x10000, 0);
+
MESSAGE("wine: Unhandled exception, starting debugger...\n");
attr.Length = sizeof(attr);
More information about the wine-patches
mailing list