[LLVMbugs] [Bug 18933] New: Clang++ crashes while using libc++ <future>

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 21 23:46:11 PST 2014


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

            Bug ID: 18933
           Summary: Clang++ crashes while using libc++ <future>
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: abyss.7 at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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 (http://llvm.org/git/clang.git
a335ba031b18e2736120b5b82bfee08c50ec522c) (http://llvm.org/git/llvm.git
dbb832b83351cec97b025b61c26536ef50c3181c)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
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/20140222/9761e6fa/attachment.html>


More information about the llvm-bugs mailing list