check stack_limit in closure_convert
commit86aa5a1494789d9c849c24bd5f6d045e5bd119a9
authorEdwin Smith <smith@fb.com>
Sat, 12 Mar 2022 18:03:41 +0000 (12 10:03 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sat, 12 Mar 2022 18:03:41 +0000 (12 10:03 -0800)
treed6bf1594de3e25d721c1d18394c394bbcc973374
parent232897fe7976b0db8ec46ea94a124d976a1ebb13
check stack_limit in closure_convert

Summary:
The stack ending in D34818118 refactors p_expr_impl() a few functions at
a time. Once the lowerer stack usage crossed under the emitter stack usage,
stack overflows began to occur in closure_convert since the lowerer was no
longer stretching the stack enough.

This diff plumbs stack_limit down enough to prevent those stack overflows.

Reviewed By: shayne-fletcher

Differential Revision: D34818023

fbshipit-source-id: 1a6c7803cafcce2a051860db37940be80fa88386
hphp/hack/src/hackc/compile/closure_convert.rs
hphp/hack/src/hackc/compile/compile.rs
hphp/hack/src/hackc/compile/rewrite_program.rs