Commit 2a1e67ff authored by sunny's avatar sunny

branches/zip: Fix a bug in the sync debug code where a lock with level

SYNC_LEVEL_VARYING would cause an assertion failure when a thread tried
to release it. We still have to check because it's a varying lock and
could have been added later, so if the lookup fails then we simply ignore
it and return TRUE.
parent 1ba7f407
......@@ -1224,6 +1224,18 @@ sync_thread_reset_level(
}
}
if (((mutex_t*) latch)->magic_n != MUTEX_MAGIC_N) {
rw_lock_t* rw_lock;
rw_lock = (rw_lock_t*) latch;
if (rw_lock->level == SYNC_LEVEL_VARYING) {
mutex_exit(&sync_thread_mutex);
return(TRUE);
}
}
ut_error;
mutex_exit(&sync_thread_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment