diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2022-07-12 16:42:14 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2022-07-20 13:45:55 -0700 |
commit | 1341dea7711ae80aa4c232503fbb5a1be48b648b (patch) | |
tree | fc0408924cfa8cd090d93bc3784254b48879fe69 /cont.c | |
parent | 32e406d6d3c3ded9160298c4475c1aa188360b07 (diff) |
Prevent the stack from being marked twice
This commit prevents the stack from being marked twice: once via the
Fiber, and once via the Thread. It introduces an assertion to assert
that the ec on the thread is the same as the ec on the Fiber being
marked via the thread.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6123
Diffstat (limited to 'cont.c')
-rw-r--r-- | cont.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1194,6 +1194,12 @@ cont_init_mjit_cont(rb_context_t *cont) } } +struct rb_execution_context_struct * +rb_fiberptr_get_ec(struct rb_fiber_struct *fiber) +{ + return &fiber->cont.saved_ec; +} + static void cont_init(rb_context_t *cont, rb_thread_t *th) { |