http://llvm.org/bugs/show_bug.cgi?id=21460

            Bug ID: 21460
           Summary: Segfault istream.tellg() and unordered_map
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

I get a segfault when calling tellg() on any istream.

#include <string>
#include <sstream>

int main() {
  std::string str = "Hello, world";
  std::istringstream in(str);
  std::string word;
  in >> word;
  int pos = in.tellg();
}

I also get a segfault when trying to insert an element into a unordered_map

#include <unordered_map>

int main() {
  std::unordered_map<int, int> int_map;
  int_map[2] = 3;
}

When I run this through gdb I get this:

Program received signal SIGSEGV, Segmentation fault.
0x000000006fc8cac8 in ?? () from c:\msys64\mingw64\bin\libstdc++-6.dll

I running this on Windows 7 using the mingw64 package via msys2
I don't get this behavior with g++ 4.9.1 or in the mingw32 package of the same
version.

$ clang++ --version
clang version 3.5.0 (tags/RELEASE_350/final)
Target: x86_64-w64-windows-gnu
Thread model: posix

$ uname -a
MINGW64_NT-6.1 tower 2.0.0(0.279/5/3) 2014-10-27 06:58 x86_64 Msys

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to