rb_jmpbuf_t type is considerably large due to inline-allocated Asyncify buffer, and it leads to stack overflow even with small number of C-method call frames. This commit allocates the Asyncify buffer used by rb_wasm_setjmp in heap to mitigate the issue.
This patch introduces a new type rb_vm_tag_jmpbuf_t to abstract the representation of a jump buffer, and init/deinit hook points to manage lifetime of the buffer. These changes are effectively NFC for non-wasm platforms.
[wasm] allocate Asyncify setjmp buffer in heap
rb_jmpbuf_ttype is considerably large due to inline-allocatedAsyncify buffer, and it leads to stack overflow even with small number
of C-method call frames. This commit allocates the Asyncify buffer used
by
rb_wasm_setjmpin heap to mitigate the issue.This patch introduces a new type
rb_vm_tag_jmpbuf_tto abstract therepresentation of a jump buffer, and init/deinit hook points to manage
lifetime of the buffer. These changes are effectively NFC for non-wasm
platforms.