Merged
Conversation
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
matz
added a commit
that referenced
this pull request
Dec 8, 2023
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, 2023
When 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).
dearblue
added a commit
to dearblue/mruby
that referenced
this pull request
Dec 9, 2023
When 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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->procof the terminated fiber is collected by the GC.