From 1341dea7711ae80aa4c232503fbb5a1be48b648b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 12 Jul 2022 16:42:14 -0700 Subject: 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. --- internal/cont.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/cont.h') diff --git a/internal/cont.h b/internal/cont.h index 5ab120e9ab..abffc97104 100644 --- a/internal/cont.h +++ b/internal/cont.h @@ -12,6 +12,7 @@ struct rb_thread_struct; /* in vm_core.h */ struct rb_fiber_struct; /* in cont.c */ +struct rb_execution_context_struct; /* in vm_core.c */ /* cont.c */ void rb_fiber_reset_root_local_storage(struct rb_thread_struct *); @@ -20,5 +21,6 @@ void rb_fiber_init_mjit_cont(struct rb_fiber_struct *fiber); VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber); unsigned int rb_fiberptr_blocking(struct rb_fiber_struct *fiber); +struct rb_execution_context_struct * rb_fiberptr_get_ec(struct rb_fiber_struct *fiber); #endif /* INTERNAL_CONT_H */ -- cgit v1.2.1