Wine and mmap

Gerald Pfeifer gerald at pfeifer.com
Sat Oct 30 13:16:01 PDT 2004


On Sun, 5 Sep 2004, Anish Mistry wrote:
>> Anish, do you have any news on this patch?  (Wine has been broken for a
>> couple of months now, and it would be great to have at least 5.3 fixed.)
> I'm still in the process of try to fix wine so that the new versions after
> June work too.  Unless I have some major break through or someone else can
> fix the problem of wine not loading the evecutable at the default load
> location it probably won't be.

Do you have any news on that, Anish?

I just tried to disable the mmap calls that have been causing troubles,
by means of the patch below, which leads to a different error -- Wine is
rapidly deteriorating on FreeBSD, we really need to get something working
soon, or it'll be dead in the water forever. :-(

> To see what I mean use Brian Fundakowski Feldman's patch to fix a pthread
> problem in (thr_stack.c) and apply my mmap patch and try to run a few
> programs with the August version of wine.
> What seems to be the problem is that there is an mmap call in wine that I
> can't seem to find that ends up allocating allocating the space at least on
> my system (addr=0x003a0000 size=0x00010100) after the initial mmaping that
> consumes the default load location of 0x00400000 so then wine doesn't like
> that and dies.  Some apps DO work since apparently they don't trigger the
> previously stated mmap over the load location.

If I try to run the current (= October) version of Wine with the patch 
below, on FreeBSD 4.10, I get: assertion "libc_sigaction" failed: file 
"kthread.c", line 943.

Gerald

Index: libs/wine/mmap.c
===================================================================
RCS file: /home/wine/wine/libs/wine/mmap.c,v
retrieving revision 1.7
diff -u -3 -p -r1.7 mmap.c
--- libs/wine/mmap.c	24 Jul 2004 02:30:09 -0000	1.7
+++ libs/wine/mmap.c	30 Oct 2004 20:04:47 -0000
@@ -254,6 +254,9 @@ void mmap_init(void)
      struct reserved_area *area;
      struct list *ptr;
  #ifdef __i386__
+#if ! defined(__FreeBSD__)
+    /* FIXME: this is broken on FreeBSD (verified on 4.10 and 5.2.1). */
+
      char stack;
      char * const stack_ptr = &stack;
      char *user_space_limit = (char *)0x80000000;
@@ -280,6 +283,7 @@ void mmap_init(void)
          /* Linux heuristic: if the stack top is at c0000000, assume the address space */
          /* ends there, this avoids a lot of futile allocation attempts */
          if (base != (char *)0xc0000000)
+#endif
  #endif
              reserve_area( base, 0 );
      }


More information about the freebsd-current mailing list