X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=la1GvTSEhf57hrAs iEjdpOkNbxNApHKfPmCFlpZRVEOEc7MESzTSUR2R1QOCrFUB6k2TGxm2/AWXfuDN r977xcqqdgC6R/Be6+Eg5Tn2ko/ULYv9IrkGWzmfDE5TZ00XNPjYhecj3NBDHmqL DmPTtGtS4GVCYMvjd8Ja8hQJdcY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=P42vjuQcalLhCAfX99CzP/ SRfcA=; b=xRl9RWQTFd3Kz5gd1MKkbJM6Jjmve5lKQnrNMJnuMSm+wf5plgnHg3 whmgeq1UGh9E3lXPXcNJoU1MT6JVHn+1jAn+o1sDDjtiSbLHpaQMI8glzb+76uUz K75Be8NGO7xQuxdNWPk8htI9E03K+2C7/Eq0uF448igFxFGwrX4ZE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=ari, fluently, filePageSize, MAP_NORESERVE X-HELO: mail-wm0-f46.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=cFESl+9Urak7cbQIoZe3U+oWlgAwc5zsnnTZvO8jLBQ=; b=Qawi7Rg0th5GO/i5cAa7kxJf3A+bwpc6ISPBB7+vy5fuF9C92Z/sCR9LnJzU4ohANv W+CpsEtHIsQb6DiGFYHWbbZZ8H8rloGsIjAcub3U5q6h2x8YXy+YcVCpsl3fDXQYhIOt qpUa7vLzqD2AfkqHvGRxX6H/b7w5SReg+iqC3jpAHL/ytXF4xq0z/9PAAaulh18onDwe mmCjyrRz/E87s4UIeZC5OcONKAtgv0GlF5/BHdk/p/b8afNadF+IOF40OK2aGyaRYF+l qnxeA239sq5PQw/VY+i/v3OEQba48GvXlKHsTcpBL4lLtfFVF5AOvS7Y/VcBG97S1lRo lKEw== X-Gm-Message-State: AD7BkJLG9qPeMBdtqqJE2di3MSQzmCQMfKYWC60Q3bj+es4R6IoYXOVLTUpGojtdxJT6Lg== X-Received: by 10.194.47.133 with SMTP id d5mr19082448wjn.87.1458336900961; Fri, 18 Mar 2016 14:35:00 -0700 (PDT) Subject: Re: Help needed with libsigsegv2.10-2 + cygwin 2.4.1-1 + win7 To: cygwin AT cygwin DOT com References: <1458329766 DOT 2996 DOT 6 DOT camel AT linuxBox> From: Marco Atzeri Message-ID: <56EC747F.2040306@gmail.com> Date: Fri, 18 Mar 2016 22:34:55 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <1458329766.2996.6.camel@linuxBox> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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