Skip to content

with get: a store into a record of the function's own frame is no proof of a store (#3374, first part) - #3381

Merged
ehartford merged 1 commit into
mainfrom
frame-field-store
Nov 16, 2026
Merged

ehartford merged 1 commit into
mainfrom
frame-field-store

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Part of #3374 (does not close it: the second store, a back-pointer in memory the parameter owns, awaits a ruling; see the brief in the issue).

sqlite3Prepare has Parse sParse; … sParse.db = db;. The proof engine read any member store as "the function stores the parameter", so contract-proofs.txt contradicted a stated lend on sqlite3_prepare_v2 and sqlite3_exec wherever sqlite3 is built from source (Windows).

  • CImport.ci_body_call_evidence_walk writes frame:<param> when the place is name.f… (dots only) and name is a non-static local or a by-value parameter that the body never uses as a whole value (assigned somewhere, returned, passed by value). ci_own_walk writes no paramstore for it.
  • A drawn contract still counts it as retained (param_stores), so nothing drawn becomes more permissive; fd_retain_reason says "held in a record of the function's own frame, which is not followed", which is not a proof line (§31.7: weaker than a grant).
  • Still a store: a static local record, a record copied through a pointer, a record returned by value, a store through a pointer.

Test: test/internals/conan_contract_proofs_frame_record_test.w, nine cases; it failed before the change (scratch stores 0 stored in a field).

Battery GREEN (4c201ed); :release-checks green.

…'s own frame is no proof of a store (sqlite3Prepare's sParse.db = db); a record the body copies out, returns or holds static still is (#3374)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant