if (!created.containsKey(rootKey)) {
created.put(rootKey, singleRoot);
- createHelper(singleRoot, edge.getDst().iteratorToReferencees(), created, table, t);
+ createHelper(singleRoot, edge.getDst().iteratorToReferencees(), created, table, t, false);
}
}
}
Iterator<RefEdge> edges,
Hashtable<Integer, ConcreteRuntimeObjNode> created,
EffectsTable table,
- Taint taint) {
+ Taint taint,
+ boolean ancestorCanBeIncorrectIn) {
assert table != null;
+ boolean ancestorCanBeIncorrect = ancestorCanBeIncorrectIn;
AllocSite parentKey = curr.allocSite;
EffectsGroup currEffects = table.getEffects(parentKey, taint);
curr.addObjChild(field, child, effectsForGivenField);
if (effectsForGivenField.hasConflict()) {
- child.hasPotentialToBeIncorrectDueToConflict = true;
propagateObjConflict(curr, child);
+
+ //Ancestor had a read conflict down this field
+ if(ancestorCanBeIncorrect) {
+ child.hasPotentialToBeIncorrectDueToConflict = true;
+ }
+ //read conflict implies that there's got to be a write somewhere else.
+ else if(effectsForGivenField.hasReadConflict) {
+ child.hasPotentialToBeIncorrectDueToConflict = true;
+ ancestorCanBeIncorrect = true;
+ }
}
if(effectsForGivenField.hasReadEffect) {
//If isNewChild, flag propagation will be handled at recursive call
if(isNewChild) {
- createHelper(child, childHRN.iteratorToReferencees(), created, table, taint);
+ createHelper(child, childHRN.iteratorToReferencees(), created, table, taint, ancestorCanBeIncorrect);
} else {
//This makes sure that all conflicts below the child is propagated up the referencers.
if(child.decendantsPrimConflict || child.hasPrimitiveConflicts()) {