[llvm-bugs] [Bug 38413] New: Clang crashes trying to compile code

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 1 17:08:58 PDT 2018


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

            Bug ID: 38413
           Summary: Clang crashes trying to compile code
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: srj at google.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20631
  --> https://bugs.llvm.org/attachment.cgi?id=20631&action=edit
Preprocessed source(s) and associated run script(s)

clang-8:
/usr/local/google/home/srj/llvm-trunk/include/llvm/Support/Casting.h:106:
static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To =
clang::AttributedType; From = clang::Type]: Assertion `Val && "isa<> used on a
null pointer"' failed.
Stack dump:
0.      Program arguments:
/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8 -cc1 -triple
le64-unknown-unknown-unknown -emit-llvm -disable-free -main-file-name
d3d12compute.cpp -mrelocation-model pic -pic-level 1 -mthread-model posix
-mdisable-fp-elim -fmath-errno -no-integrated-as -mconstructor-aliases
-ffreestanding -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/usr/local/google/home/srj/GitHub/Halide/bin/build/initmod.d3d12compute_64.gcno
-resource-dir /usr/local/google/home/srj/llvm-trunk/llvm_build/lib/clang/8.0.0
-dependency-file bin/build/initmod.d3d12compute_64.d -MT
bin/build/initmod.d3d12compute_64.ll -MP -D COMPILING_HALIDE_RUNTIME -D BITS_64
-O3 -Wall -Werror -Wno-unused-function -Wcast-qual -Wignored-qualifiers
-Wno-comment -Wsign-compare -Wno-unknown-warning-option -Wno-psabi
-fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir
/usr/local/google/home/srj/GitHub/Halide -ferror-limit 19 -fmessage-length 150
-fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp
-o bin/build/initmod.d3d12compute_64.ll -x c++
/usr/local/google/home/srj/GitHub/Halide/src/runtime/d3d12compute.cpp
1.     
/usr/local/google/home/srj/GitHub/Halide/src/runtime/d3d12compute.cpp:826:65:
current parser token ';'
2.     
/usr/local/google/home/srj/GitHub/Halide/src/runtime/d3d12compute.cpp:427:1:
parsing namespace 'Halide'
3.     
/usr/local/google/home/srj/GitHub/Halide/src/runtime/d3d12compute.cpp:427:20:
parsing namespace 'Halide::Runtime'
4.     
/usr/local/google/home/srj/GitHub/Halide/src/runtime/d3d12compute.cpp:427:40:
parsing namespace 'Halide::Runtime::Internal'
5.     
/usr/local/google/home/srj/GitHub/Halide/src/runtime/d3d12compute.cpp:427:61:
parsing namespace 'Halide::Runtime::Internal::D3D12Compute'
6.     
/usr/local/google/home/srj/GitHub/Halide/src/runtime/d3d12compute.cpp:795:73:
parsing function body
'Halide::Runtime::Internal::D3D12Compute::D3D12CreateSystemDefaultDevice'
7.     
/usr/local/google/home/srj/GitHub/Halide/src/runtime/d3d12compute.cpp:795:73:
in compound statement ('{}')
8.     
/usr/local/google/home/srj/GitHub/Halide/src/runtime/d3d12compute.cpp:824:28:
in compound statement ('{}')
#0 0x0000557282a1429a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x21ae29a)
#1 0x0000557282a127d4 llvm::sys::RunSignalHandlers()
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x21ac7d4)
#2 0x0000557282a12902 SignalHandler(int)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x21ac902)
#3 0x00007f4aa5fed0c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
#4 0x00007f4aa4da8fcf gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
#5 0x00007f4aa4daa3fa abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
#6 0x00007f4aa4da1e37 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37)
#7 0x00007f4aa4da1ee2 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2)
#8 0x00005572840bb86f
visitLifetimeBoundArguments(llvm::SmallVectorImpl<(anonymous
namespace)::IndirectLocalPathEntry>&, clang::Expr*, llvm::function_ref<bool
(llvm::SmallVectorImpl<(anonymous namespace)::IndirectLocalPathEntry>&,
clang::Expr*, (anonymous namespace)::ReferenceKind)>)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x385586f)
#9 0x00005572840bacad
visitLocalsRetainedByInitializer(llvm::SmallVectorImpl<(anonymous
namespace)::IndirectLocalPathEntry>&, clang::Expr*, llvm::function_ref<bool
(llvm::SmallVectorImpl<(anonymous namespace)::IndirectLocalPathEntry>&,
clang::Expr*, (anonymous namespace)::ReferenceKind)>, bool)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3854cad)
#10 0x00005572840bc2d0
clang::Sema::checkInitializerLifetime(clang::InitializedEntity const&,
clang::Expr*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x38562d0)
#11 0x00005572840d0f8c clang::InitializationSequence::Perform(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, clang::QualType*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x386af8c)
#12 0x0000557283ee387f clang::Sema::AddInitializerToDecl(clang::Decl*,
clang::Expr*, bool)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x367d87f)
#13 0x0000557283bcc351
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3366351)
#14 0x0000557283bdba24 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3375a24)
#15 0x0000557283bdc510
clang::Parser::ParseSimpleDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool,
clang::Parser::ForRangeInit*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3376510)
#16 0x0000557283bdc83b
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x337683b)
#17 0x0000557283c386d4
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d26d4)
#18 0x0000557283c390f9
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d30f9)
#19 0x0000557283c3ce44 clang::Parser::ParseCompoundStatementBody(bool)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d6e44)
#20 0x0000557283c3d395 clang::Parser::ParseCompoundStatement(bool, unsigned
int) (/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d7395)
#21 0x0000557283c3837a
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d237a)
#22 0x0000557283c390f9
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d30f9)
#23 0x0000557283c393af clang::Parser::ParseStatement(clang::SourceLocation*,
bool) (/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d33af)
#24 0x0000557283c3bd7f clang::Parser::ParseForStatement(clang::SourceLocation*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d5d7f)
#25 0x0000557283c3829b
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d229b)
#26 0x0000557283c390f9
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d30f9)
#27 0x0000557283c3ce44 clang::Parser::ParseCompoundStatementBody(bool)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d6e44)
#28 0x0000557283c3f524 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33d9524)
#29 0x0000557283bb86fc
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33526fc)
#30 0x0000557283bdb9a8 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33759a8)
#31 0x0000557283bb5138
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x334f138)
#32 0x0000557283bb5829
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.189)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x334f829)
#33 0x0000557283bb97b0
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33537b0)
#34 0x0000557283bebe6e
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&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3385e6e)
#35 0x0000557283beca03 clang::Parser::ParseNamespace(clang::DeclaratorContext,
clang::SourceLocation&, clang::SourceLocation)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3386a03)
#36 0x0000557283bdca00
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3376a00)
#37 0x0000557283bb97da
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33537da)
#38 0x0000557283bebe6e
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&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3385e6e)
#39 0x0000557283beca03 clang::Parser::ParseNamespace(clang::DeclaratorContext,
clang::SourceLocation&, clang::SourceLocation)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3386a03)
#40 0x0000557283bdca00
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3376a00)
#41 0x0000557283bb97da
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33537da)
#42 0x0000557283bebe6e
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&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3385e6e)
#43 0x0000557283beca03 clang::Parser::ParseNamespace(clang::DeclaratorContext,
clang::SourceLocation&, clang::SourceLocation)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3386a03)
#44 0x0000557283bdca00
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3376a00)
#45 0x0000557283bb97da
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33537da)
#46 0x0000557283bebe6e
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&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3385e6e)
#47 0x0000557283beca03 clang::Parser::ParseNamespace(clang::DeclaratorContext,
clang::SourceLocation&, clang::SourceLocation)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3386a03)
#48 0x0000557283bdca00
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x3376a00)
#49 0x0000557283bb97da
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33537da)
#50 0x0000557283bba9a9
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x33549a9)
#51 0x0000557283bb0787 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x334a787)
#52 0x00005572833ca9c0 clang::CodeGenAction::ExecuteAction()
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x2b649c0)
#53 0x0000557283058f0e clang::FrontendAction::Execute()
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x27f2f0e)
#54 0x000055728301e8ee
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x27b88ee)
#55 0x00005572830f97fb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0x28937fb)
#56 0x00005572814504a8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0xbea4a8)
#57 0x00005572813d492c main
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0xb6e92c)
#58 0x00007f4aa4d962b1 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x202b1)
#59 0x000055728144c1ba _start
(/usr/local/google/home/srj/llvm-trunk/llvm_build/bin/clang-8+0xbe61ba)
clang-8: error: unable to execute command: Aborted
clang-8: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 8.0.0 (trunk 338653)
Target: le64-unknown-unknown-unknown
Thread model: posix
InstalledDir: /usr/local/google/home/srj/llvm-trunk/llvm_build/bin
clang-8: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-8: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-8: note: diagnostic msg: /tmp/d3d12compute-5fd228.cpp
clang-8: note: diagnostic msg: /tmp/d3d12compute-5fd228.sh
clang-8: note: diagnostic msg:

********************

-- 
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/20180802/7c6144d7/attachment-0001.html>


More information about the llvm-bugs mailing list