bug fix: add missing check for invariant points-to set

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4170 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
msridhar1 2011-05-05 03:51:14 +00:00
parent b3b6585077
commit 047ac9f0ce
1 changed files with 10 additions and 2 deletions

View File

@ -535,11 +535,19 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa
Access r = I.getLexicalUse(ri);
if (w.variableName.equals(r.variableName)) {
if (w.variableDefiner == null ? r.variableDefiner == null : w.variableDefiner.equals(r.variableDefiner)) {
// handle the control-flow paths through the (transitive) callees where the name is not written;
// handle the control-flow paths through the (transitive)
// callees where the name is not written;
// in such cases, the original value (rk) is preserved
PointerKey rk = getBuilder().getPointerKeyForLocal(node, r.valueNumber);
PointerKey wk = getBuilder().getPointerKeyForLocal(node, w.valueNumber);
system.newConstraint(wk, assignOperator, rk);
if (contentsAreInvariant(symbolTable, du, r.valueNumber)) {
system.recordImplicitPointsToSet(rk);
for (InstanceKey ik : getInvariantContents(r.valueNumber)) {
system.newConstraint(wk, ik);
}
} else {
system.newConstraint(wk, assignOperator, rk);
}
}
}
}