Branch: Tag:


2020-07-03 09:38:29 by Henrik Grubbström (Grubba) <>

Thread.Mutex: Fixed wait count leak on threads_disabled in lock().

If the mutex was already locked when lock() was called in a
threads_disabled context, the wait count was increased but
no corresponding wait was performed.

2270:       if(key->next)    { -  m->num_waiting++; +     if(threads_disabled)    {    free_object(o);    Pike_error("Cannot wait for mutexes when threads are disabled!\n");    } -  +  m->num_waiting++;    do    {    THREADS_FPRINTF(1, "WAITING TO LOCK m:%p\n", m);