This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Help needed with libsigsegv2.10-2 + cygwin 2.4.1-1 + win7
- From: Marco Atzeri <marco dot atzeri at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 18 Mar 2016 22:34:55 +0100
- Subject: Re: Help needed with libsigsegv2.10-2 + cygwin 2.4.1-1 + win7
- Authentication-results: sourceware.org; auth=none
- References: <1458329766 dot 2996 dot 6 dot camel at linuxBox>
On 18/03/2016 20:36, ari kumpumÃki wrote:
Hi all
Why the following test code works fluently in Linux and cygwin 1.5.
But with cygwin 2.4.1 it gives a segmentation fault, when running "x =
mem[filePageSize];"
return (char *) mmap(0, ALIGN_TO_PAGE_SIZE(size), PROT_NONE,
MAP_SHARED | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
why a file descriptor = -1 ?
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html
Please note also that unsigned is not always same size of address
(eg 64 bit)
size_t works better for that.
In any case you should check the function result.
Regards
Marco
--
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