on master help sign in
Keep the selftest stub's loop in constant memory
9babd32Claude
tools/testdata/stub.hoon+4−1
@@ -12,7 +12,9 @@
12:: crash crashes in +explode, under a ~| trace; mule catches it
12:: crash crashes in +explode, under a ~| trace; mule catches it
13:: bail asks for a 3 GB atom, which ends the whole eval, as running
13:: bail asks for a 3 GB atom, which ends the whole eval, as running
14:: out of memory does; mule can't catch it
14:: out of memory does; mule can't catch it
15−:: loop never returns, for testing timeouts
15+:: loop never returns, for testing timeouts; +spin is built without
16+:: debug hints, which would keep each call's frame, so it
17+:: runs in constant memory and the eval can't run out first
16::
18::
17:: tools/testdata/selftest also copies this file with errors put in, to
19:: tools/testdata/selftest also copies this file with errors put in, to
18:: test that errors are reported at the right lines.
20:: test that errors are reported at the right lines.
@@ -69,6 +71,7 @@
69 $(lines t.lines, n +(n))
71 $(lines t.lines, n +(n))
70::
72::
71++ spin
73++ spin
74+ !.
72 |= n=@ud
75 |= n=@ud
73 ^- @t
76 ^- @t
74 $(n +(n))
77 $(n +(n))