Commit 07460c31 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-30900 Crash on macOS due to zero-initialized buf_dblwr.write_cond

buf_dblwr_t::init(), buf_dblwr_t::close(): Cover also write_cond,
which was added in commit a55b951e
without explicit initialization. On GNU/Linux, PTHREAD_COND_INITIALIZER
is a zero-initializer. That is why the default zero initialization
happened to work on that platform.
parent 15ca6c5a
......@@ -53,6 +53,7 @@ void buf_dblwr_t::init()
active_slot= &slots[0];
mysql_mutex_init(buf_dblwr_mutex_key, &mutex, nullptr);
pthread_cond_init(&cond, nullptr);
pthread_cond_init(&write_cond, nullptr);
}
}
......@@ -468,6 +469,7 @@ void buf_dblwr_t::close()
ut_ad(!batch_running);
pthread_cond_destroy(&cond);
pthread_cond_destroy(&write_cond);
for (int i= 0; i < 2; i++)
{
aligned_free(slots[i].write_buf);
......
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