[CSA] Clang Static Analyzer Report - 130 findings #8772
Closed
Replies: 1 comment
-
|
This discussion was automatically closed because it expired on 2026-03-04T10:39:14.004Z.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Clang Static Analyzer Report
Date: 2026-02-25
Commit:
5ccc2cd- recompileBuild type: Debug (CMake + Ninja)
Analyzer: scan-build-18 (LLVM 18.1.3)
Summary
Changes Since Last Run
Comparison with 2026-02-24 (commit
c282ece):High-Priority Findings
Critical: Null Pointer Dereferences and Calls (95 findings)
These are the most serious findings that could lead to crashes or undefined behavior:
Top Issues by File:
src/ast/ast.h - Multiple null pointer calls (~18 instances)
Called C++ object pointer is nullsrc/ast/sls/sls_seq_plugin.cpp - 6 instances
src/math/realclosure/realclosure.cpp - 5 instances
Array access results in null pointer dereferenceCalled C++ object pointer is nullsrc/ast/euf/euf_mam.cpp - 5 instances
Called C++ object pointer is nullAccess to field 'm_opcode' results in null pointer dereferencesrc/math/polynomial/polynomial.cpp - 3 instances
Access to field 'm_next' results in null pointer dereference (m_del_eh)Access to field 'm_next' results in null pointer dereference (m_next)Findings by Category
Core Checkers (Memory Safety & Logic Errors)
1. core.CallAndMessage (80 findings)
Calls to C++ member functions through null object pointers. These are false positives in many cases due to analyzer limitations with complex invariants, but some may be real issues.
Notable locations:
src/ast/ast.h(18 instances)src/smt/smt_context.h(7 instances)src/ast/sls/sls_seq_plugin.cpp(6 instances)src/util/util.h(5 instances)2. core.NullDereference (15 findings)
Direct dereferences of null pointers through array access or pointer operations.
Examples:
src/util/debug.cpp:163- Intentional null dereference for crash testingsrc/math/realclosure/realclosure.cpp:1118- Array access with null pointersrc/ast/rewriter/enum2bv_rewriter.cpp:92, 100- Args array access3. core.BitwiseShift (15 findings)
Bitwise shift operations that overflow or use negative shift amounts.
Affected files:
src/util/bit_util.cpp- 4 instances (shifts by 32 on unsigned int)src/math/simplex/bit_matrix.cpp- 5 instances (shifts by 32-35 on int)src/util/mpff.cpp- 2 instances (negative right operand)src/ast/rewriter/enum2bv_rewriter.cpp:67- Left shift overflowStatus: Some are intentional (checked elsewhere), others may need review.
4. core.DivideZero (5 findings)
Potential division by zero operations.
5. core.uninitialized.* (12 findings)
core.uninitialized.UndefReturn- Returning null referencescore.uninitialized.Branch- Branching on uninitialized valuescore.uninitialized.ArraySubscript- Array access with uninitialized index6. core.StackAddressEscape (1 finding)
src/qe/mbp/mbp_arrays.cpp:533- Stack address escapes in model evaluatorDead Code and Logic Errors
deadcode.DeadStores (27 findings)
Values stored to variables that are never read. These are typically harmless but indicate potential logic errors or unnecessary code.
Top occurrences:
src/util/util.cpp:79, 108- Variable 'v' stores never readsrc/math/hilbert/hilbert_basis.cpp:1013, 1014- 'prod' and 'non_zeros'src/math/simplex/model_based_opt.cpp:76- 'sign' variablesrc/bv_rewriter.cpp:2169- 'bv_size' variableUndefined Behavior
core.UndefinedBinaryOperatorResult (4 findings)
Operations with garbage/uninitialized values:
src/ast/act_cache.cpp:178, 179, 200- Bitwise AND with garbage valuesTop Affected Files
Build Log Excerpt
Sample warnings from build (click to expand)
Notes
debug.cpp:163are intentional (crash test code)HTML Report
Full interactive HTML report with detailed execution paths:
/tmp/csa-report/2026-02-25-090950-373-1/index.htmlTo view the complete report with execution traces for each finding, run:
Recommendations
core.NullDereferenceandcore.DivideZerofindings firstbit_util.cppandbit_matrix.cppare intentionalReport generated by Z3 CSA Workflow on 2026-02-25
Beta Was this translation helpful? Give feedback.
All reactions