Merge branch 'pull-request__misc-bugfixes' of https://github.com/joana-team/WALA

This commit is contained in:
Julian Dolby 2017-03-09 08:59:40 -05:00
commit 016c3940e8
8 changed files with 20 additions and 10 deletions

View File

@ -60,7 +60,7 @@
<target name="fetchCommonsIo" depends="CommonsIoPresent" unless="commons.io.present">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<get src="http://apache.openmirror.de//commons/io/binaries/commons-io-2.4-bin.zip" dest="${temp.folder}/commons-io-2.4.zip"/>
<get src="http://archive.apache.org/dist/commons/io/binaries/commons-io-2.4-bin.zip" dest="${temp.folder}/commons-io-2.4.zip"/>
<unzip src="${temp.folder}/commons-io-2.4.zip" dest="${temp.folder}"/>
<copy file="${temp.folder}/commons-io-2.4/commons-io-2.4.jar" tofile="${plugin.destination}/lib/commons-io-2.4.jar" />
<delete dir="${temp.folder}"/>

View File

@ -703,7 +703,7 @@ public abstract class AbstractIntStackMachine implements FixedPointConstants {
result.append(array2StringBuffer(stack, stackHeight));
}
result.append("L");
result.append(array2StringBuffer(locals, locals.length));
result.append(array2StringBuffer(locals, locals==null?0:locals.length));
result.append(">");
return result.toString();
}

View File

@ -291,6 +291,10 @@ public class ShrikeCFG extends AbstractCFG<IInstruction, ShrikeCFG.BasicBlock> i
e.printStackTrace();
Assertions.UNREACHABLE();
}
IMethod mTarget = cha.resolveMethod(target);
if (mTarget == null) {
goToAllHandlers = true;
}
}
}
}

View File

@ -41,7 +41,7 @@ public class JarStreamModule extends JarInputStream implements Module {
*/
private HashMap<String, byte[]> cache = null;
public JarStreamModule(JarInputStream stream) throws IOException {
public JarStreamModule(InputStream stream) throws IOException {
super(stream);
}

View File

@ -258,7 +258,7 @@ public abstract class AbstractRootMethod extends SyntheticMethod {
return result;
}
protected int getValueNumberForIntConstant(int c) {
public int getValueNumberForIntConstant(int c) {
ConstantValue v = new ConstantValue(c);
Integer result = constant2ValueNumber.get(v);
if (result == null) {
@ -268,7 +268,7 @@ public abstract class AbstractRootMethod extends SyntheticMethod {
return result;
}
protected int getValueNumberForByteConstant(byte c) {
public int getValueNumberForByteConstant(byte c) {
// treat it like an int constant for now.
ConstantValue v = new ConstantValue(c);
Integer result = constant2ValueNumber.get(v);
@ -279,7 +279,7 @@ public abstract class AbstractRootMethod extends SyntheticMethod {
return result;
}
protected int getValueNumberForCharConstant(char c) {
public int getValueNumberForCharConstant(char c) {
// treat it like an int constant for now.
ConstantValue v = new ConstantValue(c);
Integer result = constant2ValueNumber.get(v);

View File

@ -795,10 +795,10 @@ public class SDG<T extends InstanceKey> extends AbstractNumberedGraph<Statement>
}
@Override
public PDG getPDG(CGNode node) {
public PDG<T> getPDG(CGNode node) {
PDG result = pdgMap.get(node);
if (result == null) {
result = new PDG(node, pa, mod, ref, dOptions, cOptions, heapExclude, cg, modRef);
result = new PDG<T>(node, pa, mod, ref, dOptions, cOptions, heapExclude, cg, modRef);
pdgMap.put(node, result);
// Let's not eagerly add nodes, shall we?
// for (Iterator<? extends Statement> it = result.iterator(); it.hasNext();) {
@ -826,7 +826,7 @@ public class SDG<T extends InstanceKey> extends AbstractNumberedGraph<Statement>
return cg.getClassHierarchy();
}
public PointerAnalysis<? extends InstanceKey> getPointerAnalysis() {
public PointerAnalysis<T> getPointerAnalysis() {
return pa;
}

View File

@ -297,6 +297,10 @@ public class DexCFG extends AbstractCFG<Instruction, DexCFG.BasicBlock> implemen
e.printStackTrace();
Assertions.UNREACHABLE();
}
IMethod mTarget = cha.resolveMethod(target);
if (mTarget == null) {
goToAllHandlers = true;
}
}
}
}

View File

@ -262,7 +262,9 @@ public class DotUtil {
*/
private static <T> String decorateNode(T n, NodeDecorator<T> d) throws WalaException {
StringBuffer result = new StringBuffer();
result.append(" [ ]\n");
result.append(" [ label=\"");
result.append(getLabel(n, d));
result.append("\"]\n");
return result.toString();
}