Stack address should not be used for ordering mutexes

This commit is contained in:
Rajeev Misra 2018-04-09 19:02:40 -07:00 committed by David Goldblatt
parent cf2f4aac1c
commit 5f51882a0a

View File

@ -174,7 +174,7 @@ malloc_mutex_init(malloc_mutex_t *mutex, const char *name,
mutex->lock_order = lock_order;
if (lock_order == malloc_mutex_address_ordered) {
witness_init(&mutex->witness, name, rank,
mutex_addr_comp, &mutex);
mutex_addr_comp, mutex);
} else {
witness_init(&mutex->witness, name, rank, NULL, NULL);
}