diff options
-rw-r--r-- | thread_pthread.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 844a4bc800..c8487e55f1 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1178,6 +1178,9 @@ unregister_ubf_list(rb_thread_t *th) { struct list_node *node = &th->native_thread_data.ubf_list; + /* we can't allow re-entry into ubf_list_head */ + VM_ASSERT(th->unblock.func == 0); + if (!list_empty((struct list_head*)node)) { rb_native_mutex_lock(&ubf_list_lock); list_del_init(node); |