Generate a new RestorableVMState object only when it's still not available in the...
authorrtrimana <rtrimana@uci.edu>
Thu, 9 Jul 2020 22:02:54 +0000 (15:02 -0700)
committerrtrimana <rtrimana@uci.edu>
Thu, 9 Jul 2020 22:02:54 +0000 (15:02 -0700)
src/main/gov/nasa/jpf/listener/DPORStateReducer.java

index 3e387a9..363bc4b 100644 (file)
@@ -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) {