If the filename and line number cannot be obtained, "(unknown):1" is used instead.
Also, the file name information of the terminated fiber cannot be retrieved and will be replaced as well.
This limitation is due to the fact that `cibase->proc` of the terminated fiber is collected by the GC.
```console
% bin/mruby -e 'p Fiber.new { p Fiber.current }.resume'
#<Fiber:0x82423bef0 -e:1 (resumed)>
#<Fiber:0x82423bef0 (unknown):1 (terminated)>
```
matz added a commit that referenced this pull request
Dec 8, 2023…6105 Since `cxt->ci` points to the last active callinfo, `cxt->ci == cxt->cibase` does not mean it does not have correct `proc` information, so we have removed the `f->cxt->ci > f->cxt->cibase` check. Instead, just in case `proc` does not have `irep` information, we try to confirm `proc` does not point to `CFUNC` nor is not an alias.
dearblue added a commit to dearblue/mruby that referenced this pull request
Dec 9, 2023When fiber is terminated, the pointer indicated by f->cxt->cibase->proc is not protected from GC. I should have done this patch way as of commit ca9e8d9 (mruby#6105).
Merged
dearblue added a commit to dearblue/mruby that referenced this pull request
Dec 9, 2023When fiber is terminated, the pointer indicated by `f->cxt->cibase->proc` is not protected from GC. I should have done this patch way as of commit 9af6264 (mruby#6105).
matz added a commit that referenced this pull request
Dec 15, 2023