This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: g++ std::map initializing raises segmentation fault.
- From: Marco Atzeri <marco dot atzeri at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 7 Jul 2017 14:51:29 +0200
- Subject: Re: g++ std::map initializing raises segmentation fault.
- Authentication-results: sourceware.org; auth=none
- References: <20170706.212622.2189310858003243560.trueroad@trueroad.jp>
On 06/07/2017 14:26, 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 can not replicate.
$ uname -svr
CYGWIN_NT-6.1 2.8.1(0.312/5/3) 2017-07-03 14:11
$ ./a.exe
Hello World!
Please provide your cygcheck.out as attachment
Problem reports: http://cygwin.com/problems.html
--
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