Create a new heap in start_debugger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Create a new heap when the debugger is started in case the heap has been
corrupted.

Found by Valgrind. Thanks to Adam!

Rob
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);

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux