feat: cut over to WASM backend
This commit is contained in:
@@ -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");
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
Reference in New Issue
Block a user