Re: mmap of large amount returns invalid pointer

2002-03-21 Thread Stephen Weeks
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

Re: mmap of large amount returns invalid pointer

2002-03-19 Thread Corinna Vinschen
On Sun, Mar 17, 2002 at 10:51:29AM -0800, Stephen Weeks wrote: Corinna: Anyway, I've checked in a patch. It now checks if VirtualProtect failed and then mmap() also fails. Try the next developers snapshot, please. Thanks for the fix. I tried the 2002-Mar-16 snapshot and the test

Re: mmap of large amount returns invalid pointer

2002-03-14 Thread Corinna Vinschen
On Wed, Mar 13, 2002 at 01:57:33PM -0800, Stephen Weeks wrote: I don't think this explanation is correct. I still think that mmap is returning a pointer to an invalid chunk of memory. To demonstrate this, here is a program that does an mmap, fprintf, and then attempts to write to the first

Re: mmap of large amount returns invalid pointer

2002-03-13 Thread Stephen Weeks
If you look into the strace you'll see that MapViewOfFileEx() returns a valid memory area. And no, it does *not* return an error code. MapViewOfFileEx() is reliable enough to not return a memory area and an error code. The failing function is a following VirtualProtect() which job is to

Re: mmap of large amount returns invalid pointer

2002-03-12 Thread Corinna Vinschen
On Mon, Mar 11, 2002 at 08:38:34PM -0800, Stephen Weeks wrote: I am experience a problem where mmap does not return -1, but the pointer returned is not to a valid chunk of memory. I have included a sample program, the output that I see, and the output of cygcheck below. I have tried

Re: mmap of large amount returns invalid pointer

2002-03-12 Thread Stephen Weeks
However, before talking further about this I'd like you to run your below test application again but this time under strace. Could you please send the strace output to this list (it's not that long)? Here is the strace output. ** Program name:

Re: mmap of large amount returns invalid pointer

2002-03-12 Thread Corinna Vinschen
On Tue, Mar 12, 2002 at 10:08:05AM -0800, Stephen Weeks wrote: However, before talking further about this I'd like you to run your below test application again but this time under strace. Could you please send the strace output to this list (it's not that long)? Here is the strace

RE: mmap of large amount returns invalid pointer

2002-03-12 Thread Heribert Dahms
([EMAIL PROTECTED]) -Original Message- From: Stephen Weeks [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 19:08 To: [EMAIL PROTECTED] Subject: Re: mmap of large amount returns invalid pointer [Heribert] [snip] 1668 719099 [main] mmap 159 mmap: addr 0

RE: mmap of large amount returns invalid pointer

2002-03-12 Thread Stephen Weeks
looks like you have overlooked that mmap doesn't return NULL despite win32 error in strace (see below): c:\net helpmsg 1455 The paging file is too small for this operation to complete. Thanks for pointing that out. I agree that it looks like the Cygwin dll is failing to check for the

Re: mmap of large amount returns invalid pointer

2002-03-12 Thread Christopher Faylor
On Tue, Mar 12, 2002 at 06:21:15PM -0800, Stephen Weeks wrote: looks like you have overlooked that mmap doesn't return NULL despite win32 error in strace (see below): c:\net helpmsg 1455 The paging file is too small for this operation to complete. Thanks for pointing that out. I agree

Re: mmap of large amount returns invalid pointer

2002-03-12 Thread Corinna Vinschen
On Tue, Mar 12, 2002 at 11:44:36PM +0100, Heribert Dahms wrote: Hi Stephen and Corinna, looks like you have overlooked that mmap doesn't return NULL despite win32 error in strace (see below): c:\net helpmsg 1455 The paging file is too small for this operation to complete. No, I didn't