On Tue, May 02, 2000 at 12:26:01PM -0700, Alexandre Julliard wrote:
> Because we are now switching to the process stack before loading
> x11drv. So yes it's most certainly a stack overflow. We should switch
> to the large stack to call XOpenIM.

Just to confirm that it is a stack overflow, I changed in
'THREAD_InitStack' 'stack_size += 64 * 1024;' to 'stack_size += 64 *
1024 * 256;'. With this 'boosted' stack, the problem disappears.

Is the attached patch correct or am I completrly wrong when you were
speaking about the 'large stack' ?

-- 
               Lionel Ulmer   -   [EMAIL PROTECTED]
Index: wine/dlls/x11drv/x11drv_main.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/x11drv_main.c,v
retrieving revision 1.8
diff -u -r1.8 x11drv_main.c
--- wine/dlls/x11drv/x11drv_main.c      2000/04/29 14:29:41     1.8
+++ wine/dlls/x11drv/x11drv_main.c      2000/05/02 20:08:14
@@ -14,6 +14,7 @@
 
 #include "winbase.h"
 
+#include "callback.h"
 #include "clipboard.h"
 #include "debugtools.h"
 #include "gdi.h"
@@ -146,6 +147,11 @@
     TSXMapWindow( display, root_window );
 }
 
+/* Created so that XOpenIM can be called using the 'large stack' */
+static void XOpenIM_large_stack(void)
+{
+  TSXOpenIM(display,NULL,NULL,NULL);
+}
 
 /***********************************************************************
  *           X11DRV process initialisation routine
@@ -193,7 +199,7 @@
      * them to work in Wine, even whith a libX11 including the dead key
      * patches from Th.Quinot (http://Web.FdN.FR/~tquinot/dead-keys.en.html)
      */
-    TSXOpenIM(display,NULL,NULL,NULL);
+    CALL_LARGE_STACK( XOpenIM_large_stack, NULL );
 
     if (Options.synchronous) XSetErrorHandler( error_handler );
 

Reply via email to