<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 --- - Clang++ crashes while using libc++ <future>"
href="http://llvm.org/bugs/show_bug.cgi?id=18933">18933</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang++ crashes while using libc++ <future>
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.4
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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++11
</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>Compiles fine with libstd++ <future>, but crashes with the libc++ one.
The libc++ version is RELEASE_34/final (r201930).
The diagnostics say the following as it is:
clang: /home/user/Projects/llvm/include/llvm/Support/Casting.h:97: static bool
llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To =
clang::BinaryOperator; From = clang::Stmt]: Assertion `Val && "isa<> used on a
null pointer"' failed.
0 clang 0x000000000232d952 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1 clang 0x000000000232d574
2 libpthread.so.0 0x0000003d3560f750
3 libc.so.6 0x0000003d35235c39 gsignal + 57
4 libc.so.6 0x0000003d35237348 abort + 328
5 libc.so.6 0x0000003d3522eb96
6 libc.so.6 0x0000003d3522ec42
7 clang 0x0000000000aa0a4d
8 clang 0x0000000000a9f7b0
9 clang 0x0000000000aa1013
clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot) + 339
10 clang 0x0000000000a6c10b
11 clang 0x0000000000a6c718
clang::CodeGen::CodeGenFunction::EmitInitializerForField(clang::FieldDecl*,
clang::CodeGen::LValue, clang::Expr*, llvm::ArrayRef<clang::VarDecl*>) + 1384
12 clang 0x0000000000a6cb9d
13 clang 0x0000000000a6d4db
clang::CodeGen::CodeGenFunction::EmitCtorPrologue(clang::CXXConstructorDecl
const*, clang::CXXCtorType, clang::CodeGen::FunctionArgList&) + 747
14 clang 0x0000000000a6da57
clang::CodeGen::CodeGenFunction::EmitConstructorBody(clang::CodeGen::FunctionArgList&)
+ 183
15 clang 0x00000000009f111b
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 1659
16 clang 0x0000000000a5231f
clang::CodeGen::CodeGenModule::EmitCXXConstructor(clang::CXXConstructorDecl
const*, clang::CXXCtorType) + 207
17 clang 0x0000000000a06151
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 305
18 clang 0x0000000000a07f66
clang::CodeGen::CodeGenModule::EmitDeferred() + 150
19 clang 0x0000000000a07fc9 clang::CodeGen::CodeGenModule::Release()
+ 9
20 clang 0x00000000009a9760
21 clang 0x0000000000b2394b clang::ParseAST(clang::Sema&, bool, bool)
+ 507
22 clang 0x00000000009a7f1c clang::CodeGenAction::ExecuteAction() +
60
23 clang 0x0000000000830139 clang::FrontendAction::Execute() + 249
24 clang 0x000000000080f180
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 352
25 clang 0x00000000007f7e91
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1857
26 clang 0x00000000007f2f28 cc1_main(char const**, char const**, char
const*, void*) + 1208
27 clang 0x00000000007d24e0 main + 688
28 libc.so.6 0x0000003d35221d65 __libc_start_main + 245
29 clang 0x00000000007f1d8d
Stack dump:
0. Program arguments: /home/user/.local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
test.cc -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.23.2 -coverage-file /tmp/test.o -nostdinc++
-resource-dir /home/user/.local/bin/../lib/clang/3.4 -I
/home/user/Projects/project/src/third_party/libcxx/include -internal-isystem
/usr/local/include -internal-isystem
/home/user/.local/bin/../lib/clang/3.4/include -internal-externc-isystem
/include -internal-externc-isystem /usr/include -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 151
-mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -vectorize-slp -o test.o -x c++ test.cc
1. <eof> parser at end of file
2. Per-file LLVM IR generation
3. ./test.h:7:9: Generating code for declaration 'A::B<bool>::B'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
a335ba031b18e2736120b5b82bfee08c50ec522c) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
dbb832b83351cec97b025b61c26536ef50c3181c)
Target: x86_64-unknown-linux-gnu
Thread model: posix</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>