mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
fix assorted undefined behaviors caught by clang
Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
This commit is contained in:
parent
25a29bf5b0
commit
c577ab361b
9 changed files with 81 additions and 21 deletions
|
@ -308,7 +308,8 @@ namespace smt {
|
|||
simple_justification(r, num_lits, lits),
|
||||
m_num_eqs(num_eqs) {
|
||||
m_eqs = new (r) enode_pair[num_eqs];
|
||||
memcpy(m_eqs, eqs, sizeof(enode_pair) * num_eqs);
|
||||
if (num_eqs != 0)
|
||||
memcpy(m_eqs, eqs, sizeof(enode_pair) * num_eqs);
|
||||
DEBUG_CODE({
|
||||
for (unsigned i = 0; i < num_eqs; i++) {
|
||||
SASSERT(eqs[i].first->get_root() == eqs[i].second->get_root());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue