Re: Problem with mmap in latest snapshot

2010-09-21 Thread Heath Kehoe

 On 9/21/2010 11:48 AM, Corinna Vinschen wrote:

I've checked in the patch.  Please test the next developer snapshot.
Thanks again for the testcase.  It was very helpful.



I built from CVS and it's working again. Thanks!

-h


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


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



Re: Problem with mmap in latest snapshot

2010-09-21 Thread Corinna Vinschen
On Sep 21 14:21, Corinna Vinschen wrote:
> On Sep 20 17:20, Heath Kehoe wrote:
> >  On 9/20/2010 3:00 PM, Heath Kehoe wrote:
> > >   My application uses mmap on a 16MB file. On released 1.7.7, there's no
> > >problem. But with the 20100919 snapshot, it crashes when it tries to
> > >access the mmap space past the first 32KB or so. Attached is a simple
> > >test program that illustrates the problem.
> > >
> > 
> > The test program also crashes on 20100917, but it works with 20100912.
> 
> Thanks for the testcase.  I found the problem.  While debugging I came
> across another problem which I'll intend to fix as well.  I have to
> make some more test first before I check in the changes, though.

I've checked in the patch.  Please test the next developer snapshot.
Thanks again for the testcase.  It was very helpful.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

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



Re: Problem with mmap in latest snapshot

2010-09-21 Thread Corinna Vinschen
On Sep 20 17:20, Heath Kehoe wrote:
>  On 9/20/2010 3:00 PM, Heath Kehoe wrote:
> >   My application uses mmap on a 16MB file. On released 1.7.7, there's no
> >problem. But with the 20100919 snapshot, it crashes when it tries to
> >access the mmap space past the first 32KB or so. Attached is a simple
> >test program that illustrates the problem.
> >
> 
> The test program also crashes on 20100917, but it works with 20100912.

Thanks for the testcase.  I found the problem.  While debugging I came
across another problem which I'll intend to fix as well.  I have to
make some more test first before I check in the changes, though.


Thanks again,
Corinn

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

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



Re: Problem with mmap in latest snapshot

2010-09-20 Thread Heath Kehoe

 On 9/20/2010 3:00 PM, Heath Kehoe wrote:

   My application uses mmap on a 16MB file. On released 1.7.7, there's no
problem. But with the 20100919 snapshot, it crashes when it tries to
access the mmap space past the first 32KB or so. Attached is a simple
test program that illustrates the problem.



The test program also crashes on 20100917, but it works with 20100912.

-h

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


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



Problem with mmap in latest snapshot

2010-09-20 Thread Heath Kehoe
 My application uses mmap on a 16MB file. On released 1.7.7, there's no 
problem. But with the 20100919 snapshot, it crashes when it tries to 
access the mmap space past the first 32KB or so. Attached is a simple 
test program that illustrates the problem.


* With 1.7.7 *

$ uname -a
CYGWIN_NT-6.1-WOW64 hkehoe1 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin

$ ./a
creating mmap-test-file
Writing zeros
mmap-ing
writing ones to mmap region
done!

$ ls -l mmap*
-rw-r--r--+ 1 hkehoe Domain Users 16777216 2010-09-20 14:51 mmap-test-file

$ od -tc mmap-test-file
000 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001
*
1

* With snapshot *

$ uname -a
CYGWIN_NT-6.1-WOW64 hkehoe1 1.7.8s(0.231/5/3) 20100919 16:19:37 i686 Cygwin

$ ./a
creating mmap-test-file
Writing zeros
mmap-ing
writing ones to mmap region
Segmentation fault (core dumped)

$ od -tc mmap-test-file
000 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001 001
*
010  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
1




__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__#include 
#include 
#include 
#include 
#include 
#include 

#define MMAP_FILE "mmap-test-file"
#define MMAP_SIZE 16384*1024

main()
{
int fd;
char* maddr;

printf("creating " MMAP_FILE "\n");
fd = open(MMAP_FILE, O_CREAT|O_TRUNC|O_RDWR, 0666);
if(fd < 0)
{
perror("Could not open " MMAP_FILE);
exit(1);
}

printf("Writing zeros\n");
{
int n = MMAP_SIZE;
char buf[1024];
memset(buf, 0, 1024);
while(n > 0)
{
write(fd, buf, 1024);
n -= 1024;
}
}

printf("mmap-ing\n");
maddr = mmap(NULL, MMAP_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
if(maddr == NULL || maddr == MAP_FAILED)
{
perror("mmap");
exit(1);
}

printf("writing ones to mmap region\n");
{
int n;
for(n = 0; n < MMAP_SIZE; n++)  
maddr[n] = 1;
}

printf("done!\n");
}


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