g++ std::map initializing raises segmentation fault.
Masamichi Hosoda
trueroad@trueroad.jp
Thu Jul 6 12:26:00 GMT 2017
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)
$
```
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
More information about the Cygwin
mailing list