WINE vs. FreeBSD

Michael Nottebrock lofi at
Sat Jul 22 17:14:23 UTC 2006

Dear -hackers and -emulation readers,

I would like to call your attention to a few long-standing problems that have 
so far prevented WINE from living up to its capabilities on FreeBSD.

I am afraid that I still don't fully grasp the scope of the problem, nor do I 
have a clear idea of what the solution might be, but what I've gathered so 
far is this:

WINE does have certain requirements regarding memory allocation. In particular 
it (or Windows, rather) really wants a few memory ranges for itself:

(from wine-0.9.17/loader/preloader.c):

 *  0x00000000 - 0x00110000  the DOS area
 *  0x80000000 - 0x81000000  the shared heap
 *  ???        - ???         the PE binary load address (usually starting at 

The first two are particularly important for WINE running in win98 (or 
earlier) emulation mode, which is currently completely broken on FreeBSD, 
since those two memory ranges tend to be unavailable.

The preloader bit from which this is quoted is WINE's "own shared object 
loader that reserves memory that is important to Wine, and then loads the 
main binary and its ELF interpreter", and obviously does not work
right on FreeBSD. I'm not sure whether it can be made to or not, perhaps
somebody familiar with both our VM and runtime linker could take a look.

Some more references:

The other big issue with WINE on FreeBSD seems to be our threading support. 
WINE quite reliably manages to confuse libpthread, see On SMP machines, 
I've even been able to trigger kernel panics with WINE (in win2k+ emulation 
mode) by merely hitting the close button on a windows application (and WINE 
subsequently shutting down):

WINE's threads interface can be found in loader/pthread.c and 
loader/kthread.c - again, it would be great, if someone to whom that sort of 
code means more than just random gibberish could take a look.

   ,_,   | Michael Nottebrock               | lofi at
 (/^ ^\) | FreeBSD - The Power to Serve     |
   \u/   | K Desktop Environment on FreeBSD |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-hackers mailing list