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:date:message-id:to:subject:from:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=LdU GqrABTZo/VTWny2S+ZjQO/17MAk7wIiqdImOH1NqT2ACpM0tzmdXJ8Pf1ZDDp7JD ZszFhnNcm5Vmn4tBQXwmWNANNzn1RP2f+BdbXoHwNPtJJcp7pykamU3qcpPoZtlJ 6JsNM4FO3yddyPdM/0D+/Gy01nJJMMVH6o4+CqZk= 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:date:message-id:to:subject:from:mime-version :content-type:content-transfer-encoding; s=default; bh=r5REccJMF LSkjJTeIjYEATfb2UA=; b=jmVZtWPPxH/FceTvwSPfbrVsCs+F25JoP7/kKdH1L LxREC1Fp3jNHjwdl8XVrEgclGgLGldZEd07s4mjrR0auSKA8zW9ljTf38a1dUO0X JxsnoKU7+ZxfKiA1wKrEFocTL2inpXxow60ONmUScMHACP9CRphB+opqsh7tE1FG oM= 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.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy= X-HELO: msa02y.plala.or.jp Date: Thu, 06 Jul 2017 21:26:22 +0900 (JST) Message-Id: <20170706.212622.2189310858003243560.trueroad@trueroad.jp> To: cygwin AT cygwin DOT com Subject: g++ std::map initializing raises segmentation fault. From: Masamichi Hosoda Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-VirusScan: Outbound; msa02m; Thu, 6 Jul 2017 21:26:24 +0900 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) $ ``` Here's my environment. ``` $ uname -a CYGWIN_NT-10.0 Z87EXTREAM4 2.8.1(0.312/5/3) 2017-07-03 14:11 x86_64 Cygwin $ g++ --version g++ (GCC) 5.4.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ ``` Thanks -- 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