Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[analyzer] Indicate UnarySymExpr is not supported by Z3 #108900

Merged
merged 1 commit into from
Sep 19, 2024

Commits on Sep 19, 2024

  1. [analyzer] Indicate UnarySymExpr is not supported by Z3

    Random testing found that the Z3 wrapper does not support UnarySymExpr,
    which was added recently and not included in the original Z3 wrapper.
    For now, just avoid submitting expressions to Z3 to avoid compiler crashes.
    
    Some crash context ...
    
    clang -cc1 -analyze -analyzer-checker=core z3-unarysymexpr.c -analyzer-constraints=z3
    
    Unsupported expression to reason about!
    UNREACHABLE executed at clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h:297!
    
    Stack dump:
    3.	<root>/clang/test/Analysis/z3-unarysymexpr.c:13:7: Error evaluating branch
     #0 <addr> llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
     llvm#1 <addr> llvm::sys::RunSignalHandlers()
     llvm#8 <addr> clang::ento::SimpleConstraintManager::assumeAux(
                llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::NonLoc, bool)
     llvm#9 <addr> clang::ento::SimpleConstraintManager::assume(
                llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::NonLoc, bool)
    einvbri committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    d48964b View commit details
    Browse the repository at this point in the history