[llvm-bugs] [Bug 31421] New: All libc++ fails assert: ../include/llvm/Support/Casting.h:229: typename cast_retty<X, Y>::ret_type llvm::cast(Y &) [X = clang::FunctionProtoType, Y = clang::QualType]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Dec 18 04:22:00 PST 2016


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

            Bug ID: 31421
           Summary: All libc++ fails assert:
                    ../include/llvm/Support/Casting.h:229: typename
                    cast_retty<X, Y>::ret_type llvm::cast(Y &) [X =
                    clang::FunctionProtoType, Y = clang::QualType]:
                    Assertion `isa<X>(Val) && "cast<Ty>() argument of
                    incompatible type!"' failed.
           Product: libc++abi
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ismail at i10z.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

This is with latest trunk r290060 on Linux x86-64:

[12235s]  "/home/abuild/rpmbuild/BUILD/llvm/stage1/bin/clang-4.0" -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
test_vector1.pass.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 -v -dwarf-column-info
-debugger-tuning=gdb -coverage-notes-file
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxxabi/test/Output/test_vector1.pass.cpp.gcno
-nostdinc++ -resource-dir
/home/abuild/rpmbuild/BUILD/llvm/stage1/bin/../lib64/clang/4.0.0 -D
LIBCXXABI_NO_TIMER -I /home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/include
-I /home/abuild/rpmbuild/BUILD/llvm/projects/libcxxabi/include -D
__STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -I
/home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/test/support -D
_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -internal-isystem /usr/local/include
-internal-isystem
/home/abuild/rpmbuild/BUILD/llvm/stage1/bin/../lib64/clang/4.0.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-Werror=thread-safety -Wno-dynamic-exception-spec -Wall -Wextra -Werror
-Wshadow -Wshadow -Wno-unused-command-line-argument -Wno-attributes
-Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals
-Wno-sign-compare -Wno-unused-variable -Wno-unused-parameter
-Wno-unused-local-typedef -std=c++1z -fdeprecated-macro -fdebug-compilation-dir
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxxabi/test -ferror-limit
19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -o
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxxabi/test/Output/test_vector1.pass.cpp.o
-x c++
/home/abuild/rpmbuild/BUILD/llvm/projects/libcxxabi/test/test_vector1.pass.cpp
[12235s] clang -cc1 version 4.0.0 based upon LLVM 4.0.0svn default target
x86_64-unknown-linux-gnu
[12235s] ignoring nonexistent directory "/include"
[12235s] #include "..." search starts here:
[12235s] #include <...> search starts here:
[12235s]  /home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/include
[12235s]  /home/abuild/rpmbuild/BUILD/llvm/projects/libcxxabi/include
[12235s]  /home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/test/support
[12235s]  /usr/local/include
[12235s] 
/home/abuild/rpmbuild/BUILD/llvm/stage1/bin/../lib64/clang/4.0.0/include
[12235s]  /usr/include
[12235s] End of search list.
[12235s] clang-4.0: ../include/llvm/Support/Casting.h:229: typename
cast_retty<X, Y>::ret_type llvm::cast(Y &) [X = clang::FunctionProtoType, Y =
clang::QualType]: Assertion `isa<X>(Val) && "cast<Ty>() argument of
incompatible type!"' failed.
[12235s] #0 0x00007f148bb3bd15 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/abuild/rpmbuild/BUILD/llvm/stage1/../lib/Support/Unix/Signals.inc:402:13
[12235s] #1 0x00007f148bb3c306 bool std::__1::operator!=<std::__1::pair<void
(*)(void*), void*>*>(std::__1::__wrap_iter<std::__1::pair<void (*)(void*),
void*>*> const&, std::__1::__wrap_iter<std::__1::pair<void (*)(void*), void*>*>
const&) /opt/clang/bin/../include/c++/v1/iterator:1493:12
[12235s] #2 0x00007f148bb3c306 llvm::sys::RunSignalHandlers()
/home/abuild/rpmbuild/BUILD/llvm/lib/Support/Signals.cpp:44:0
[12235s] #3 0x00007f148bb3c306 SignalHandler(int)
/home/abuild/rpmbuild/BUILD/llvm/stage1/../lib/Support/Unix/Signals.inc:246:0
[12235s] #4 0x00007f148b5c0080 __restore_rt (/lib64/libpthread.so.0+0x11080)
[12235s] #5 0x00007f148a2c65af __GI_raise (/lib64/libc.so.6+0x345af)
[12235s] #6 0x00007f148a2c79aa __GI_abort (/lib64/libc.so.6+0x359aa)
[12235s] #7 0x00007f148a2bf267 __assert_fail_base (/lib64/libc.so.6+0x2d267)
[12235s] #8 0x00007f148a2bf312 (/lib64/libc.so.6+0x2d312)
[12235s] #9 0x00007f148914d93c clang::QualType::getCommonPtr() const
/home/abuild/rpmbuild/BUILD/llvm/stage1/../tools/clang/include/clang/AST/Type.h:613:5
[12235s] #10 0x00007f148914d93c clang::QualType::getTypePtr() const
/home/abuild/rpmbuild/BUILD/llvm/stage1/../tools/clang/include/clang/AST/Type.h:5358:0
[12235s] #11 0x00007f148914d93c
llvm::simplify_type<clang::QualType>::getSimplifiedValue(clang::QualType)
/home/abuild/rpmbuild/BUILD/llvm/stage1/../tools/clang/include/clang/AST/Type.h:1120:0
[12235s] #12 0x00007f148914d93c llvm::simplify_type<clang::QualType
const>::getSimplifiedValue(clang::QualType const&)
/home/abuild/rpmbuild/BUILD/llvm/stage1/../include/llvm/Support/Casting.h:46:0
[12235s] #13 0x00007f148914d93c llvm::isa_impl_wrap<clang::ParenType,
clang::QualType const, clang::Type const*>::doit(clang::QualType const&)
/home/abuild/rpmbuild/BUILD/llvm/stage1/../include/llvm/Support/Casting.h:114:0
[12235s] #14 0x00007f148914d93c bool llvm::isa<clang::ParenType,
clang::QualType>(clang::QualType const&)
/home/abuild/rpmbuild/BUILD/llvm/stage1/../include/llvm/Support/Casting.h:132:0
[12235s] #15 0x00007f148914d93c llvm::cast_retty<clang::ParenType,
clang::QualType>::ret_type llvm::dyn_cast<clang::ParenType,
clang::QualType>(clang::QualType&)
/home/abuild/rpmbuild/BUILD/llvm/stage1/../include/llvm/Support/Casting.h:293:0
[12235s] #16 0x00007f148914d93c
getFunctionTypeWithExceptionSpec(clang::ASTContext&, clang::QualType,
clang::FunctionProtoType::ExceptionSpecInfo const&)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/AST/ASTContext.cpp:2365:0
[12235s] #17 0x00007f148914d758
clang::ASTContext::hasSameFunctionTypeIgnoringExceptionSpec(clang::QualType,
clang::QualType)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/AST/ASTContext.cpp:2389:23
[12235s] #18 0x00007f14887d4894
clang::Sema::CheckFunctionDeclaration(clang::Scope*, clang::FunctionDecl*,
clang::LookupResult&, bool)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Sema/SemaDecl.cpp:9086:11
[12235s] #19 0x00007f14887c3c5e clang::Declarator::setRedeclaration(bool)
/home/abuild/rpmbuild/BUILD/llvm/stage1/../tools/clang/include/clang/Sema/DeclSpec.h:2409:51
[12235s] #20 0x00007f14887c3c5e
clang::Sema::ActOnFunctionDeclarator(clang::Scope*, clang::Declarator&,
clang::DeclContext*, clang::TypeSourceInfo*, clang::LookupResult&,
llvm::MutableArrayRef<clang::TemplateParameterList*>, bool&)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Sema/SemaDecl.cpp:8536:0
[12235s] #21 0x00007f14887bd033 clang::Sema::HandleDeclarator(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Sema/SemaDecl.cpp:0:11
[12235s] #22 0x00007f14887bc518 clang::Sema::ActOnDeclarator(clang::Scope*,
clang::Declarator&)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Sema/SemaDecl.cpp:4835:15
[12235s] #23 0x00007f1488dc16f1
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Parse/ParseDecl.cpp:0:3
[12235s] #24 0x00007f1488dc05ab
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int,
clang::SourceLocation*, clang::Parser::ForRangeInit*)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Parse/ParseDecl.cpp:1863:21
[12235s] #25 0x00007f1488e42f3b
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Parse/Parser.cpp:985:10
[12235s] #26 0x00007f1488e42961
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Parse/Parser.cpp:1001:12
[12235s] #27 0x00007f1488e4191b
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Parse/Parser.cpp:851:12
[12235s] #28 0x00007f1488dd38e9 clang::AttributePool::~AttributePool()
/home/abuild/rpmbuild/BUILD/llvm/stage1/../tools/clang/include/clang/Sema/AttributeList.h:630:9
[12235s] #29 0x00007f1488dd38e9 clang::ParsedAttributes::~ParsedAttributes()
/home/abuild/rpmbuild/BUILD/llvm/stage1/../tools/clang/include/clang/Sema/AttributeList.h:721:0
[12235s] #30 0x00007f1488dd38e9
clang::Parser::ParseLinkage(clang::ParsingDeclSpec&, unsigned int)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp:364:0
[12235s] #31 0x00007f1488e42f1e
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Parse/Parser.cpp:982:12
[12235s] #32 0x00007f1488e42961
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Parse/Parser.cpp:1001:12
[12235s] #33 0x00007f1488e4191b
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Parse/Parser.cpp:851:12
[12235s] #34 0x00007f1488e40af7
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Parse/Parser.cpp:627:10
[12235s] #35 0x00007f1488dae2a6 clang::ParseAST(clang::Sema&, bool, bool)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Parse/ParseAST.cpp:146:3
[12235s] #36 0x00007f148ad19ce9 clang::FrontendAction::Execute()
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:463:10
[12235s] #37 0x00007f148acdcf01
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:931:11
[12235s] #38 0x00007f148ac5fbc8
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:249:25
[12235s] #39 0x000000000040ee98 cc1_main(llvm::ArrayRef<char const*>, char
const*, void*)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/tools/driver/cc1_main.cpp:221:13
[12235s] #40 0x000000000040d76a ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef)
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/tools/driver/driver.cpp:299:12
[12235s] #41 0x000000000040d76a main
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/tools/driver/driver.cpp:380:0
[12235s] #42 0x00007f148a2b2291 __libc_start_main (/lib64/libc.so.6+0x20291)
[12235s] #43 0x000000000040a8da _start
/home/abuild/rpmbuild/BUILD/glibc-2.24/csu/../sysdeps/x86_64/start.S:122:0
[12235s] Stack dump:
[12235s] 0.    Program arguments:
/home/abuild/rpmbuild/BUILD/llvm/stage1/bin/clang-4.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
test_vector1.pass.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 -v -dwarf-column-info
-debugger-tuning=gdb -coverage-notes-file
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxxabi/test/Output/test_vector1.pass.cpp.gcno
-nostdinc++ -resource-dir
/home/abuild/rpmbuild/BUILD/llvm/stage1/bin/../lib64/clang/4.0.0 -D
LIBCXXABI_NO_TIMER -I /home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/include
-I /home/abuild/rpmbuild/BUILD/llvm/projects/libcxxabi/include -D
__STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -I
/home/abuild/rpmbuild/BUILD/llvm/projects/libcxx/test/support -D
_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -internal-isystem /usr/local/include
-internal-isystem
/home/abuild/rpmbuild/BUILD/llvm/stage1/bin/../lib64/clang/4.0.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-Werror=thread-safety -Wno-dynamic-exception-spec -Wall -Wextra -Werror
-Wshadow -Wshadow -Wno-unused-command-line-argument -Wno-attributes
-Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals
-Wno-sign-compare -Wno-unused-variable -Wno-unused-parameter
-Wno-unused-local-typedef -std=c++1z -fdeprecated-macro -fdebug-compilation-dir
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxxabi/test -ferror-limit
19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -o
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/libcxxabi/test/Output/test_vector1.pass.cpp.o
-x c++
/home/abuild/rpmbuild/BUILD/llvm/projects/libcxxabi/test/test_vector1.pass.cpp 
[12235s] 1.    /usr/include/stdio.h:374:25: current parser token ';'
[12235s] clang-4.0: error: unable to execute command: Aborted
[12235s] clang-4.0: error: clang frontend command failed due to signal (use -v
to see invocation)
[12235s] clang version 4.0.0 (trunk 290060)
[12235s] Target: x86_64-unknown-linux-gnu
[12235s] Thread model: posix
[12235s] InstalledDir: /home/abuild/rpmbuild/BUILD/llvm/stage1/bin
[12235s] clang-4.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
[12235s] clang-4.0: note: diagnostic msg: 
[12235s] ********************
[12235s] 
[12235s] PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
[12235s] Preprocessed source(s) and associated run script(s) are located at:
[12235s] clang-4.0: note: diagnostic msg:
/tmp/lit_tmp_zRVCBd/test_vector1-da18e8.cpp
[12235s] clang-4.0: note: diagnostic msg:
/tmp/lit_tmp_zRVCBd/test_vector1-da18e8.sh
[12235s] clang-4.0: note: diagnostic msg: 
[12235s] 
[12235s] ********************
[12235s] --
[12235s] 
[12235s] Compilation failed unexpectedly!
[12235s] ********************

-- 
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/20161218/c98b721a/attachment-0001.html>


More information about the llvm-bugs mailing list