Linting rules
E023: bless-call-missing-safety-comment
Requires a `SAFETY` comment for calls to `transformSliceToContinuation` and for calls to any `asm` function that uses `BLESS`.
Metadata
Code:E023Rule:bless-call-missing-safety-commentStatus: Stable sincev0.0.1Quick fix: not available
What it does
Requires a SAFETY comment for calls to transformSliceToContinuation
and for calls to any asm function that uses BLESS.
Why is this bad?
BLESS creates continuations from raw code slices and can bypass
high-level control-flow assumptions. Call sites should document
why inputs are trusted and which invariants are required.
Example
fun convert(code: slice): continuation {
return transformSliceToContinuation(code);}Use instead:
fun convert(code: slice): continuation {
// SAFETY: `code` is verified bytecode from trusted state.
return transformSliceToContinuation(code);
}Last updated on