E1864: imported call without a stack claim

View source

A meta stack_limit verb is only as bounded as the code it calls (ADR-0103).

A meta stack_limit verb is only as bounded as the code it calls (ADR-0103). A verb that comes from another module must publish its own meta stack_limit claim, or the caller has no bound to add. The error points at the call and names the imported verb, such as math::add. A call to an unsafe extern function without a claim is E1861.

Example

actus
import math;

meta stack_limit(bytes: 256u32)
verb step() -> Int {
    return math::add();
}

verb main() {
}
actus
open add;
actus
open verb add() -> Int {
    return 1;
}

Fix

Declare a stack limit on the imported verb.

actus
import math;

meta stack_limit(bytes: 256u32)
verb step() -> Int {
    return math::add();
}

verb main() {
}
actus
open add;
actus
meta stack_limit(bytes: 64u32)
open verb add() -> Int {
    return 1;
}
toml
[package]
name = "example"
version = "0.1.0"
edition = "alpha"
entry = "main"

[build]
target = "x86_64-unknown-linux-gnu"
profile = "debug"
runtime = "std"

Run actus explain E1864 in your terminal to read this entry offline. Browse Strict & toolchain or all error codes.