Acton
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: E023
  • Rule: bless-call-missing-safety-comment
  • Status: Stable since v0.0.1
  • Quick 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);
E023: converting slice to continuation requires safety comment
}

Use instead:

fun convert(code: slice): continuation {
    // SAFETY: `code` is verified bytecode from trusted state.
    return transformSliceToContinuation(code);
}
Source code

Last updated on

On this page