B5117: a cell outside the writable footprints might be written
Catalog status: active. Default severity: error. Stable name: frame-write. Family: Contracts and termination.
An enclave operation writes only cells in the footprints of the objects it may change (its in out and out enclave parameters) and cells it allocated itself: an object given as in, or one not given at all, keeps its cells, so its model is unchanged, as its clients assume. A freed cell is never written.
Example (Vada)
procedure Copy_Top (From : Stack; Into : in out Stack) is
begin
From.Top.Value := Into.Top.Value; -- From is `in`: its cells are not this operation's to change
end Copy_Top;What to do (Vada)
Write only through the objects the operation may change, and keep the footprints' contents in the type's invariant so that each cell written is known to be in one.
Regression source and further reading
Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.
See contracts and termination, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.