WEFT_OS/docs
Marco Allegretti 044634692f
fix(runtime): bound component memory and app messages
The runtime set no limits of its own:
- A component could grow its linear memory until the host ran out, with
  no ceiling at all where systemd is unavailable.
- An app message could contain line breaks and split into several
  messages.
- An overlong message from weft-appd was buffered without bound.
- A closed connection looked the same as an empty one.

The Wasmtime store now has a limiter: linear memory is capped at 256 MiB
by default (--max-memory-mib changes it), and tables and instances are
bounded too. A memory that would grow past the limit does not grow, and
the component sees an allocation failure.

App messages are single lines of at most 64 KiB, the limit weft-appd
applies. A longer message, or one containing a line break, is refused.
A longer line from weft-appd ends the connection, and sending afterwards
reports that it is closed. The systemd scope also gets TasksMax=64.

The grants probe component now also tries a 300 MiB allocation and the
two refused messages. tests/runtime/check_grants.py checks that the
allocation fails at the default limit and succeeds with a 512 MiB
limit.
2026-10-09 18:23:07 +00:00
..
upstream Add WEFT architecture and interface design documents 2026-03-10 18:47:10 +01:00
architecture.md fix(runtime): bound component memory and app messages 2026-10-09 18:23:07 +00:00
building.md Merge remote-tracking branch 'origin/fix/session-owned-ipc-relay' into fix/confine-app-renderer 2026-10-09 11:37:44 +00:00
security.md fix(runtime): bound component memory and app messages 2026-10-09 18:23:07 +00:00