Skip to content
  • Yuta Saito's avatar
    50a5b76d
    [wasm] allocate Asyncify setjmp buffer in heap · 50a5b76d
    Yuta Saito authored
    `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.
    50a5b76d
    [wasm] allocate Asyncify setjmp buffer in heap
    Yuta Saito authored
    `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.
Loading