1(module
2  (func $foo
3    (call $foo)
4  )
5  (func (export "stack_overflow")
6    (call $foo)
7  )
8)
9
10(assert_exhaustion (invoke "stack_overflow") "call stack exhausted")
11(assert_exhaustion (invoke "stack_overflow") "call stack exhausted")
12
13(module
14  (func $foo
15    (call $bar)
16  )
17  (func $bar
18    (call $foo)
19  )
20  (func (export "stack_overflow")
21    (call $foo)
22  )
23)
24
25(assert_exhaustion (invoke "stack_overflow") "call stack exhausted")
26(assert_exhaustion (invoke "stack_overflow") "call stack exhausted")
27