Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Feb 98 23:57:08 EST
From:      luoqi@watermarkgroup.com (Luoqi Chen)
To:        dmm125@bellatlantic.net, perlsta@sunyit.edu
Cc:        hackers@FreeBSD.ORG
Subject:   Re: latest wine && seg-faults on freebsd
Message-ID:  <9802050457.AA11314@watermarkgroup.com>

next in thread | raw e-mail | index | archive | help
> if you look in the file "sysdep.c" (i forget which dir, as i'm not at my
> jerkstation right now) you will see a LOT of code that gets removed by the
> CPP preprocessor because FreeBSD doesn't support clone(), my thoughts are
> that clone is a nasty, yucky thing, it's cool but i don't think it exists
> anywhere else but on linux.  i'm trying to get some sort of emulation
> going.
> 
> what is going on is that the thread that is NOT being created is being
> referenced by that segment of asm code what it translates to is:
> move the longword pointed to by the extra-segment 'fs' into a variable.
> 
The crash Donn had was actually not caused by lack of clone(). It happened
before any of the threads were even created. Wine expects initially segment
register fs == ds, but somehow in FreeBSD fs was set to cs (in locore.s).
Is there any reason for this? AFAIK, fs is not used by the kernel, and is
consistently set to ds in the rest of the kernel code.

> 
> you might have to upgrade to -current for the patches i plan to work on,
> as -current includes better support for a clone-like call.
> 
> -Alfred
> 
> please, please, please, if you think you have the ability, fire up xxgdb
> and help me debug this, i'm a good programmer, but i'm not terribly
> familiar with the FreeBSD internals
> 
> 
> On Wed, 4 Feb 1998, Donn Miller wrote:
> 
> > I just compiled the latest wine (wine980201) and it compiled great, except
> > that I got seg-faults and dropped core every time I tried to run it.  So
> > then I compiled with the -g flag and debugged it.  Here is the output of
> > gdb:
> > 
> > Reading symbols from /usr/libexec/ld.so...done.
> > Reading symbols from /usr/X11R6/lib/libXpm.so.4.10...done.
> > Reading symbols from /usr/X11R6/lib/libSM.so.6.0...done.
> > Reading symbols from /usr/X11R6/lib/libICE.so.6.3...done.
> > Reading symbols from /usr/X11R6/lib/libXext.so.6.3...done.
> > Reading symbols from /usr/X11R6/lib/libX11.so.6.1...done.
> > Reading symbols from /usr/lib/libm.so.2.0...done.
> > Reading symbols from /usr/lib/libc.so.3.0...done.
> > #0  0x1be651 in NtCurrentTeb () at sysdeps.c:140
> > 140         __asm__( ".byte 0x64\n\tmovl (%1),%0"
> > (gdb) 
> > 
> > I compiled this ``straight out of the box'' instead of using FreeBSD's
> > port collection and was interested in hearing from the person doing the
> > latest ports to FreeBSD on what he/she did to correct this.  I guessing
> > that it has something to do with threading (not X-windows threads but
> > libc).
> > 
> > 	Donn
> > 
> > 
> 
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9802050457.AA11314>