summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index 29804bc48c..5814deb20b 100644
--- a/vm.c
+++ b/vm.c
@@ -1470,6 +1470,13 @@ thread_free(void *ptr)
RUBY_FREE_UNLESS_NULL(th->stack);
}
+ if (th->locking_mutex != Qfalse) {
+ rb_bug("thread_free: locking_mutex must be NULL (%p:%ld)", th, th->locking_mutex);
+ }
+ if (th->keeping_mutexes != Qfalse) {
+ rb_bug("thread_free: keeping_mutexes must be NULL (%p:%ld)", th, th->locking_mutex);
+ }
+
if (th->local_storage) {
st_free_table(th->local_storage);
}
@@ -1537,6 +1544,8 @@ rb_thread_mark(void *ptr)
RUBY_MARK_UNLESS_NULL(th->root_fiber);
RUBY_MARK_UNLESS_NULL(th->stat_insn_usage);
+ RUBY_MARK_UNLESS_NULL(th->locking_mutex);
+
rb_mark_tbl(th->local_storage);
if (GET_THREAD() != th && th->machine_stack_start && th->machine_stack_end) {