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 3e387a95e3234d82c4b482aab56b02e9b3fb2b8f..363bc4b1247dad9bb06c25e00cee67bdb10b3240 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) {