Native stack overlapping system heap base address on some systems

Mike Hearn mh at
Wed Mar 23 05:24:01 CST 2005


Bug #2741 comes from a user who was able to grab a dump of the VM mappings
when the following error occurred:

  HEAP_CreateSystemHeap system heap base address 0x80000000 not available

I know people have been seeing this intermittently for a while now, we
have a few CodeWeavers support tickets with this problem too. The issue
seems to be that the Linux native (main thread) stack was allocated here:

   7fffb000     20K rwx--    [ stack ]

Surprise surprise, 0x7fffb000 + (1024 * 20) == 0x80000000

Unfortunately I lack enough knowledge about the kernels VM algorithms to
say why it's being allocated here. For comparison on my Fedora Core 3

   fef0d000     16K rwx--    [ stack ]

One other thing I don't understand. It seems the stack and the system heap
overlap by exactly 1 byte, otherwise the mmap would not fail. But, this
area is (theoretically) being protected by the preloader: so how can this
be? There is something I'm missing here, I suspect an off-by-one error in
my arithmetic.

thanks -mike

More information about the wine-devel mailing list