mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
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 a55b951e60
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.
This commit is contained in:
parent
15ca6c5a2f
commit
07460c31e3
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue