projects
/
jpf-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9ccd91c
)
Fixing an out of bound bug.
author
rtrimana
<rtrimana@uci.edu>
Fri, 14 Feb 2020 18:32:06 +0000
(10:32 -0800)
committer
rtrimana
<rtrimana@uci.edu>
Fri, 14 Feb 2020 18:32:06 +0000
(10:32 -0800)
src/main/gov/nasa/jpf/listener/StateReducer.java
patch
|
blob
|
history
diff --git
a/src/main/gov/nasa/jpf/listener/StateReducer.java
b/src/main/gov/nasa/jpf/listener/StateReducer.java
index
4740583
..
93043fa
100644
(file)
--- a/
src/main/gov/nasa/jpf/listener/StateReducer.java
+++ b/
src/main/gov/nasa/jpf/listener/StateReducer.java
@@
-300,8
+300,8
@@
public class StateReducer extends ListenerAdapter {
if (stateReductionMode) {
// Update vodGraph
int currChoice = choiceCounter - 1;
if (stateReductionMode) {
// Update vodGraph
int currChoice = choiceCounter - 1;
- if (currChoice < 0 || choices[currChoice] == -1 || prevChoiceValue == choices[currChoice]) {
- //
Current choice has to be at least 0 (initial case can be -1
)
+ if (currChoice < 0 || c
urrChoice > choices.length - 1 || c
hoices[currChoice] == -1 || prevChoiceValue == choices[currChoice]) {
+ //
Handle all corner cases (e.g., out of bound values
)
return;
}
// When current choice is 0, previous choice could be -1
return;
}
// When current choice is 0, previous choice could be -1