[LLVMbugs] [Bug 21460] New: Segfault istream.tellg() and	unordered_map
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Sun Nov  2 17:26:45 PST 2014
    
    
  
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: unassignedclangbugs at nondot.org
          Reporter: mail at tylor.io
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141103/5f9548ab/attachment.html>
    
    
More information about the llvm-bugs
mailing list