B2020: an enclave's cell holds what a cell may not
Catalog status: active. Default severity: error. Stable name: enclave-cell-component. Family: Types and constraints.
The cells a proof enclave's access types designate hold only copyable values: no limited object, no owning pointer of an access type from outside the enclave, no reclaimed (Finalizable) object and no object of an enclave type. Cells are shared between pointers inside the enclave, so whatever owns something inside a cell could be reached, and moved or freed, along two paths.
Example (Vada)
with Boxes; -- type Box is access Integer;
package Lists
with Annotate => (Verada, Enclave)
is
...
private
type Node;
type Node_Ptr is access Node;
type Node is record
Value : Integer;
Next : Node_Ptr;
Data : Boxes.Box; -- an owning pointer in a shared cell
end record;
...What to do (Vada)
Hold the value itself in the cell (Data : Integer), or a pointer of one of the enclave's own access types, whose cells the enclave's footprints account for.
Regression source and further reading
Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.
See types and constraints, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.