• dearblue's avatar
    Fix `SIGSEGV` with mruby-method + mruby-catch · 6c097c71
    dearblue authored
    Previously, the following code would cause a `SIGSEGV`.
    
    ```ruby
    mm = method(:throw)
    define_method(:throw, ->(*args) { mm.call(*args) })
    catch { |tag| throw tag }
    ```
    
    I think the reason is in the `mrb_yield_with_class()` function:
    - Even if a C function is called, `CI_ACC_SKIP` is used
    - `cipop()` is not done if globally jumping from a C function
    6c097c71
vm.c 79.6 KB