This is the mail archive of the cygwin@sources.redhat.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]

Re: Reason for cygwin GCC 2.97 non-bootstrap found



> Could you [since Kelley is out of town till Sunday, this "you" is
> anyone with a convenient cygwin installation] please compile and run
> the appended test program under cygwin?  It should either exit
> successfully, or crash; I need to know which.

It runs OK.

> #include <sys/types.h>
> #include <sys/mman.h>
> #include <unistd.h>
> #include <string.h>
> 
> #define PAGEPROT PROT_READ|PROT_WRITE
> #define MAPFLAGS MAP_PRIVATE|MAP_ANONYMOUS
> 
> int main(void)
> {
>   size_t pagesize = getpagesize();
>   char *base;
> 
>   base = mmap(0, 16*pagesize, PAGEPROT, MAPFLAGS, -1, 0);
>   memset(base, 0xAB, 16*pagesize);
> 
>   munmap(base + 4*pagesize, pagesize);
> 
>   memset(base, 0xCD, 4*pagesize);
>   memset(base + 5*pagesize, 0xCD, 10*pagesize);
> 
>   return 0;
> }  

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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