Call stack overflow
Here's the simplest program I've been able to conjure up to make NodeJS overflow its call stack:
(use-modules (fibers) (fibers promises))
(define (foo) 61)
(lambda (resolved rejected)
(call-with-async-result
resolved rejected
(lambda ()
(set! foo (lambda () (values)))
(spawn-fiber
(lambda ()
(call-with-values foo
(lambda (x) x)))))))
Run with guild compile-wasm --run=node --async overflow.scm
Upon investigation, it seems that the Hoot runtime tries to throw an arity error because 0 values are returned from foo but the lambda expects 1. However, the runtime fails to throw to a prompt and enters an unbounded recursion of attempts to throw "prompt not found" exceptions.
Edited by David Thompson