mirror of
https://github.com/MariaDB/server.git
synced 2025-12-07 17:42:39 +03:00
Fixed main.implicit_commit ASAN failure
InnoDB mutex monitor is accessing mutexes of poisoned (cached) trx objects. Unpoison ReadView::m_mutex similarly to trx_t::mutex. This is regression after MDEV-22593.
This commit is contained in:
@@ -276,5 +276,22 @@ public:
|
||||
to->append(*this);
|
||||
mutex_exit(&m_mutex);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Unpoison the memory for innodb_monitor_set_option;
|
||||
It is operating also on the freed transaction objects.
|
||||
Declare the contents as initialized for Valgrind;
|
||||
We checked that it was initialized in trx_pools->mem_free(trx).
|
||||
*/
|
||||
void mem_valid() const
|
||||
{
|
||||
#ifdef __SANITIZE_ADDRESS__
|
||||
MEM_UNDEFINED(&m_mutex, sizeof m_mutex);
|
||||
#endif
|
||||
#ifdef HAVE_valgrind
|
||||
UNIV_MEM_VALID(&m_mutex, sizeof m_mutex);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -457,6 +457,7 @@ void trx_free(trx_t*& trx)
|
||||
/* Declare the contents as initialized for Valgrind;
|
||||
we checked that it was initialized in trx_pools->mem_free(trx). */
|
||||
UNIV_MEM_VALID(&trx->mutex, sizeof trx->mutex);
|
||||
trx->read_view.mem_valid();
|
||||
|
||||
trx = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user