Release notes: User-level stack overflows no longer crash Prepack.
This fixes #2552, and actually a bit more:
We used to piggy-back on pushContext to count stack frames. However, there is no one-to-one correspondance of calls and context, so that wasn't a very good proxy. (In fact, there seem to be calls that don't push a context.) So we now count calls and constructs explicitly.
Instead of just throwing a FatalError when the stack space is exceeded, which in turn causes an invariant violation since there must not be a FatalError thrown without a compiler diagnostics having beein issue. Now there is a regular error code PP0045.
Release notes: User-level stack overflows no longer crash Prepack.
This fixes #2552, and actually a bit more:
pushContext
to count stack frames. However, there is no one-to-one correspondance of calls and context, so that wasn't a very good proxy. (In fact, there seem to be calls that don't push a context.) So we now count calls and constructs explicitly.FatalError
when the stack space is exceeded, which in turn causes an invariant violation since there must not be aFatalError
thrown without a compiler diagnostics having beein issue. Now there is a regular error code PP0045.Added error handler regression test.