This is the mail archive of the
mailing list for the Cygwin project.
Re: A problem with mmap on Win98
- From: Steve Underwood <steveu at coppice dot org>
- To: cygwin at cygwin dot com
- Date: Sun, 11 May 2003 15:21:55 +0800
- Subject: Re: A problem with mmap on Win98
On Tue, May 06, 2003 at 04:07:49PM +0800, Steve Underwood wrote:
I am using the current version of cygwin (1.3.22). When I build gcc to
cross-compile for the TI MSP430 MCUs the result works OK on 2000 and XP
machines. On some Win98 and Me machines it works, but on others it
crashes with a segmentation violation. I traced this to a problem with
anonymous mmap. If I keep calling mmap on the problem machines it keeps
returning the same memory pointer twice. If I patch GCC to check for a
repeat of the same memory pointer, and allocate again until it gets a
different pointer, my GCC build seems to run OK on these problem machines.
The results are not random. They follow a pattern. If I allocate 65536
byte blocks, I consistently get the same pointer twice, before I get a
pointer 65536 bytes greater. If I allocate 16384 byte blocks, I get four
pointers incrementing by 0x4000 each. Then I get a repeat of the fourth
pointer. Then I get four more properly incrementing pointers.
Weird, especially that it only happens on 9x...
Its weird that there is trouble with windows? :-)
Its only on some Win9x machines, too. I did my original software testing and
produced a binary installer on a Win98SE machine that worked without a hitch.
Then various users started complaining it would not work for them. Now I have
found a Win98SE machine that exhibits the problem, so I can follow up on it.
Perhaps the different behaviour relates to the system patch level, or something.
I tried downloading the source code for cygwin, to build it, and do a
little debugging of my own. However, the make files build most of the
code, and then fail saying there is no rule to make
/usr/lib/w32api/Makefile needed by /lib/. The make dependancies are a
little intertwined, and I gave up trying to find the cause of this problem.
Did you build in the source dir? Don't do this. For more info see
I tries building in the suorce dir. Then I read the instructions, so I tried again
using another dir. In both cases I got the same error.
Can anyone help?
Please create a *brief* testcase in C which encounters the above mmap
problem and send it to this list. I'll have a look, then.
Did I mention that the testcase should be as short as possible?
Is gcc-core-3.2.3 built for C support a small enough test case? :-)
Seriously, it may be better if I debug this a little, as I have a machine
exhibiting the problem. I have no idea what proportion of Win98 machines succeed
Does anyone have pointers to solving my cygwin build problem? I have the latest
cygwin (updated this week) installed on a WinXP machine, including (of course) the
development tools packages. I downloaded the source for the current version of the
cygwin DLL. I configured to build in another directory, and got the error message
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html