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
audit:contract misses invalidation masks left in C parameter indices after facade projection #1674
Found while composing element buffers and callbacks for #1643/#1644. audit:contract reports violations=0 ok over a facade whose rendered call carries the wrong parameter invalidation mask.
Shape: C touch(const unsigned char *values, int count, Handle *owner) with buffer param values len param count renders touch(values: []u8, owner: &Owner). The owner is C parameter 2 but presented parameter 1. facade_index_call_effects passes facade_touch_params_mask(..., 0) unchanged to both signatures, so the bridge receives bit 2 (4), pointing beyond its two parameters. A record view borrowed from owner remains accepted after touch(values, owner) mutates it. This also reproduces on installed main 334739d with byte buffers; it is not specific to the new elements qualifier.
LLDB proof on the campaign stage1: Sema.facade_add_call_effect received raw sig=762, fn_sym=13358, ci=1, mask=4 from SemaFacade.w:3092; the next hit received rendered sig=767 with the same mask=4 from line 3100. The presented signature has two parameters. The audit reports contract-audit: facts=338716 violations=0 ok over the accepted stale-view program.
The parameter projection fix and stale-view regression are being included in the modeled-C buffer layer above #1672. The audit also needs to validate rendered effect indices against the Sema-owned C-to-presented parameter projection (including fixed arguments, buffer lengths, and hidden destruction callbacks), rather than only reporting the source contract inventory. This files the tool that stayed silent in the same batch, per AGENTS.md.
Activity
audit:contract checks every rendered call's invalidation mask; a prod…
Facade effects: an in-place producer is not also a lend method of its…
C backend and modeled-C fixes: map loops, generic structs, view compa…
c_import/migrate/emit-c: no `-> Unit` on void C fns (#1838); header f…
Facade audit reads acceptance's fact: an effect's presented parameter…
Sema: one arity check for every call path (#1973); owned ?? / unwrap_…