Subject: port-i386/352: Wine won't run on post 0.9B kernels
To: None <gnats-admin>
From: John Brezak <brezak@ch.hp.com>
List: netbsd-bugs
Date: 07/20/1994 14:50:17
>Number:         352
>Category:       port-i386
>Synopsis:       Wine tried to set null selector in sigreturn
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 20 14:50:13 1994
>Originator:     John Brezak
>Organization:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 John Brezak                    UUCP:     uunet!apollo.hp!brezak
 Hewlett Packard/Apollo         Internet: brezak@ch.hp.com
 300 Apollo Drive               Phone:    (508) 436-4915
 Chelmsford, Massachusetts      Fax:      (508) 436-5103
>Release:        0.9B
>Environment:
	
System: NetBSD sussex 0.9B NetBSD 0.9B (SUSSEX) #13: Mon Jun 13 08:38:44 EDT 1994 brezak@sussex:/u0/src/netbsd/sys/arch/i386/compile/SUSSEX i386


>Description:
A windows program running under wine can use a null selector in es. This is
noticed in sigreturn() when the selectors are checked to be valid. A null
selector is a valid selector as long as it isn't cs or ss.

>How-To-Repeat:
	Need to compile wine and try to run sol.exe .

>Fix:

This proposed fix fixes the problem (although this may not be the  right fix).

diff -c -r1.1.1.1 machdep.c
*** 1.1.1.1     1994/05/30 03:45:53
--- machdep.c   1994/06/13 12:37:32
***************
*** 547,552 ****
--- 547,553 ----
  2:    andl    %%edx,%%eax
  
        andl    $3,%%eax
+       jz      3f
        subl    $3,%%eax
        jmp     3f
  1:    movl    $1,%%eax

>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------