<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Crash when build iostream.cpp from libc++ on Windows"
href="http://llvm.org/bugs/show_bug.cgi?id=22035">22035</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash when build iostream.cpp from libc++ on Windows
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows 2000
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>abyss.7@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Initially, I try to build libc++ on Windows. But it doesn't show any
stacktrace, so I took generated cpp+sh and rerun on Linux to get stacktrace.
The only difference in a command-line is the path to clang++.
Clang++ crashes with a following output:
#0 0x23edc58 llvm::sys::PrintStackTrace(_IO_FILE*)
(/home/ilezhankin/.local/bin/clang+0x23edc58)
#1 0x23ef14b (/home/ilezhankin/.local/bin/clang+0x23ef14b)
#2 0x7f3dc4f4c0d0 __restore_rt (/lib64/libpthread.so.0+0x100d0)
#3 0x22d91e1 llvm::Constant::isNullValue() const
(/home/ilezhankin/.local/bin/clang+0x22d91e1)
#4 0x22015b9 llvm::TargetLoweringObjectFile::getKindForGlobal(llvm::GlobalValue
const*, llvm::TargetMachine const&)
(/home/ilezhankin/.local/bin/clang+0x22015b9)
#5 0x2202252
llvm::TargetMachine::getNameWithPrefix(llvm::SmallVectorImpl<char>&,
llvm::GlobalValue const*, llvm::Mangler&, bool) const
(/home/ilezhankin/.local/bin/clang+0x2202252)
#6 0x22022fa llvm::TargetMachine::getSymbol(llvm::GlobalValue const*,
llvm::Mangler&) const (/home/ilezhankin/.local/bin/clang+0x22022fa)
#7 0x1e01df6 llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*)
(/home/ilezhankin/.local/bin/clang+0x1e01df6)
#8 0x1e05320 llvm::AsmPrinter::doFinalization(llvm::Module&)
(/home/ilezhankin/.local/bin/clang+0x1e05320)
#9 0x238db19 llvm::FPPassManager::doFinalization(llvm::Module&)
(/home/ilezhankin/.local/bin/clang+0x238db19)
#10 0x238df65 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/ilezhankin/.local/bin/clang+0x238df65)
#11 0x8ee28d clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::StringRef, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) (/home/ilezhankin/.local/bin/clang+0x8ee28d)
#12 0x8e442e (/home/ilezhankin/.local/bin/clang+0x8e442e)
#13 0xa8a023 clang::ParseAST(clang::Sema&, bool, bool)
(/home/ilezhankin/.local/bin/clang+0xa8a023)
#14 0x8e32fc clang::CodeGenAction::ExecuteAction()
(/home/ilezhankin/.local/bin/clang+0x8e32fc)
#15 0x714aa9 clang::FrontendAction::Execute()
(/home/ilezhankin/.local/bin/clang+0x714aa9)
#16 0x6e9143 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/ilezhankin/.local/bin/clang+0x6e9143)
#17 0x6cf75a clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/ilezhankin/.local/bin/clang+0x6cf75a)
#18 0x6c6be6 cc1_main(llvm::ArrayRef<char const*>, char const*, void*)
(/home/ilezhankin/.local/bin/clang+0x6c6be6)
#19 0x6ce2ad main (/home/ilezhankin/.local/bin/clang+0x6ce2ad)
#20 0x7f3dc416cfe0 __libc_start_main
/usr/src/debug/glibc-2.20/csu/libc-start.c:323:0
#21 0x6c6871 _start (/home/ilezhankin/.local/bin/clang+0x6c6871)
Stack dump:
0. Program arguments: clang++ -cc1 -triple i686-pc-windows-msvc -emit-obj
-disable-free -disable-llvm-verifier -main-file-name iostream.cpp
-mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4
-dwarf-column-info -nostdinc++ -D _LIBCPP_DLL -D cxx_EXPORTS -D
_CRT_SECURE_NO_WARNINGS -D _HAS_CHAR16_T_LANGUAGE_SUPPORT -D _HAS_EXCEPTIONS=0
-O3 -Wall -Wno-unused-parameter -Wwrite-strings -Wno-long-long -Wno-error
-pedantic -std=c++1y -fdeprecated-macro -ferror-limit 19 -fmessage-length 0
-mstackrealign -fms-extensions -fms-compatibility-version=17.00
-fdelayed-template-parsing -fobjc-runtime=gcc -fdiagnostics-show-option
-vectorize-loops -vectorize-slp -x c++ iostream-837ead.cpp
1. <eof> parser at end of file
2. Code generation
iostream-837ead.sh: line 1: 8222 Segmentation fault (core dumped)
"clang++" "-cc1" "-triple" "i686-pc-windows-msvc" "-emit-obj" "-disable-free"
"-disable-llvm-verifier" "-main-file-name" "iostream.cpp" "-mrelocation-model"
"pic" "-pic-level" "2" "-mthread-model" "posix" "-mdisable-fp-elim"
"-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-target-cpu" "pentium4"
"-dwarf-column-info" "-nostdinc++" "-D" "_LIBCPP_DLL" "-D" "cxx_EXPORTS" "-D"
"_CRT_SECURE_NO_WARNINGS" "-D" "_HAS_CHAR16_T_LANGUAGE_SUPPORT" "-D"
"_HAS_EXCEPTIONS=0" "-O3" "-Wall" "-Wno-unused-parameter" "-Wwrite-strings"
"-Wno-long-long" "-Wno-error" "-pedantic" "-std=c++1y" "-fdeprecated-macro"
"-ferror-limit" "19" "-fmessage-length" "0" "-mstackrealign" "-fms-extensions"
"-fms-compatibility-version=17.00" "-fdelayed-template-parsing"
"-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-vectorize-loops"
"-vectorize-slp" "-x" "c++" "iostream-837ead.cpp"</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>