[llvm-bugs] [Bug 32529] New: Clang 3.8 crash after "error: typedef redefinition with different types"
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 4 21:48:52 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32529
Bug ID: 32529
Summary: Clang 3.8 crash after "error: typedef redefinition
with different types"
Product: clang
Version: 3.8
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: dholbert at mozilla.com
CC: llvm-bugs at lists.llvm.org
Just managed to make clang crash. Filing this bug, as it requests. I'll
include the preprocessed .cpp and run script, as well as the backtrace.
Here's the output from the run script (including the backtrace):
In file included from Unified_cpp_layout_generic2.cpp:20:
In file included from
/scratch/work/builds/mozilla-inbound/mozilla/layout/generic/nsGridContainerFrame.cpp:17:
../../../mozilla/layout/generic/OrderAwareFrameIterator.h:23:3: error: typedef
redefinition with different types
('OrderAwareFrameIteratorT<nsFrameList::iterator>' (aka
'OrderAwareFrameIteratorT<nsFrameList::Iterator>') vs
'mozilla::OrderAwareFrameIterator')
OrderAwareFrameIterator;
^
../../../mozilla/layout/generic/nsGridContainerFrame.h:26:7: note: previous
definition is here
class OrderAwareFrameIterator;
^
In file included from Unified_cpp_layout_generic2.cpp:20:
In file included from
/scratch/work/builds/mozilla-inbound/mozilla/layout/generic/nsGridContainerFrame.cpp:17:
../../../mozilla/layout/generic/OrderAwareFrameIterator.h:25:3: error: typedef
redefinition with different types
('OrderAwareFrameIteratorT<nsFrameList::reverse_iterator>' (aka
'OrderAwareFrameIteratorT<ReverseIterator<nsFrameList::Iterator> >') vs
'mozilla::ReverseOrderAwareFrameIterator')
ReverseOrderAwareFrameIterator;
^
../../../mozilla/layout/generic/nsGridContainerFrame.h:27:7: note: previous
definition is here
class ReverseOrderAwareFrameIterator;
^
0 libLLVM-3.8.so.1 0x00007ff0a4806488
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 56
1 libLLVM-3.8.so.1 0x00007ff0a4804706 llvm::sys::RunSignalHandlers() + 54
2 libLLVM-3.8.so.1 0x00007ff0a480485b
3 libc.so.6 0x00007ff0a394b860
4 libLLVM-3.8.so.1 0x00007ff0a47aee2b
llvm::FoldingSetNodeID::AddInteger(unsigned int) + 11
5 libLLVM-3.8.so.1 0x00007ff0a478528a
llvm::APInt::Profile(llvm::FoldingSetNodeID&) const + 26
6 libLLVM-3.8.so.1 0x00007ff0a4780e4f
llvm::APFloat::Profile(llvm::FoldingSetNodeID&) const + 47
7 clang 0x0000557b6c050e2f
8 clang 0x0000557b6c051ca1
9 clang 0x0000557b6c050bfa
10 clang 0x0000557b6c051ca1
11 clang 0x0000557b6c051243
12 clang 0x0000557b6c0516f6
13 clang 0x0000557b6c051ca1
14 clang 0x0000557b6c052355
clang::Stmt::Profile(llvm::FoldingSetNodeID&, clang::ASTContext const&, bool)
const + 885
15 clang 0x0000557b6bed58db
clang::ASTContext::getDecltypeType(clang::Expr*, clang::QualType) const + 107
16 clang 0x0000557b6bba0f16
clang::Sema::BuildDecltypeType(clang::Expr*, clang::SourceLocation, bool) + 134
17 clang 0x0000557b6bbad740
18 clang 0x0000557b6bbb443d
clang::Sema::GetTypeForDeclarator(clang::Declarator&, clang::Scope*) + 157
19 clang 0x0000557b6bbb470b
clang::Sema::ActOnTypeName(clang::Scope*, clang::Declarator&) + 27
20 clang 0x0000557b6b66370c
clang::Parser::ParseTypeName(clang::SourceRange*,
clang::Declarator::TheContext, clang::AccessSpecifier, clang::Decl**,
clang::ParsedAttributes*) + 1020
21 clang 0x0000557b6b6d2f9f clang::Parser::ParseTemplateArgument() +
95
22 clang 0x0000557b6b6d8ffb
clang::Parser::ParseTemplateArgumentList(llvm::SmallVector<clang::ParsedTemplateArgument,
16u>&) + 171
23 clang 0x0000557b6b6d9264
clang::Parser::ParseTemplateIdAfterTemplateName(clang::OpaquePtr<clang::TemplateName>,
clang::SourceLocation, clang::CXXScopeSpec const&, bool,
clang::SourceLocation&, llvm::SmallVector<clang::ParsedTemplateArgument, 16u>&,
clang::SourceLocation&) + 116
24 clang 0x0000557b6b6d93a9
clang::Parser::AnnotateTemplateIdToken(clang::OpaquePtr<clang::TemplateName>,
clang::TemplateNameKind, clang::CXXScopeSpec&, clang::SourceLocation,
clang::UnqualifiedId&, bool) + 153
25 clang 0x0000557b6b69cca8
clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&,
clang::OpaquePtr<clang::QualType>, bool, bool*, bool, clang::IdentifierInfo**)
+ 2024
26 clang 0x0000557b6b645668
clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) + 232
27 clang 0x0000557b6b686dea clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 6218
28 clang 0x0000557b6b68815d clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 45
29 clang 0x0000557b6b68cebe
clang::Parser::ParseConstantExpression(clang::Parser::TypeCastState) + 46
30 clang 0x0000557b6b67320c
clang::Parser::ParseStaticAssertDeclaration(clang::SourceLocation&) + 348
31 clang 0x0000557b6b66cb27 clang::Parser::ParseDeclaration(unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 487
32 clang 0x0000557b6b6c542f
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&) + 3231
33 clang 0x0000557b6b6c5657
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*) + 135
34 clang 0x0000557b6b6c9eb9
clang::Parser::ParseCompoundStatementBody(bool) + 1769
35 clang 0x0000557b6b6ca59e
clang::Parser::ParseCompoundStatement(bool, unsigned int) + 30
36 clang 0x0000557b6b6ca5d2
clang::Parser::ParseCompoundStatement(bool) + 18
37 clang 0x0000557b6b6c51e2
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&) + 2642
38 clang 0x0000557b6b6c5657
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*) + 135
39 clang 0x0000557b6b6c5784
clang::Parser::ParseStatement(clang::SourceLocation*, bool) + 100
40 clang 0x0000557b6b6c91c1 clang::Parser::ParseDoStatement() + 129
41 clang 0x0000557b6b6c50bf
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&) + 2351
42 clang 0x0000557b6b6c5657
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*) + 135
43 clang 0x0000557b6b6c9eb9
clang::Parser::ParseCompoundStatementBody(bool) + 1769
44 clang 0x0000557b6b6ccafa
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 314
45 clang 0x0000557b6b64f905
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 421
46 clang 0x0000557b6b64f6ae
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 126
47 clang 0x0000557b6b680a0d
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 1693
48 clang 0x0000557b6b681daa
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 3594
49 clang 0x0000557b6b6619ad
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 4381
50 clang 0x0000557b6b6d7148
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 968
51 clang 0x0000557b6b6d8a0f
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 1055
52 clang 0x0000557b6b6d8d1f
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 111
53 clang 0x0000557b6b66cb87 clang::Parser::ParseDeclaration(unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 583
54 clang 0x0000557b6b64cea1
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 321
55 clang 0x0000557b6b679c17
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 455
56 clang 0x0000557b6b67a276 clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 1462
57 clang 0x0000557b6b66cbdd clang::Parser::ParseDeclaration(unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 669
58 clang 0x0000557b6b64cea1
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 321
59 clang 0x0000557b6b64d84c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 460
60 clang 0x0000557b6b641ef3 clang::ParseAST(clang::Sema&, bool,
bool) + 611
61 clang 0x0000557b6b49682e clang::FrontendAction::Execute() + 302
62 clang 0x0000557b6b46a656
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 278
63 clang 0x0000557b6b512903
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2339
64 clang 0x0000557b6b197798 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2456
65 clang 0x0000557b6b193fe0 main + 6160
66 libc.so.6 0x00007ff0a39363f1 __libc_start_main + 241
67 clang 0x0000557b6b195a8a _start + 42
Stack dump:
0. Program arguments: /usr/lib/llvm-3.8/bin/clang -cc1 -triple
x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier
-main-file-name Unified_cpp_layout_generic2.cpp -mrelocation-model pic
-pic-level 2 -mthread-model posix -mdisable-fp-elim -relaxed-aliasing
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4
-debugger-tuning=gdb -D DEBUG=1 -D TRACING=1 -D OS_POSIX=1 -D OS_LINUX=1 -D
STATIC_EXPORTABLE_JS_API -D MOZ_HAS_MOZGLUE -D MOZILLA_INTERNAL_API -D
IMPL_LIBXUL -D MOZILLA_CLIENT -Wall -Wc++11-compat -Wempty-body
-Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare
-Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof
-Wclass-varargs -Wloop-analysis -Wc++11-compat-pedantic -Wc++14-compat
-Wc++14-compat-pedantic -Wc++1z-compat -Wimplicit-fallthrough
-Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations
-Wno-error=array-bounds -Wformat -Wno-gnu-zero-variadic-macro-arguments
-Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-error=shadow
-std=gnu++11 -fdeprecated-macro -ferror-limit 19 -fmessage-length 0 -pthread
-fno-rtti -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -x
c++ Unified_cpp_layout_generic2-e8a115.cpp
1. ../../../mozilla/layout/generic/OrderAwareFrameIterator.h:112:5
<Spelling=../../dist/include/mozilla/Assertions.h:402:71>: current parser token
'>'
2. ../../../mozilla/layout/generic/OrderAwareFrameIterator.h:17:1: parsing
namespace 'mozilla'
3. ../../../mozilla/layout/generic/OrderAwareFrameIterator.h:28:1: parsing
struct/union/class body 'OrderAwareFrameIteratorT'
4. ../../../mozilla/layout/generic/OrderAwareFrameIterator.h:110:3:
parsing function body 'SetItemCount'
5. ../../../mozilla/layout/generic/OrderAwareFrameIterator.h:110:3: in
compound statement ('{}')
6. ../../../mozilla/layout/generic/OrderAwareFrameIterator.h:112:5
<Spelling=../../dist/include/mozilla/Assertions.h:426:6>: in compound statement
('{}')
Unified_cpp_layout_generic2-e8a115.sh: line 4: 8092 Segmentation fault
(core dumped) "/usr/lib/llvm-3.8/bin/clang" "-cc1" "-triple"
"x86_64-pc-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free"
"-disable-llvm-verifier" "-main-file-name" "Unified_cpp_layout_generic2.cpp"
"-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix"
"-mdisable-fp-elim" "-relaxed-aliasing" "-masm-verbose" "-mconstructor-aliases"
"-munwind-tables" "-fuse-init-array" "-target-cpu" "x86-64"
"-dwarf-column-info" "-debug-info-kind=limited" "-dwarf-version=4"
"-debugger-tuning=gdb" "-D" "DEBUG=1" "-D" "TRACING=1" "-D" "OS_POSIX=1" "-D"
"OS_LINUX=1" "-D" "STATIC_EXPORTABLE_JS_API" "-D" "MOZ_HAS_MOZGLUE" "-D"
"MOZILLA_INTERNAL_API" "-D" "IMPL_LIBXUL" "-D" "MOZILLA_CLIENT" "-Wall"
"-Wc++11-compat" "-Wempty-body" "-Wignored-qualifiers" "-Woverloaded-virtual"
"-Wpointer-arith" "-Wsign-compare" "-Wtype-limits" "-Wunreachable-code"
"-Wwrite-strings" "-Wno-invalid-offsetof" "-Wclass-varargs" "-Wloop-analysis"
"-Wc++11-compat-pedantic" "-Wc++14-compat" "-Wc++14-compat-pedantic"
"-Wc++1z-compat" "-Wimplicit-fallthrough" "-Wstring-conversion"
"-Wno-inline-new-delete" "-Wno-error=deprecated-declarations"
"-Wno-error=array-bounds" "-Wformat" "-Wno-gnu-zero-variadic-macro-arguments"
"-Wno-unknown-warning-option" "-Wno-return-type-c-linkage" "-Wno-error=shadow"
"-std=gnu++11" "-fdeprecated-macro" "-ferror-limit" "19" "-fmessage-length" "0"
"-pthread" "-fno-rtti" "-fobjc-runtime=gcc" "-fdiagnostics-show-option"
"-fcolor-diagnostics" "-x" "c++" "Unified_cpp_layout_generic2-e8a115.cpp"
--
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/20170405/ea0ff15b/attachment-0001.html>
More information about the llvm-bugs
mailing list