Browse Source

Result: Clear previously stored result vector

Avoids DD leak when a previously stored result vector is overwritten (nested filters), e.g. from

prism prism-examples/dice/dice.pm -pf 'filter(sum, P=?[F d=1]) + 0' -mtbdd -exportvector stdout
accumulation-v4.7
Joachim Klein 7 years ago
parent
commit
8172c780ef
  1. 4
      prism/src/prism/Result.java

4
prism/src/prism/Result.java

@ -106,6 +106,10 @@ public class Result
*/ */
public void setVector(StateVector vect) public void setVector(StateVector vect)
{ {
// If we have a vector that was previously stored, clear it.
if (this.vect != null) {
this.vect.clear();
}
this.vect = vect; this.vect = vect;
} }

Loading…
Cancel
Save