Dear developers, there is a double unlocking bug in the below code, thank you for your checking.
while (b->packets[b->nextid] != NULL) {
/* No more packet slots available! */
pthread_cond_wait(&b->cond, &b->lock);
pthread_mutex_unlock(&b->lock); // the first time
}
b->packets[b->nextid] = b->node;
b->node->activemembers ++;
b->node->released[s] = 1;
b->nextid ++;
ret = b->nextid - 1;
pthread_mutex_unlock(&b->lock); // the second time
Dear developers, there is a double unlocking bug in the below code, thank you for your checking.
https://github.com/ycaibb/libtrace/blob/master/lib/data-struct/buckets.c#L161-L172