[llvm-bugs] [Bug 42306] New: Crash in clang::ASTContext::getDependentNameType on X86CallLowering

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 18 08:40:58 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42306

            Bug ID: 42306
           Summary: Crash in clang::ASTContext::getDependentNameType on
                    X86CallLowering
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Matthew.Arsenault at amd.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

../lib/Target/X86/X86CallLowering.cpp:455:17: error: use of undeclared
identifier 'Registerr'; did you mean 'ISD::Register'?
    SmallVector<Registerr, 8> NewRegs;
                ^~~~~~~~~
                ISD::Register
../include/llvm/CodeGen/ISDOpcodes.h:59:38: note: 'ISD::Register' declared here
    BasicBlock, VALUETYPE, CONDCODE, Register, RegisterMask,
                                     ^
../lib/Target/X86/X86CallLowering.cpp:455:17: error: template argument for
template type parameter must be a type; did you forget 'typename'?
    SmallVector<Registerr, 8> NewRegs;
                ^
                typename 
../include/llvm/ADT/SmallVector.h:836:20: note: template parameter is declared
here
template <typename T, unsigned N>
                   ^
Stack dump:
0.      Program arguments: clang -cc1 -triple x86_64-apple-macosx10.14.0
-Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj
-mrelax-all -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name X86CallLowering.cpp -mrelocation-model pic -pic-level 2
-mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose
-munwind-tables -target-sdk-version=10.14 -target-cpu penryn -dwarf-column-info
-debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb
-target-linker-version 450.3 -coverage-notes-file
/Users/matt/src/llvm/build_debug/lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86CallLowering.cpp.gcno
-sys-header-deps -D GTEST_HAS_RTTI=0 -D _DEBUG -D __STDC_CONSTANT_MACROS -D
__STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -stdlib=libc++ -Werror=date-time
-Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wno-long-long
-Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type
-Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion
-Wno-atomic-implicit-seq-cst -Wno-framework-include-private-from-public
-Wno-atimport-in-framework-header -Wno-quoted-include-in-framework-header
-pedantic -std=c++11 -fdeprecated-macro -ferror-limit 19 -fmessage-length 0
-fvisibility-inlines-hidden -stack-protector 1 -fblocks
-fencode-extended-block-signature -fno-rtti -fregister-global-dtors-with-atexit
-fobjc-runtime=macosx-10.14.0 -fmax-type-align=16 -fdiagnostics-show-option
-fcolor-diagnostics -x c++ X86CallLowering-4f8d0c.cpp 
1.      ../lib/Target/X86/X86CallLowering.cpp:455:5: at annotation token
2.      ../lib/Target/X86/X86CallLowering.cpp:377:67: parsing function body
'llvm::X86CallLowering::lowerCall'
3.      ../lib/Target/X86/X86CallLowering.cpp:377:67: in compound statement
('{}')
4.      ../lib/Target/X86/X86CallLowering.cpp:453:20: in compound statement
('{}')
0  clang                    0x0000000108ba1cc5
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  clang                    0x0000000108ba0fd5 llvm::sys::RunSignalHandlers() +
85
2  clang                    0x0000000108ba22b8 SignalHandler(int) + 264
3  libsystem_platform.dylib 0x00007fff76c1cb5d _sigtramp + 29
4  libsystem_platform.dylib 0x0000000000000001 _sigtramp + 2302555329
5  clang                    0x000000010a42f1bc
clang::ASTContext::getDependentNameType(clang::ElaboratedTypeKeyword,
clang::NestedNameSpecifier*, clang::IdentifierInfo const*, clang::QualType)
const + 268
6  clang                    0x000000010a250778
clang::Sema::CheckTemplateTypeArgument(clang::TemplateTypeParmDecl*,
clang::TemplateArgumentLoc&, llvm::SmallVectorImpl<clang::TemplateArgument>&) +
1432
7  clang                    0x000000010a2468be
clang::Sema::CheckTemplateArgumentList(clang::TemplateDecl*,
clang::SourceLocation, clang::TemplateArgumentListInfo&, bool,
llvm::SmallVectorImpl<clang::TemplateArgument>&, bool) + 894
8  clang                    0x000000010a24514a
clang::Sema::CheckTemplateIdType(clang::TemplateName, clang::SourceLocation,
clang::TemplateArgumentListInfo&) + 346
9  clang                    0x000000010a248a6e
clang::Sema::ActOnTemplateIdType(clang::Scope*, clang::CXXScopeSpec&,
clang::SourceLocation, clang::OpaquePtr<clang::TemplateName>,
clang::IdentifierInfo*, clang::SourceLocation, clang::SourceLocation,
llvm::MutableArrayRef<clang::ParsedTemplateArgument>, clang::SourceLocation,
bool, bool) + 1486
10 clang                    0x0000000109d1c3f8
clang::Parser::AnnotateTemplateIdTokenAsType(bool) + 120
11 clang                    0x0000000109d2cce1
clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(clang::CXXScopeSpec&,
bool) + 769
12 clang                    0x0000000109d2c531
clang::Parser::TryAnnotateName(bool, clang::CorrectionCandidateCallback*) + 273
13 clang                    0x0000000109d0a6ee
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&) + 446
14 clang                    0x0000000109d0a3d4
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) + 196
15 clang                    0x0000000109d11add
clang::Parser::ParseCompoundStatementBody(bool) + 1725
16 clang                    0x0000000109d0a952
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&) + 1058
17 clang                    0x0000000109d0a3d4
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) + 196
18 clang                    0x0000000109d0d808
clang::Parser::ParseIfStatement(clang::SourceLocation*) + 792
19 clang                    0x0000000109d0aab6
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&) + 1414
20 clang                    0x0000000109d0a3d4
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) + 196
21 clang                    0x0000000109d11add
clang::Parser::ParseCompoundStatementBody(bool) + 1725
22 clang                    0x0000000109d12709
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 169
23 clang                    0x0000000109d2b089
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
2537
24 clang                    0x0000000109c9b61e
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
+ 1902
25 clang                    0x0000000109d2a3bd
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 813
26 clang                    0x0000000109d29de3
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 339
27 clang                    0x0000000109d28878
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2232
28 clang                    0x0000000109d26df5
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
+ 917
29 clang                    0x0000000109c88317 clang::ParseAST(clang::Sema&,
bool, bool) + 503
30 clang                    0x00000001091cabd5 clang::FrontendAction::Execute()
+ 69
31 clang                    0x0000000109180908
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1384
32 clang                    0x0000000109220110
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1712
33 clang                    0x000000010743aecd cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1661
34 clang                    0x0000000107438940 main + 10640
35 libdyld.dylib            0x00007fff76a313d5 start + 1
./repro.sh: line 4: 14255 Segmentation fault: 11  "clang" "-cc1" "-triple"
"x86_64-apple-macosx10.14.0" "-Wdeprecated-objc-isa-usage"
"-Werror=deprecated-objc-isa-usage" "-emit-obj" "-mrelax-all" "-disable-free"
"-disable-llvm-verifier" "-discard-value-names" "-main-file-name"
"X86CallLowering.cpp" "-mrelocation-model" "pic" "-pic-level" "2"
"-mthread-model" "posix" "-mdisable-fp-elim" "-fno-strict-return"
"-masm-verbose" "-munwind-tables" "-target-sdk-version=10.14" "-target-cpu"
"penryn" "-dwarf-column-info" "-debug-info-kind=standalone" "-dwarf-version=4"
"-debugger-tuning=lldb" "-target-linker-version" "450.3" "-coverage-notes-file"
"/Users/matt/src/llvm/build_debug/lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86CallLowering.cpp.gcno"
"-sys-header-deps" "-D" "GTEST_HAS_RTTI=0" "-D" "_DEBUG" "-D"
"__STDC_CONSTANT_MACROS" "-D" "__STDC_FORMAT_MACROS" "-D" "__STDC_LIMIT_MACROS"
"-stdlib=libc++" "-Werror=date-time" "-Werror=unguarded-availability-new"
"-Wall" "-Wextra" "-Wno-unused-parameter" "-Wwrite-strings" "-Wcast-qual"
"-Wmissing-field-initializers" "-Wno-long-long" "-Wimplicit-fallthrough"
"-Wcovered-switch-default" "-Wno-noexcept-type" "-Wnon-virtual-dtor"
"-Wdelete-non-virtual-dtor" "-Wstring-conversion"
"-Wno-atomic-implicit-seq-cst" "-Wno-framework-include-private-from-public"
"-Wno-atimport-in-framework-header" "-Wno-quoted-include-in-framework-header"
"-pedantic" "-std=c++11" "-fdeprecated-macro" "-ferror-limit" "19"
"-fmessage-length" "0" "-fvisibility-inlines-hidden" "-stack-protector" "1"
"-fblocks" "-fencode-extended-block-signature" "-fno-rtti"
"-fregister-global-dtors-with-atexit" "-fobjc-runtime=macosx-10.14.0"
"-fmax-type-align=16" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-x"
"c++" "X86CallLowering-4f8d0c.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/20190618/61e0c9a2/attachment-0001.html>


More information about the llvm-bugs mailing list