From: rtrimana Date: Thu, 9 Jul 2020 22:02:54 +0000 (-0700) Subject: Generate a new RestorableVMState object only when it's still not available in the... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=jpf-core.git;a=commitdiff_plain;h=ffc8f17f159d60af9f0e2dea9bad0dac9875076d;ds=sidebyside Generate a new RestorableVMState object only when it's still not available in the HashMap. --- diff --git a/src/main/gov/nasa/jpf/listener/DPORStateReducer.java b/src/main/gov/nasa/jpf/listener/DPORStateReducer.java index 3e387a9..363bc4b 100644 --- a/src/main/gov/nasa/jpf/listener/DPORStateReducer.java +++ b/src/main/gov/nasa/jpf/listener/DPORStateReducer.java @@ -652,8 +652,10 @@ public class DPORStateReducer extends ListenerAdapter { } currentExecution.mapCGToChoice(icsCG, choiceCounter); // Store restorable state object for this state (always store the latest) - RestorableVMState restorableState = vm.getRestorableState(); - restorableStateMap.put(stateId, restorableState); + if (!restorableStateMap.containsKey(stateId)) { + RestorableVMState restorableState = vm.getRestorableState(); + restorableStateMap.put(stateId, restorableState); + } } private TransitionEvent setupTransition(IntChoiceFromSet icsCG, int stateId, int choiceIndex) {