thread_pthread.c (unregister_ubf_list): assert unblock.func is unset
We must not allow reentry into ubf_list_head once we delete ourselves, otherwise we could hang in there forever. [ruby-core:88218] [Bug #14945] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
508f00314f
commit
86d35a6b1a
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user