3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-08-02 20:23:27 +00:00
z3/src
Copilot 07ccba46a1
Address high-confidence clang analyzer findings from warning report (#10355)
The clang-tidy warning report surfaced a small set of high-confidence
analyzer findings with straightforward fixes: intentional null
dereference in debug-only crash paths, undefined oversized shifts in
`mpff`, uninitialized state in sorting-network setup, and `% 0` in a
unit test edge case.

- **Debug crash path**
- Replaced intentional null writes in `src/util/debug.cpp` with an
explicit crash helper based on `SIGSEGV`/`abort`.
- Keeps the failure mode intentional without relying on undefined
pointer dereference.

  ```c++
  [[noreturn]] static void force_segfault() {
      std::raise(SIGSEGV);
      std::abort();
  }
  ```

- **`mpff` integer extraction**
- Hardened `get_uint64` / `get_int64` against analyzer-reported
oversized right shifts.
- Computes the shift count in `int64_t`, asserts the valid range, and
guards the shift site.

- **Sorting-network initialization**
- Initialized `psort_nw::m_t` in the constructor to avoid
uninitialized-object diagnostics on construction paths that inspect
state before later assignment.

- **Test-only edge cases**
- Added an early return in `src/test/total_order.cpp` for `sz == 0` to
avoid `% 0` in randomized loops.
- Removed the extra trailing semicolon pattern around the `find_q`
namespace in `src/test/var_subst.cpp`.

- **Scope**
- Focused only on localized, semantics-preserving fixes from the warning
artifact.
- Left broader architectural warnings (for example,
constructor/destructor virtual-call diagnostics) out of this change.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-08-01 15:30:26 -07:00
..
ackermannization block ackermann over nested selects 2026-06-19 10:41:56 -07:00
api Export killThreads from z3-solver to allow Node.js thread cleanup (#10320) 2026-07-31 12:00:04 -07:00
ast use definition of is_var from theory_seq 2026-08-01 14:41:20 -07:00
cmd_context Replace TPTP frontend env vars with tptp config module 2026-07-31 10:49:12 -07:00
math Disable "-Wnoctad-maybe-unsupported", add and fix "-Wdeprecated-copy-with-user-provided-copy". (#10332) 2026-07-31 19:34:08 -07:00
model updates to tptp_frontend 2026-07-04 14:34:21 -07:00
muz Make implicit switch case fall-throughs explicit (#10284) 2026-07-29 09:05:42 -07:00
nlsat Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
opt Make implicit switch case fall-throughs explicit (#10284) 2026-07-29 09:05:42 -07:00
params Add monadic regex end-game solver 2026-08-01 12:03:53 -07:00
parsers scanner: emit ERROR_TOKEN on I/O failure instead of silent EOF (#10294) 2026-07-29 14:00:42 -07:00
qe [snapshot-regression-fix] Spacer: keep symbolic term_graph representatives to fix 'Stuck on a lemma' regression (#10237) 2026-07-29 14:19:25 -07:00
sat Add global suppress_platform_verbose parameter (#10319) 2026-07-30 20:08:25 -07:00
shell Fixes necessary to compile z3 included in clang-tidy via FetchContents. (#9768) 2026-06-08 19:44:01 -07:00
smt catalogue propagation cases for membership 2026-08-01 15:04:03 -07:00
solver fix: parallel mode exits unknown immediately for QF_BV due to reason-string mismatch (#10183) 2026-07-21 19:48:55 -07:00
tactic Disable "-Wnoctad-maybe-unsupported", add and fix "-Wdeprecated-copy-with-user-provided-copy". (#10332) 2026-07-31 19:34:08 -07:00
test Address high-confidence clang analyzer findings from warning report (#10355) 2026-08-01 15:30:26 -07:00
util Address high-confidence clang analyzer findings from warning report (#10355) 2026-08-01 15:30:26 -07:00
CMakeLists.txt git bindings v1.0 2026-02-18 21:02:25 -08:00