feat: cut over to WASM backend

This commit is contained in:
udo
2026-06-13 08:42:31 +00:00
parent 577aae076e
commit afaa4dd7c0
16 changed files with 603 additions and 25 deletions
+10
View File
@@ -0,0 +1,10 @@
// W4 kill-test: runaway CPU. Epoch interruption traps it at the configured
// deadline; the worker stays healthy.
RENDER(Request& context)
{
print("about to loop\n");
volatile u64 i = 0;
while(i >= 0)
i++;
print("unreachable\n");
}
+8
View File
@@ -0,0 +1,8 @@
// W4/W5 kill-test: explicit guest trap. Native must not run this page; the
// wasm backend converts it into a clean UCE error page and keeps serving.
RENDER(Request& context)
{
print("about to trap\n");
__builtin_trap();
print("unreachable\n");
}
+14
View File
@@ -0,0 +1,14 @@
// W4 kill-test: stack exhaustion via unbounded recursion. Traps as
// "call stack exhausted"; the workspace drops cleanly.
u64 wasm_kill_recurse(volatile u64 depth)
{
volatile u64 next = depth + 1;
return(next + wasm_kill_recurse(next));
}
RENDER(Request& context)
{
print("about to recurse\n");
volatile u64 sink = wasm_kill_recurse(0);
print("unreachable ", sink, "\n");
}