From 90aab8b9c411812edee4b3308cea2fb033a6b22e Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Mon, 11 Mar 2019 14:35:00 +0700 Subject: [PATCH] DfaMemoryStateImpl: fix SOE when canonicalizing the stack value (EA-139129) --- .../com/intellij/codeInspection/dataFlow/DfaMemoryStateImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DfaMemoryStateImpl.java b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DfaMemoryStateImpl.java index 9baa7b8e08c3..ef393415d6d4 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DfaMemoryStateImpl.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DfaMemoryStateImpl.java @@ -1491,6 +1491,7 @@ public class DfaMemoryStateImpl implements DfaMemoryState { EqClass eqClass = variable.getDependentVariables().isEmpty() ? null : getEqClass(variable); DfaVariableValue newCanonical = eqClass == null ? null : StreamEx.of(eqClass.getVariables(false)).without(variable).min(EqClass.CANONICAL_VARIABLE_COMPARATOR) + .filter(candidate -> !candidate.dependsOn(variable)) .orElse(null); myStack.replaceAll(value -> handleStackValueOnVariableFlush(value, variable, newCanonical));