[llvm-bugs] [Bug 26077] New: partial specialization of a class without using any of its template parameters make clang crash
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jan 8 07:59:59 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26077
Bug ID: 26077
Summary: partial specialization of a class without using any of
its template parameters make clang crash
Product: clang
Version: 3.7
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: ml.alek at free.fr
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 15590
--> https://llvm.org/bugs/attachment.cgi?id=15590&action=edit
Source code
While randomly toying with template specialization, I came upon a crash, both
with 3.7 and 3.6 version.
The error message is correct in my opinion.
Here is clang output :
0 clang-3.7 0x00000000013e1c18
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 clang-3.7 0x00000000013e2f7b
2 libpthread.so.0 0x00007f22bb493340
3 clang-3.7 0x00000000020885dd
clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>,
clang::QualType*) + 17677
4 clang-3.7 0x0000000001f310a9
5 clang-3.7 0x0000000001f306d2
clang::Sema::SetCtorInitializers(clang::CXXConstructorDecl*, bool,
llvm::ArrayRef<clang::CXXCtorInitializer*>) + 3490
6 clang-3.7 0x0000000001f4d1f0
clang::Sema::DefineImplicitDefaultConstructor(clang::SourceLocation,
clang::CXXConstructorDecl*) + 192
7 clang-3.7 0x000000000208e6da
8 clang-3.7 0x00000000020867a3
clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>,
clang::QualType*) + 9939
9 clang-3.7 0x0000000001eb67f4
clang::Sema::ActOnUninitializedDecl(clang::Decl*, bool) + 3524
10 clang-3.7 0x0000000001c67af6
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) + 2118
11 clang-3.7 0x0000000001c66108
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 2776
12 clang-3.7 0x0000000001c54d7d
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 781
13 clang-3.7 0x0000000001c547d2
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 370
14 clang-3.7 0x0000000001c5369d
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1789
15 clang-3.7 0x0000000001c52eda
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 410
16 clang-3.7 0x0000000001c4f6b6 clang::ParseAST(clang::Sema&, bool, bool)
+ 406
17 clang-3.7 0x000000000173e2d9 clang::FrontendAction::Execute() + 57
18 clang-3.7 0x000000000170edc3
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 707
19 clang-3.7 0x00000000017ab6c3
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3123
20 clang-3.7 0x00000000006f6994 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 1156
21 clang-3.7 0x00000000006f5bcf main + 11983
22 libc.so.6 0x00007f22ba69cec5 __libc_start_main + 245
23 clang-3.7 0x00000000006f2bf3
Stack dump:
0. Program arguments:
/home/aguillaume/sw/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.7
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name crash.cpp -mrelocation-model static
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -resource-dir
/home/aguillaume/sw/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04/bin/../lib/clang/3.7.1
-I/home/aguillaume/workspace/fakeroot/include
-I/home/aguillaume/workspace/fakeroot/include
-I/home/aguillaume/workspace/fakeroot/include -I. -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.3.0/../../../../include/c++/5.3.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.3.0/../../../../include/x86_64-linux-gnu/c++/5.3.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.3.0/../../../../include/x86_64-linux-gnu/c++/5.3.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.3.0/../../../../include/c++/5.3.0/backward
-internal-isystem /usr/local/include -internal-isystem
/home/aguillaume/sw/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04/bin/../lib/clang/3.7.1/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdeprecated-macro -fdebug-compilation-dir /home/aguillaume/tmp -ferror-limit
19 -fmessage-length 191 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/crash-49c55a.o -x c++ crash.cpp
1. crash.cpp:10:19: current parser token ';'
clang-3.7: error: unable to execute command: Segmentation fault (core dumped)
clang-3.7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.1 (tags/RELEASE_371/final)
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/20160108/38ca4c71/attachment.html>
More information about the llvm-bugs
mailing list