Fix use-after-free with unsat cores/proofs (#174)
authorAndres Nötzli <andres.noetzli@gmail.com>
Fri, 30 Jun 2017 18:39:17 +0000 (11:39 -0700)
committerGitHub <noreply@github.com>
Fri, 30 Jun 2017 18:39:17 +0000 (11:39 -0700)
commitae4089fb6ff60fd5af5a212d68b91928f94bb5f2
tree7a68514dce79ca91f72f9245120517a391075d44
parent303b91f3f5b8df1a884566a7d433ced17f0cd352
Fix use-after-free with unsat cores/proofs (#174)

In TSatProof<Solver>::finalizeProof(), we got a clause from the clause
allocator, called resolveUnit() and then size() on the clause. The problem is
that resolveUnit() can reallocate memory (and there is even a comment warning
about that in finalizeProof()), which invalidates the clause. This commit gets
the clause again from the clause allocator before calling size().
src/proof/sat_proof_implementation.h