[Soot-list] ForwardBranchedFlowAnalysis gets stuck in endless loop
Daniel Popescu
dpopescu at usc.edu
Sat Aug 27 23:34:37 EDT 2011
ForwardBranchedFlowAnalysis can get stuck in an endless loop because
ForwardBranchedFlowAnalysis does not correctly update the working list
changedUnits.
The endless loop happens whenever ForwardBranchedFlowAnalysis analyzes
a method that contains a loop. Every time ForwardBranchedFlowAnalysis
has finished analyzing a unit, it compares the two sets afterFlow and
previousAfterFlow. The set afterFlow will contain the data values from
all previously analyzed units. However, the set previousAfterFlow will
only contain the data values from units that
ForwardBranchedFlowAnalysis analyzed more than once.
The endless loop happens because ForwardBranchedFlowAnalysis only adds
the successors of a changed unit to the working list. Units that are
outside of the loop are not analyzed more than once.
If we would also add the changed unit itself to the working list, the
analysis would not get stuck.
Daniel
More information about the Soot-list
mailing list