[LLVMbugs] [Bug 9721] New: crash on static_assert

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 14 01:36:19 PDT 2011


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

           Summary: crash on static_assert
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: devlists at shadowlab.org
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=6464)
 --> (http://llvm.org/bugs/attachment.cgi?id=6464)
simple pathologic file

The static analyze asserts and aborts with code using static_assert.


------------ stsh_atom.cpp --------------
void LoadAtom() { static_assert(sizeof(void *) == 8, "stsh_entry_size"); }
--------------------------
$ clang++ -std=c++0x --analyze stsh_atom.cpp
Assertion failed: (false && "Subtype of ScopedDecl not handled."), function
VisitDecl, file
/Users/jddupas/Projects/OpenSource/llvm/tools/clang/lib/Analysis/../../include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h,
line 72.
0  clang             0x0000000100f7b5f2 PrintStackTrace(void*) + 34
1  clang             0x0000000100f7bb49 SignalHandler(int) + 745
2  libSystem.B.dylib 0x00007fff809d566a _sigtramp + 26
3  clang             0x000000010023434b
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*) + 2011
4  clang             0x0000000100013356 abort + 22
5  clang             0x0000000100013318 __assert_rtn + 56
6  clang             0x00000001005a2cde clang::CFGRecStmtDeclVisitor<(anonymous
namespace)::RegisterDecls>::VisitDecl(clang::Decl*) + 254
7  clang             0x00000001005a1fe7 clang::StmtVisitor<(anonymous
namespace)::RegisterDecls, void>::Visit(clang::Stmt*) + 1303
8  clang             0x000000010059ed07
clang::LiveVariables::LiveVariables(clang::AnalysisContext&, bool) + 471
9  clang             0x000000010058a042
clang::AnalysisContext::getLiveVariables() + 66
[…]
Stack dump:
0.    Program arguments:
/Users/jddupas/Projects/OpenSource/llvm/release/Release+Asserts/bin/clang -cc1
-triple x86_64-apple-darwin10.0.0 -analyze -disable-free -main-file-name
stsh_atom.cpp -analyzer-store=region -analyzer-opt-analyze-nested-blocks
-analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=deadcode
-analyzer-checker=security -analyzer-checker=unix -analyzer-checker=osx
-analyzer-output plist -w -pic-level 1 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 97.17 -resource-dir
/Users/jddupas/Projects/OpenSource/llvm/release/Release+Asserts/bin/../lib/clang/3.0
-std=c++0x -ferror-limit 19 -fmessage-length 170 -stack-protector 1 -fblocks
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
stsh_atom.plist -x c++ stsh_atom.cpp 
1.    <eof> parser at end of file
clang: error: unable to execute command: Illegal instruction
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list