[LLVMbugs] [Bug 17724] New: Regression: clang Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!")

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 29 09:52:01 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17724

            Bug ID: 17724
           Summary: Regression: clang Assertion failed: (isa<X>(Val) &&
                    "cast<Ty>() argument of incompatible type!")
           Product: new-bugs
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: sean at rogue-research.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

clang r191325 was able to build the code in question.  r193521 and r193618 are
not, they assert:

Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"),
function cast, file /Users/builder/llvm/llvm/include/llvm/Support/Casting.h,
line 232.
0  clang-3.4         0x000000010e4ed3f8 llvm::sys::PrintStackTrace(__sFILE*) +
40
1  clang-3.4         0x000000010e4ed954 SignalHandler(int) + 644
2  libsystem_c.dylib 0x00007fff8c3cc90a _sigtramp + 26
3  libsystem_c.dylib 0x00000001105fca80 _sigtramp + 2216886672
4  clang-3.4         0x000000010e4ed6b6 abort + 22
5  clang-3.4         0x000000010e4ed691 __assert_rtn + 81
6  clang-3.4         0x000000010e6cffec
clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl(clang::ParmVarDecl
const*) + 668
7  clang-3.4         0x000000010e6d327c
clang::consumed::ConsumedAnalyzer::run(clang::AnalysisDeclContext&) + 572
8  clang-3.4         0x000000010ea62236
clang::sema::AnalysisBasedWarnings::IssueWarnings(clang::sema::AnalysisBasedWarnings::Policy,
clang::sema::FunctionScopeInfo*, clang::Decl const*, clang::BlockExpr const*) +
4758
9  clang-3.4         0x000000010ea98fcb
clang::Sema::PopFunctionScopeInfo(clang::sema::AnalysisBasedWarnings::Policy
const*, clang::Decl const*, clang::BlockExpr const*) + 315
10 clang-3.4         0x000000010eb38523
clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) + 2835
11 clang-3.4         0x000000010ed8e388
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2264
12 clang-3.4         0x000000010ed8f56b
clang::Sema::PerformPendingInstantiations(bool) + 619
13 clang-3.4         0x000000010ed8e564
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2740
14 clang-3.4         0x000000010ed8f56b
clang::Sema::PerformPendingInstantiations(bool) + 619
15 clang-3.4         0x000000010ea96617
clang::Sema::ActOnEndOfTranslationUnit() + 455
16 clang-3.4         0x000000010ea5ac80
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 176
17 clang-3.4         0x000000010e9dd896 clang::ParseAST(clang::Sema&, bool,
bool) + 438
18 clang-3.4         0x000000010e83c626 clang::CodeGenAction::ExecuteAction() +
534
19 clang-3.4         0x000000010e94d047 clang::FrontendAction::Execute() + 119
20 clang-3.4         0x000000010e927cad
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 957
21 clang-3.4         0x000000010e4f04aa
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3642
22 clang-3.4         0x000000010d7792eb cc1_main(char const**, char const**,
char const*, void*) + 811
23 clang-3.4         0x000000010d777e35 main + 8437
24 libdyld.dylib     0x00007fff8fe697e1 start + 0
25 libdyld.dylib     0x0000000000000055 start + 1880713332
Stack dump:
0.    Program arguments: /Users/builder/llvm/llvm-rel-install/bin/clang-3.4
-cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free
-main-file-name gdcmReader.cxx -mrelocation-model pic -pic-level 2
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -gdwarf-2
-coverage-file
/Users/builder/external/GDCM-clang-dbg-x86_64-static/Source/DataStructureAndEncodingDefinition/CMakeFiles/gdcmDSED.dir/gdcmReader.cxx.o
-resource-dir /Users/builder/llvm/llvm-rel-install/bin/../lib/clang/3.4
-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
-I /Users/builder/external/GDCM-clang-dbg-x86_64-static/Source/Common -I
/Users/builder/external/GDCM/Source/Common -I
/Users/builder/external/GDCM/Source/DataDictionary -I
/Users/builder/external/GDCM/Source/DataStructureAndEncodingDefinition -I
/Users/builder/external/GDCM/Utilities -Weverything -Wno-padded
-Wno-missing-noreturn -Wno-unused-macros -Wno-missing-prototypes
-Wno-sign-conversion -Wno-conversion -Wno-cast-align -Wno-extra-semi
-Wno-weak-vtables -Wno-c++98-compat-pedantic -Wno-global-constructors
-Wno-unreachable-code -Wno-documentation -Wno-float-equal
-Wno-exit-time-destructors -Wno-implicit-fallthrough -Wno-switch-enum
-Wno-covered-switch-default -Wno-missing-variable-declarations -Wno-undef
-Wno-weak-template-vtables -Wno-conditional-uninitialized
-Wno-unused-member-function -Wno-deprecated -std=c++11 -fdebug-compilation-dir
/Users/builder/external/GDCM-clang-dbg-x86_64-static/Source/DataStructureAndEncodingDefinition
-ferror-limit 19 -fmessage-length 179
-fsanitize=float-cast-overflow,integer-divide-by-zero,null,object-size,return,shift,signed-integer-overflow,unreachable,vla-bound
-fno-sanitize-recover -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.8.0 -fencode-extended-block-signature -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o
CMakeFiles/gdcmDSED.dir/gdcmReader.cxx.o -x c++
/Users/builder/external/GDCM/Source/DataStructureAndEncodingDefinition/gdcmReader.cxx 
1.    <eof> parser at end of file
2.   
/Users/builder/external/GDCM/Source/DataStructureAndEncodingDefinition/gdcmReader.h:118:8:
instantiating function definition 'InternalReadCommon'
3.    /Users/builder/external/GDCM/Source/Common/zipstreamimpl.h:287:14:
instantiating function definition 'basic_zip_istream'
clang-3.4: error: unable to execute command: Illegal instruction: 4
clang-3.4: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (193618)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
clang-3.4: note: diagnostic msg: PLEASE submit a bug report to  and include the
crash backtrace, preprocessed source, and associated run script.
clang-3.4: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.4: note: diagnostic msg:
/var/folders/_j/yk9_m1js2jq67w2sbxfgrxkr0000gn/T/gdcmReader-c5965a.cpp
clang-3.4: note: diagnostic msg:
/var/folders/_j/yk9_m1js2jq67w2sbxfgrxkr0000gn/T/gdcmReader-c5965a.sh
clang-3.4: note: diagnostic msg: 

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

The assert seems similar to the following bugs (autosuggested by bugzilla):
1677, 4156, 9429, 9633, 12627, 14544, 15553.  But they are all marked fixed,
and I just rebuilt clang from trunk 15 minutes ago.

-- 
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/20131029/e09ca290/attachment.html>


More information about the llvm-bugs mailing list