This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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...

> 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
http://cygwin.com/contrib.html

> 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? 


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]