mirror of
https://github.com/Z3Prover/z3
synced 2025-04-10 19:27:06 +00:00
clear memory on allocation to avoid msan warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
7e452254c3
commit
cdf3c48349
src
|
@ -44,6 +44,7 @@ void tbv_manager::reset() {
|
|||
}
|
||||
tbv* tbv_manager::allocate() {
|
||||
tbv* r = static_cast<tbv*>(m.allocate());
|
||||
m.reset(*r);
|
||||
DEBUG_CODE(
|
||||
if (s_debug_alloc) {
|
||||
TRACE("doc", tout << allocated_tbvs.size() << " " << r << "\n";);
|
||||
|
|
|
@ -48,6 +48,7 @@ fixed_bit_vector_manager::fixed_bit_vector_manager(unsigned num_bits):
|
|||
m_num_bytes = m_num_words * sizeof(unsigned);
|
||||
unsigned bit_rest = m_num_bits % 32;
|
||||
m_mask = (1U << bit_rest) - 1;
|
||||
memset(&m_0, 0, sizeof(m_0));
|
||||
if (m_mask == 0) m_mask = UINT_MAX;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue