Wine patch

Bob Goodwin goodie1 at
Thu May 17 10:25:24 CDT 2001

Below is a `diff -c' of the fix I generated for a bug I reported (#249.)
The bug causes a stack overflow during a `_wine_call_from_16_regs'. The
patch adds a mask to clean the upper half of the ESP register after
setting the esp using a word sized lssp. I have compiled and tested this
patch and it works (no more stack overflow.) This patches
wine-xxxx/tools/winebuild/relay.c which is used to generate the code for
I have never submitted a patch before so if this one is not workable for
some reason please let me know.

Changelog entry
2001-05-17  Bob Goodwin <goodie1 at>

        * tools/winebuild/relay.c: mask out garbage in the upper half of
stack pointer
          after loading the sp with `WORD' value.

*** wine-20010418/tools/winebuild/relay.c       Mon Feb 12 18:06:38 2001
--- ../wine-20010418/tools/winebuild/relay.c    Tue May 15 16:40:55 2001
*** 352,357 ****
--- 352,358 ----
          /* Switch stack back */
          /* fprintf( outfile, "\t.byte 0x64\n\tlssw (%d), %%sp\n",
          fprintf( outfile, "\t.byte 0x64,0x66,0x0f,0xb2,0x25\n\t.long
+         fprintf( outfile, "\tandl $0x0ffff, %%esp\n" );
          fprintf( outfile, "\t.byte 0x64\n\tpopl (%d)\n", STACKOFFSET
          /* Get return address to CallFrom16 stub */

More information about the wine-patches mailing list