You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
§31.8.6: the drafter's contradiction check misses a function that assigns the destroyer global only through a function it calls #3338
The drafter records a function that assigns a global in its own body (contract-proofs.txt, F<TAB>assigns<TAB>G<TAB>proof; CImport.ci_body_call_evidence_walk emits assign:<name>, CiProjectSymbol.assigned_globals), and a contract that describes such a function contradicts the destroyer clause that names the global (SemaFacade.check_facade_assigner_proofs).
Not covered: a function that assigns the global only through a call.
void (*node_release)(Node*n) =plain_release;
voidset_release(void (*f)(Node*n)) { node_release=f; } /* recorded */voidnode_configure(void) { set_release(other_release); } /* not recorded */
A contract with drop node_release that describes node_configure is accepted. §31.8.6 says a function that assigns the global stays raw, and the in-unit check (verify_facade_hook_assigners) already follows calls ("a function that calls an assigner assigns"); the drafter's proof should too.
Fix: close assigned_globals over the project's direct calls before facade_proofs writes the lines (the proof text names the path: "calls set_release, whose body assigns node_release"). A call through a function-pointer field or to a function no unit defines stops the walk, as it does for the other proofs (weaker than a grant, §31.7).
Test: extend test/internals/conan_contract_proofs_assigns_test.w with node_configure.
The §31.8.6 mark names this limit; it goes when this lands.
Activity
§31.8.6: with get records the functions that assign a global, and a c…
A function that reaches an assigner of a destroyer global assigns it (#…