delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/04/09/12:35:28

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 9 Apr 2002 18:34:42 +0200
From: Corinna Vinschen <cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: mmap of large amount returns invalid pointer
Message-ID: <20020409183442.H1127@cygbert.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20020319115739 DOT U29574 AT cygbert DOT vinschen DOT de> <15514 DOT 12648 DOT 934526 DOT 894670 AT asv-058 DOT sjc DOT ca DOT bbnow DOT net>
Mime-Version: 1.0
In-Reply-To: <15514.12648.934526.894670@asv-058.sjc.ca.bbnow.net>
User-Agent: Mutt/1.3.22.1i

On Thu, Mar 21, 2002 at 11:15:52AM -0800, Stephen Weeks wrote:
> 
> > Could you please describe what happens in the error case
> > in plain English?  I see that there could be a timing problem in
> > fork() but I'd like to read how the error looks like.
> 
> The process mmaps some memory, writes to the memory, and then forks.
> After the fork, the parent unmaps the memory and exits, while the
> child reads from the memory.  From looking at the strace, I see that
> the Cygwin fork implementation allows the parent process to continue
> before ensuring that the child has completed the memory copy.  In this
> case, the parent unmaps the memory before the child can copy it.
> Hence, we see the following line in the strace, which indicates the
> failure in the child process (138).
> 
>  1813  914381 [main] fork 138 fixup_mmaps_after_fork: ReadProcessMemory failed for MAP_PRIVATE address 0x2A230000, Win32 error 998
> c:\sweeks\tmp\fork.exe: *** recreate_mmaps_after_fork_failed

I've checked in a fix.  Please try the next devlopers snapshot
or current from CVS.

Thanks for the report and the testcase,
Corinna

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019