3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

clear memory on allocation to avoid msan warnings

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-11-29 15:50:49 -08:00
parent 7e452254c3
commit cdf3c48349
2 changed files with 2 additions and 0 deletions

View file

@ -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;
}