[LLVMbugs] [Bug 14244] New: "signedness mismatch" assertions failing everywhere [ppc/darwin8]

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 2 11:08:57 PDT 2012


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

             Bug #: 14244
           Summary: "signedness mismatch" assertions failing everywhere
                    [ppc/darwin8]
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: fang at csl.cornell.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


In a recent build of clang on powerpc-darwin8 (g++-4.0.1 built), I get numerous
crashes and assertion failures in the first hundred+ tests in the test suite.

log:
http://www.csl.cornell.edu/~fang/sw/llvm/logs/clang-r167161-powerpc-darwin8-g++-4.0.1-debug-check.log

clang is built with cmake here, and configured as a Debug build (-g only).

I picked an arbitrary test to debug: Analysis/complex.c

[fangism:~/temp/clang] fang%
/Users/fang/local/src/LLVM-svn/gcc40-cmake-build/bin/./clang -cc1
-internal-isystem
/Volumes/Isolde/builds/LLVM/gcc40-cmake-build/bin/../lib/clang/3.2/include
-analyze -analyzer-checker=core -analyzer-store=region
-analyzer-constraints=range -verify -Wno-unreachable-code -ffreestanding
/Volumes/Isolde/sources/LLVM-svn/clang/test/Analysis/complex.c
/Users/fang/local/src/LLVM-svn/llvm/include/llvm/ADT/APSInt.h:245: failed
assertion `IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"'
Stack dump:
0.      Program arguments:
/Users/fang/local/src/LLVM-svn/gcc40-cmake-build/bin/./clang -cc1
-internal-isystem
/Volumes/Isolde/builds/LLVM/gcc40-cmake-build/bin/../lib/clang/3.2/include
-analyze -analyzer-checker=core -analyzer-store=region
-analyzer-constraints=range -verify -Wno-unreachable-code -ffreestanding
/Volumes/Isolde/sources/LLVM-svn/clang/test/Analysis/complex.c 
1.      <eof> parser at end of file
2.      /Volumes/Isolde/sources/LLVM-svn/clang/test/Analysis/complex.c:9:7:
Error evaluating branch
Abort

stacktrace from assert-fail:
[fangism:~/temp/clang] fang% gdb
/Users/fang/local/src/LLVM-svn/gcc40-cmake-build/bin/./clang                   
                                               GNU gdb 6.3.50-20050815 (Apple
version gdb-696) (Sat Oct 20 18:20:28 GMT 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin"...
warning: --arch option not supported in this gdb.
Reading symbols for shared libraries
............................................................. done

(gdb) run -cc1 -internal-isystem
/Volumes/Isolde/builds/LLVM/gcc40-cmake-build/bin/../lib/clang/3.2/include
-analyze -analyzer-checker=core -analyzer-store=region
-analyzer-constraints=range -verify -Wno-unreachable-code -ffreestanding
/Volumes/Isolde/sources/LLVM-svn/clang/test/Analysis/complex.c
Starting program: /Volumes/Isolde/builds/LLVM/gcc40-cmake-build/bin/clang -cc1
-internal-isystem
/Volumes/Isolde/builds/LLVM/gcc40-cmake-build/bin/../lib/clang/3.2/include
-analyze -analyzer-checker=core -analyzer-store=region
-analyzer-constraints=range -verify -Wno-unreachable-code -ffreestanding
/Volumes/Isolde/sources/LLVM-svn/clang/test/Analysis/complex.c
tcsh: Word too long.
Reading symbols for shared libraries
.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ done
/Users/fang/local/src/LLVM-svn/llvm/include/llvm/ADT/APSInt.h:245: failed
assertion `IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"'

Program received signal SIGABRT, Aborted.
0x90047dac in kill ()
(gdb) where
#0  0x90047dac in kill ()
#1  0x9012d7b4 in abort ()
#2  0x94c870b0 in __eprintf ()
#3  0x5f159d48 in llvm::APSInt::operator- (this=0xbfffb0f4, RHS=@0xbfffb1ac) at
/Users/fang/local/src/LLVM-svn/llvm/include/llvm/ADT/APSInt.h:245
#4  0x5f0d748c in (anonymous namespace)::RangeConstraintManager::assumeSymEQ
(this=0x66109e00, St=@0xbfffb190, Sym=0x6583719c, Int=@0xbfffb1c4,
Adjustment=@0xbfffb1ac) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:457
#5  0x5f0e45bc in clang::ento::SimpleConstraintManager::assumeSymRel
(this=0x66109e00, state=@0xbfffb274, LHS=0x6583719c, op=BO_EQ, Int=@0x65837324)
at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp:267
#6  0x5f0e512c in clang::ento::SimpleConstraintManager::assumeAux
(this=0x66109e00, state=@0xbfffb30c, Cond={<DefinedSVal> =
{<DefinedOrUnknownSVal> = {<SVal> = {Data = 0x65837334, Kind = 7}, <No data
fields>}, <No data fields>}, <No data fields>}, Assumption=true) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp:202
#7  0x5f0e52b8 in clang::ento::SimpleConstraintManager::assume
(this=0x66109e00, state=@0xbfffb38c, cond={<DefinedSVal> =
{<DefinedOrUnknownSVal> = {<SVal> = {Data = 0x65837334, Kind = 7}, <No data
fields>}, <No data fields>}, <No data fields>}, assumption=true) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp:117
#8  0x5f0e5438 in clang::ento::SimpleConstraintManager::assume
(this=0x66109e00, state=@0xbfffb3f0, Cond={<DefinedOrUnknownSVal> = {<SVal> =
{Data = 0x65837334, Kind = 7}, <No data fields>}, <No data fields>},
Assumption=true) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp:62
#9  0x5f19bafc in clang::ento::ProgramState::assume (this=0x65837380,
Cond={<SVal> = {Data = 0x65837334, Kind = 7}, <No data fields>},
Assumption=true) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h:616
#10 0x5f0af720 in clang::ento::ExprEngine::processBranch (this=0xbfffba3c,
Condition=0x6580ec70, Term=0x6580ed08, BldCtx=@0xbfffb628, Pred=0x65837398,
Dst=@0xbfffb634, DstT=0x658328f4, DstF=0x658327dc) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:1253
#11 0x5f0a583c in clang::ento::CoreEngine::HandleBranch (this=0xbfffba48,
Cond=0x6580ec70, Term=0x6580ed08, B=0x65832968, Pred=0x65837398) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:454
#12 0x5f0a6d98 in clang::ento::CoreEngine::HandleBlockExit (this=0xbfffba48,
B=0x65832968, Pred=0x65837398) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:350
#13 0x5f0a730c in clang::ento::CoreEngine::HandlePostStmt (this=0xbfffba48,
B=0x65832968, StmtIdx=3, Pred=0x65837398) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:465
#14 0x5f0a790c in clang::ento::CoreEngine::dispatchWorkItem (this=0xbfffba48,
Pred=0x65837398, Loc={Data1 = 0x6580ec70, Data2 = {Value = 2}, L = {Value =
1712354177}, Tag = {Value = 0}}, WU=@0xbfffb8f0) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:266
#15 0x5f0a7d34 in clang::ento::CoreEngine::ExecuteWorkList (this=0xbfffba48,
L=0x66107380, Steps=149995, InitState=@0xbfffb9d8) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:222
#16 0x4df3d9e4 in clang::ento::ExprEngine::ExecuteWorkList (this=0xbfffba3c,
L=0x66107380, Steps=150000) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:104
#17 0x4df01c9c in (anonymous namespace)::AnalysisConsumer::ActionExprEngine
(this=0x66106b20, D=0x6580ebe0, ObjCGCEnabled=false, VisitedCallees=0xbfffbf10)
at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:613
#18 0x4df01df0 in (anonymous
namespace)::AnalysisConsumer::RunPathSensitiveChecks (this=0x66106b20,
D=0x6580ebe0, Visited=0xbfffbf10) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:632
#19 0x4df030c0 in (anonymous namespace)::AnalysisConsumer::HandleCode
(this=0x66106b20, D=0x6580ebe0, Mode=2, VisitedCallees=0xbfffbf10) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:581
#20 0x4df03508 in (anonymous namespace)::AnalysisConsumer::HandleDeclsCallGraph
(this=0x66106b20, LocalTUDeclsSize=29) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:434
#21 0x4df03844 in (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit (this=0x66106b20,
C=@0x6580be00) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:481
#22 0x37c2f588 in clang::ParseAST (S=@0x65817000, PrintStats=false,
SkipFunctionBodies=false) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/Parse/ParseAST.cpp:111
#23 0x337d1e50 in clang::ASTFrontendAction::ExecuteAction (this=0x66102e20) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:467
#24 0x337d19a8 in clang::FrontendAction::Execute (this=0x66102e20) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:384
#25 0x337b4fe8 in clang::CompilerInstance::ExecuteAction (this=0x66102940,
Act=@0x66102e20) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:678
#26 0x1f41c990 in clang::ExecuteCompilerInvocation (Clang=0x66102940) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:189
#27 0x00015460 in cc1_main (ArgBegin=0xbfffd0e0, ArgEnd=0xbfffd108,
Argv0=0x6610252c "/Volumes/Isolde/builds/LLVM/gcc40-cmake-build/bin/clang",
MainAddr=0x124b4) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/tools/driver/cc1_main.cpp:168
#28 0x00013dac in main (argc_=12, argv_=0xbfffd6a8) at
/Users/fang/local/src/LLVM-svn/llvm/tools/clang/tools/driver/driver.cpp:358

Does anyone see the first thing that may have gone wrong?

-- 
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