llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.02k stars 11.96k forks source link

Encountered problems when compiling PETSc software #27559

Closed llvmbot closed 3 months ago

llvmbot commented 8 years ago
Bugzilla Link 27185
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor
CC @DougGregor,@hfinkel
llvmbot commented 8 years ago

generated by clang 3

llvmbot commented 8 years ago

generated by clang 2

llvmbot commented 8 years ago

generated by clang generated by clang

Endilll commented 3 months ago

Crash:

Assertion failed:
(assume(State, Cond, false) && "System is over constrained."),
function assumeDual,
file /Users/ugurmeryem/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h, line 86.
0  clang-3.9                0x00000001059c7cce llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 46
1  clang-3.9                0x00000001059c8119 PrintStackTraceSignalHandler(void*) + 25
2  clang-3.9                0x00000001059c48b9 llvm::sys::RunSignalHandlers() + 425
3  clang-3.9                0x00000001059c8479 SignalHandler(int) + 345
4  libsystem_platform.dylib 0x00007fff8ee1552a _sigtramp + 26
5  libsystem_platform.dylib 0x00007fff687769a5 _sigtramp + 3650491541
6  clang-3.9                0x00000001059c813b raise + 27
7  clang-3.9                0x00000001059c81f2 abort + 18
8  clang-3.9                0x00000001059c81d1 __assert_rtn + 129
9  clang-3.9                0x0000000108588dfe clang::ento::ConstraintManager::assumeDual(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::DefinedSVal) + 430
10 clang-3.9                0x0000000108582f64 clang::ento::ProgramState::assume(clang::ento::DefinedOrUnknownSVal) const + 580
11 clang-3.9                0x0000000108579379 clang::ento::ExprEngine::evalEagerlyAssumeBinOpBifurcation(clang::ento::ExplodedNodeSet&, clang::ento::ExplodedNodeSet&, clang::Expr const*) + 1049
12 clang-3.9                0x0000000108575357 clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) + 5047
13 clang-3.9                0x0000000108572574 clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt, clang::ento::ExplodedNode*) + 532
14 clang-3.9                0x000000010857223a clang::ento::ExprEngine::processCFGElement(clang::CFGElement, clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) + 218
15 clang-3.9                0x0000000108553e9e clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int, clang::ento::ExplodedNode*) + 302
16 clang-3.9                0x0000000108553820 clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*, clang::ProgramPoint, clang::ento::WorkListUnit const&) + 1264
17 clang-3.9                0x0000000108553178 clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*, unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) + 1240
18 clang-3.9                0x00000001073ce998 clang::ento::ExprEngine::ExecuteWorkList(clang::LocationContext const*, unsigned int) + 88
19 clang-3.9                0x000000010738d7dd (anonymous namespace)::AnalysisConsumer::ActionExprEngine(clang::Decl*, bool, clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*, llvm::DenseMapInfo<clang::Decl const*> >*) + 1501
20 clang-3.9                0x000000010738d199 (anonymous namespace)::AnalysisConsumer::RunPathSensitiveChecks(clang::Decl*, clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*, llvm::DenseMapInfo<clang::Decl const*> >*) + 153
21 clang-3.9                0x000000010738cc78 (anonymous namespace)::AnalysisConsumer::HandleCode(clang::Decl*, unsigned int, clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*, llvm::DenseMapInfo<clang::Decl const*> >*) + 696
22 clang-3.9                0x0000000107384288 (anonymous namespace)::AnalysisConsumer::HandleDeclsCallGraph(unsigned int) + 920
23 clang-3.9                0x0000000107381eda (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) + 842
24 clang-3.9                0x00000001073fd5c2 clang::ParseAST(clang::Sema&, bool, bool) + 1298
25 clang-3.9                0x00000001064ec01f clang::ASTFrontendAction::ExecuteAction() + 511
26 clang-3.9                0x00000001064eb580 clang::FrontendAction::Execute() + 112
27 clang-3.9                0x0000000106439d71 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1873
28 clang-3.9                0x000000010657a64a clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4410
29 clang-3.9                0x00000001036af21b cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 4923
30 clang-3.9                0x000000010369ef7c ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) + 476
31 clang-3.9                0x000000010369cadc main + 3244
32 libdyld.dylib            0x00007fff908015ad start + 1
33 libdyld.dylib            0x000000000000004f start + 1870654115
Stack dump:
0.  Program arguments: /usr/local/bin/clang-3.9 -cc1 -triple x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -analyze -disable-free -main-file-name sysio.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=unix -analyzer-checker=osx -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 253.9 -dwarf-column-info -debugger-tuning=lldb -resource-dir /usr/local/bin/../lib/clang/3.9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I /Users/ugurmeryem/Downloads/petsc-3.6.3/include -I /Users/ugurmeryem/Downloads/petsc-3.6.3/arch-darwin-c-debug/include -I /opt/X11/include -I /opt/local/include -O0 -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fconst-strings -fdebug-compilation-dir /Users/ugurmeryem/Downloads/petsc-3.6.3 -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.11.0 -fencode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option -analyzer-output=html -o /var/folders/f7/rzdyhd9x2bd39zsnq6ys_5fr0000gn/T/scan-build-2016-04-01-215529-5268-1 -x c /Users/ugurmeryem/Downloads/petsc-3.6.3/src/sys/fileio/sysio.c 
1.  <eof> parser at end of file
2.  While analyzing stack: 
    #0 PetscErrorCode PetscBinaryRead(int fd, void *p, PetscInt n, PetscDataType type)
3.  /Users/ugurmeryem/Downloads/petsc-3.6.3/src/sys/fileio/sysio.c:274:17: Error evaluating statement
4.  /Users/ugurmeryem/Downloads/petsc-3.6.3/src/sys/fileio/sysio.c:274:17: Error evaluating statement
llvmbot commented 3 months ago

@llvm/issue-subscribers-clang-static-analyzer

Author: None (llvmbot)

| | | | --- | --- | | Bugzilla Link | [27185](https://llvm.org/bz27185) | | Version | unspecified | | OS | All | | Reporter | LLVM Bugzilla Contributor | | CC | @DougGregor,@hfinkel |
steakhal commented 3 months ago

I think this assertion was fixed by https://github.com/llvm/llvm-project/commit/1c1c1e25f94fd1bb10fdbfe96dc14ffc655db5df clang-15 and above should work.