delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/07/07/16:43:49

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=bcgXkEsJP6e7h+ZK
UlnzncSOtNIfGbD+Zbnbux7DyejRYZKOYPfp32xe6QDd1zUbSY9yiAAUnaJ0Dx5A
EGj53ArYLL5JFXfIQRyxZDYD3k/jib0hUY/P1UN0eb0hewffo0EY84ZYLEbLPvvu
W5t0v55KeRL32yK5uq5aM8rOir8=
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=mn1goMcupC+av3XgnygFL3
dBeM8=; b=uD5ifEBLkhPq+sMTzHbCjb1rsqEa7JoNYagfjAtkyumKjmzHUqj2UF
K3ommadmyqdgm6hP/kxbVutdEo0f1gCId+rczFU7FWb88gnQfDcXSAqOrjnjDKze
NO/mLH+T1sNGH5CTFrE9KJBFlCe+L1I2gv/CNrgv4cmFDFGseY5uM=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1423
X-HELO: limerock04.mail.cornell.edu
X-CornellRouted: This message has been Routed already.
Subject: Re: g++ std::map initializing raises segmentation fault.
To: cygwin AT cygwin DOT com
References: <20170706 DOT 212622 DOT 2189310858003243560 DOT trueroad AT trueroad DOT jp> <fc380e9c-757d-eeab-86fc-82eaf1550402 AT cornell DOT edu>
From: Ken Brown <kbrown AT cornell DOT edu>
Message-ID: <685f073b-833f-2663-0c68-3ac372edf0a5@cornell.edu>
Date: Fri, 7 Jul 2017 16:43:34 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <fc380e9c-757d-eeab-86fc-82eaf1550402@cornell.edu>
X-PMX-Cornell-Gauge: Gauge=XXXXX
X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none;
X-IsSubscribed: yes

On 7/7/2017 11:12 AM, Ken Brown wrote:
> On 7/6/2017 8:26 AM, Masamichi Hosoda wrote:
>> Hello,
>>
>> On Cygwin 2.8.1 x86_64, I've found that g++ std:map initializing
>> may raise segmentation fault.
>> The binary compiled with cygwin-devel-2.8.0-1
>> does not raise segmentation fault
>> even if on Cygwin 2.8.1 x86_64 environments.
>>
>> So I suspect cygwin-devel-2.8.1-1 is the cause.
>>
>> Here's sample code for reproduce.
>>
>> ```
>> // foo.cc
>> // g++ -std=c++11 foo.cc
>>
>> #include<iostream>
>> #include<map>
>>
>> std::map<int, int> m
>> {
>>    { 1, 1},
>>    { 2, 2}
>> };
>>
>> int main ()
>> {
>>    std::cout << "Hello World!" << std::endl;
>> }
>> ```
>>
>> I've reproduced it on both Windows 7 64 bit and Windows 10 64 bit.
>>
>> ```
>> $ ./a
>> Segmentation fault (core dumped)
> 
> I've just checked that the problem occurs with the 2017-06-20 snapshot 
> but not with the 2017-06-06 snapshot.  I don't have time right now to do 
> a further bisection, but I can probably do it later today or over the 
> weekend if no one beats me to it.

I did the bisection:

6a6c1c52e6bfea85beb06ea60417b90ae3c6857c is the first bad commit
commit 6a6c1c52e6bfea85beb06ea60417b90ae3c6857c
Author: Yaakov Selkowitz <yselkowi AT redhat DOT com>
Date:   Tue Jun 13 14:58:33 2017 -0500

     Feature test macros overhaul: Cygwin signal.h

     This should match newlib's <sys/signal.h>.

Ken

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019