镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Avoid saturating method calls in contract clause depth helpers - #5093

Open
r-near wants to merge 1 commit into
model-checking:mainfrom
r-near:fix-contract-clause-writeset
Open

r-near wants to merge 1 commit into
model-checking:mainfrom
r-near:fix-contract-clause-writeset

Conversation

@r-near

@r-near r-near commented Oct 28, 2026

Copy link
Copy Markdown

__VERIFIER_kani_{enter,exit}_contract_clause aren't instrumented by DFCC but called saturating_add/saturating_sub, which are, so every proof_for_contract harness printed CBMC's "not enough arguments" warning. This replaces the calls with a bounds-checked + 1/- 1. The two capture_load_* check counts go up by 2 for the new overflow checks.

Adds tests/script-based-pre/contract_clause_write_set, which fails before this change.

Related to #4796

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@r-near
r-near marked this pull request as ready for review October 28, 2026 17:00
@r-near
r-near requested review from a team as code owners October 28, 2026 17:00
@github-actions github-actions Bot added Z-EndToEndBenchCI Tag a PR to run benchmark CI Z-CompilerBenchCI Tag a PR to run benchmark CI labels Oct 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-CompilerBenchCI Tag a PR to run benchmark CI Z-EndToEndBenchCI Tag a PR to run benchmark CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant