[llvm-bugs] [Bug 28493] New: mingw32:clang++ compile crash when use -O2 : around allocate heap memory?

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jul 10 20:28:37 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28493

            Bug ID: 28493
           Summary: mingw32:clang++ compile crash when use -O2 : around
                    allocate heap memory?
           Product: libc++
           Version: 3.8
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: yume-wikijp at live.jp
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

I'm using msys2 mingw32 clang++.

$ clang++ sample.cpp -v -o sample.out -O2 -Wall -Wextra -std=c++11
clang version 3.8.0 (tags/RELEASE_380/final)
Target: i686-w64-windows-gnu
Thread model: posix
InstalledDir: D:\msys64\mingw32\bin
 "D:\\msys64\\mingw32\\bin\\clang++.exe" -cc1 -triple i686-w64-windows-gnu
-emit-obj -disable-free -disable-llvm-verifier -main-file-name sample.cpp
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -target-cpu pentium4 -momit-leaf-frame-pointer -v
-dwarf-column-info -debugger-tuning=gdb -resource-dir
"D:\\msys64\\mingw32\\bin\\..\\lib\\clang\\3.8.0" -internal-isystem
"D:\\msys64\\mingw32\\i686-w64-mingw32\\include\\c++" -internal-isystem
"D:\\msys64\\mingw32\\i686-w64-mingw32\\include\\c++\\i686-w64-mingw32"
-internal-isystem
"D:\\msys64\\mingw32\\i686-w64-mingw32\\include\\c++\\backward"
-internal-isystem "D:\\msys64\\mingw32\\i686-w64-mingw32\\include\\c++\\5.4.0"
-internal-isystem
"D:\\msys64\\mingw32\\i686-w64-mingw32\\include\\c++\\5.4.0\\i686-w64-mingw32"
-internal-isystem
"D:\\msys64\\mingw32\\i686-w64-mingw32\\include\\c++\\5.4.0\\backward"
-internal-isystem "D:\\msys64\\mingw32\\include\\c++\\5.4.0" -internal-isystem
"D:\\msys64\\mingw32\\include\\c++\\5.4.0\\i686-w64-mingw32" -internal-isystem
"D:\\msys64\\mingw32\\include\\c++\\5.4.0\\backward" -internal-isystem
"D:\\msys64\\mingw32\\lib\\gcc\\i686-w64-mingw32\\5.4.0\\include\\c++"
-internal-isystem
"D:\\msys64\\mingw32\\lib\\gcc\\i686-w64-mingw32\\5.4.0\\include\\c++\\i686-w64-mingw32"
-internal-isystem
"D:\\msys64\\mingw32\\lib\\gcc\\i686-w64-mingw32\\5.4.0\\include\\c++\\backward"
-internal-isystem "D:\\msys64\\mingw32\\bin\\..\\lib\\clang\\3.8.0\\include"
-internal-isystem
"D:\\msys64\\mingw32\\lib\\gcc\\i686-w64-mingw32\\5.4.0\\include"
-internal-isystem
"D:\\msys64\\mingw32\\i686-w64-mingw32/sys-root/mingw/include"
-internal-isystem
"D:\\msys64\\mingw32\\lib\\gcc\\i686-w64-mingw32\\5.4.0\\include-fixed"
-internal-isystem "D:\\msys64\\mingw32\\i686-w64-mingw32\\include"
-internal-isystem "D:\\msys64\\mingw32\\include" -O2 -Wall -Wextra -std=c++11
-fdeprecated-macro -fdebug-compilation-dir
"D:\\user\\documents\\git\\string_split\\sample" -ferror-limit 19
-fmessage-length 203 -fno-use-cxa-atexit -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops
-vectorize-slp -o "D:\\msys64\\tmp\\sample-6463c7.o" -x c++ sample.cpp
clang -cc1 version 3.8.0 based upon LLVM 3.8.0 default target
i686-w64-windows-gnu
ignoring nonexistent directory "D:\msys64\mingw32\i686-w64-mingw32\include\c++"
ignoring nonexistent directory
"D:\msys64\mingw32\i686-w64-mingw32\include\c++\i686-w64-mingw32"
ignoring nonexistent directory
"D:\msys64\mingw32\i686-w64-mingw32\include\c++\backward"
ignoring nonexistent directory
"D:\msys64\mingw32\i686-w64-mingw32\include\c++\5.4.0"
ignoring nonexistent directory
"D:\msys64\mingw32\i686-w64-mingw32\include\c++\5.4.0\i686-w64-mingw32"
ignoring nonexistent directory
"D:\msys64\mingw32\i686-w64-mingw32\include\c++\5.4.0\backward"
ignoring nonexistent directory
"D:\msys64\mingw32\lib\gcc\i686-w64-mingw32\5.4.0\include\c++"
ignoring nonexistent directory
"D:\msys64\mingw32\lib\gcc\i686-w64-mingw32\5.4.0\include\c++\i686-w64-mingw32"
ignoring nonexistent directory
"D:\msys64\mingw32\lib\gcc\i686-w64-mingw32\5.4.0\include\c++\backward"
ignoring nonexistent directory
"D:\msys64\mingw32\i686-w64-mingw32/sys-root/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 D:\msys64\mingw32\include\c++\5.4.0
 D:\msys64\mingw32\include\c++\5.4.0\i686-w64-mingw32
 D:\msys64\mingw32\include\c++\5.4.0\backward
 D:\msys64\mingw32\bin\..\lib\clang\3.8.0\include
 D:\msys64\mingw32\lib\gcc\i686-w64-mingw32\5.4.0\include
 D:\msys64\mingw32\lib\gcc\i686-w64-mingw32\5.4.0\include-fixed
 D:\msys64\mingw32\i686-w64-mingw32\include
 D:\msys64\mingw32\include
End of search list.
#0 0x05e6779d
#1 0x0028dfd0
#2 0x00e054a1 (D:\msys64\mingw32\bin\clang++.exe+0xa054a1)
#3 0x779fe40c RtlInitUnicodeString (C:\Windows\SysWOW64\ntdll.dll+0x2e40c)
#4 0x779fe172 RtlAllocateHeap (C:\Windows\SysWOW64\ntdll.dll+0x2e172)
#5 0x779fe40c RtlInitUnicodeString (C:\Windows\SysWOW64\ntdll.dll+0x2e40c)
#6 0x779fe172 RtlAllocateHeap (C:\Windows\SysWOW64\ntdll.dll+0x2e172)
#7 0x761d9d45 malloc (C:\Windows\syswow64\msvcrt.dll+0x9d45)
#8 0x6fef6c7a (D:\msys64\mingw32\bin\libstdc++-6.dll+0xb6c7a)
#9 0x021d0c1d (D:\msys64\mingw32\bin\clang++.exe+0x1dd0c1d)
#10 0x6fef6c7a (D:\msys64\mingw32\bin\libstdc++-6.dll+0xb6c7a)
clang++.exe: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.8.0 (tags/RELEASE_380/final)
Target: i686-w64-windows-gnu
Thread model: posix
InstalledDir: D:\msys64\mingw32\bin
clang++.exe: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang++.exe: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++.exe: note: diagnostic msg: D:\msys64\tmp\sample-704744.cpp
clang++.exe: note: diagnostic msg: D:\msys64\tmp\sample-704744.sh
clang++.exe: note: diagnostic msg:

********************


msys2 mingw32 clang++ only fail. msys2 mingw64 clang++ work fine.


sample.cpp is a part of 
https://github.com/yumetodo/string_split
this repo(./sample/sample.cpp).

D:\msys64\tmp\sample-704744.sh
http://pastebin.com/MFypKbWK

-- 
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/20160711/dd9bc1b9/attachment.html>


More information about the llvm-bugs mailing list