From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14889 invoked by alias); 7 Jul 2017 20:43:36 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 14839 invoked by uid 89); 7 Jul 2017 20:43:35 -0000 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 Received: from limerock04.mail.cornell.edu (HELO limerock04.mail.cornell.edu) (128.84.13.244) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Jul 2017 20:43:34 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v67KhWFd007157 for ; Fri, 7 Jul 2017 16:43:32 -0400 Received: from [192.168.0.4] (mta-68-175-129-7.twcny.rr.com [68.175.129.7] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id v67KhUFC021282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Fri, 7 Jul 2017 16:43:31 -0400 Subject: Re: g++ std::map initializing raises segmentation fault. To: cygwin@cygwin.com References: <20170706.212622.2189310858003243560.trueroad@trueroad.jp> From: Ken Brown Message-ID: <685f073b-833f-2663-0c68-3ac372edf0a5@cornell.edu> Date: Fri, 07 Jul 2017 20:43:00 -0000 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00119.txt.bz2 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 >> #include >> >> std::map 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 Date: Tue Jun 13 14:58:33 2017 -0500 Feature test macros overhaul: Cygwin signal.h This should match newlib's . 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