Merge branch 'master' of https://github.com/wala/WALA
This commit is contained in:
commit
d4607979ed
|
@ -1,13 +1,11 @@
|
|||
language: android
|
||||
jdk: oraclejdk8
|
||||
before_install:
|
||||
- "export DISPLAY=:99.0"
|
||||
- "sh -e /etc/init.d/xvfb start"
|
||||
- "git clone --depth=1 https://github.com/secure-software-engineering/DroidBench.git /tmp/DroidBench"
|
||||
install:
|
||||
- mvn clean verify -DskipTests=true -B -q
|
||||
script:
|
||||
- mvn clean verify -B -q
|
||||
- xvfb-run mvn clean verify -B -q
|
||||
- jdk_switcher use oraclejdk7
|
||||
- ./build-maven-jars.py "install -Dgpg.skip"
|
||||
sudo: false
|
||||
|
|
|
@ -165,6 +165,7 @@ public class StaticInitializer {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Initializer Normal Flow";
|
||||
}
|
||||
|
@ -189,6 +190,7 @@ public class StaticInitializer {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Initializer Normal Flow";
|
||||
}
|
||||
|
@ -212,6 +214,7 @@ public class StaticInitializer {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Initializer Normal Flow";
|
||||
}
|
||||
|
@ -237,6 +240,7 @@ public class StaticInitializer {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Initializer Normal Flow";
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import com.ibm.wala.ipa.callgraph.propagation.InstanceKey;
|
|||
import com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis;
|
||||
import com.ibm.wala.ipa.modref.ModRef;
|
||||
import com.ibm.wala.util.CancelException;
|
||||
import com.ibm.wala.util.MonitorUtil.IProgressMonitor;
|
||||
import com.ibm.wala.util.collections.HashSetFactory;
|
||||
|
||||
/**
|
||||
|
@ -195,6 +196,21 @@ public class Slicer {
|
|||
* @throws CancelException
|
||||
*/
|
||||
public Collection<Statement> slice(SDG sdg, Collection<Statement> roots, boolean backward) throws CancelException {
|
||||
return slice(sdg, roots, backward, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Main driver logic.
|
||||
*
|
||||
* @param sdg governing system dependence graph
|
||||
* @param roots set of roots to slice from
|
||||
* @param backward do a backwards slice?
|
||||
* @param monitor to cancel analysis if needed
|
||||
* @return the {@link Statement}s found by the slicer
|
||||
* @throws CancelException
|
||||
*/
|
||||
public Collection<Statement> slice(SDG sdg, Collection<Statement> roots, boolean backward, IProgressMonitor monitor)
|
||||
throws CancelException {
|
||||
if (sdg == null) {
|
||||
throw new IllegalArgumentException("sdg cannot be null");
|
||||
}
|
||||
|
@ -202,7 +218,7 @@ public class Slicer {
|
|||
SliceProblem p = makeSliceProblem(roots, sdg, backward);
|
||||
|
||||
PartiallyBalancedTabulationSolver<Statement, PDG<?>, Object> solver = PartiallyBalancedTabulationSolver
|
||||
.createPartiallyBalancedTabulationSolver(p, null);
|
||||
.createPartiallyBalancedTabulationSolver(p, monitor);
|
||||
TabulationResult<Statement, PDG<?>, Object> tr = solver.solve();
|
||||
|
||||
Collection<Statement> slice = tr.getSupergraphNodesReached();
|
||||
|
|
|
@ -98,12 +98,17 @@ public class VolatileMethodSummary {
|
|||
*/
|
||||
private static final class Reserved extends SSAInstruction {
|
||||
public Reserved () { super(SSAInstruction.NO_INDEX); }
|
||||
@Override
|
||||
public SSAInstruction copyForSSA (SSAInstructionFactory insts, int[] defs, int[] uses) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
@Override
|
||||
public int hashCode () { return 12384; }
|
||||
@Override
|
||||
public boolean isFallThrough() { return true; }
|
||||
@Override
|
||||
public String toString (SymbolTable symbolTable) { return "Reserved Slot"; }
|
||||
@Override
|
||||
public void visit (IVisitor v) { throw new IllegalStateException(); }
|
||||
}
|
||||
private static final Reserved RESERVED = new Reserved();
|
||||
|
@ -609,6 +614,7 @@ public class VolatileMethodSummary {
|
|||
/**
|
||||
* Generates a String-Representation of an instance of the class.
|
||||
*/
|
||||
@Override
|
||||
public java.lang.String toString() {
|
||||
return "VolatileMethodSummary of " + this.summary.toString();
|
||||
}
|
||||
|
|
|
@ -1671,6 +1671,7 @@ public class ParameterAccessor {
|
|||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "<ParamAccessor forMethod=" + this.forMethod() + " />";
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ public class DalvikTypeInference extends TypeInference {
|
|||
super(ir, doPrimitives);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initialize() {
|
||||
init(ir, this.new DalvikTypeVarFactory(), this.new TypeOperatorFactory());
|
||||
}
|
||||
|
|
|
@ -287,6 +287,7 @@ public class DexIClass extends BytecodeClass<IClassLoader> {
|
|||
return getAnnotations((Set<AnnotationVisibility>)null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Annotation> getAnnotations(boolean runtimeInvisible) {
|
||||
return getAnnotations(getTypes(runtimeInvisible));
|
||||
}
|
||||
|
|
|
@ -106,10 +106,12 @@ public class InstructionArray implements Collection<Instruction> {
|
|||
return instructions.containsAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return instructions.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return instructions.hashCode();
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ public class IntentModel extends AndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected boolean selectEntryPoint(AndroidEntryPoint ep) {
|
||||
return ep.isMemberOf(this.target) || ep.belongsTo(AndroidComponent.APPLICATION) ||
|
||||
ep.belongsTo(AndroidComponent.PROVIDER);
|
||||
|
|
|
@ -64,6 +64,7 @@ public class MicroModel extends AndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected boolean selectEntryPoint(AndroidEntryPoint ep) {
|
||||
return ep.isMemberOf(this.target);
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ public class MiniModel extends AndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected boolean selectEntryPoint(AndroidEntryPoint ep) {
|
||||
if (ep.belongsTo(forCompo)) {
|
||||
|
||||
|
@ -85,6 +86,7 @@ public class MiniModel extends AndroidModel {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public Descriptor getDescriptor() throws CancelException {
|
||||
final Descriptor descr = super.getDescriptor();
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ public class SpecializedInstantiator extends FlatInstantiator {
|
|||
*
|
||||
* @todo Do we want to mix in REUSE-Parameters?
|
||||
*/
|
||||
@Override
|
||||
public SSAValue createInstance(final TypeReference T, final boolean asManaged, VariableKey key, Set<? extends SSAValue> seen) {
|
||||
return createInstance(T, asManaged, key, seen, 0);
|
||||
}
|
||||
|
@ -260,6 +261,7 @@ public class SpecializedInstantiator extends FlatInstantiator {
|
|||
/**
|
||||
* Satisfy the interface.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public int createInstance(TypeReference type, Object... instantiatorArgs) {
|
||||
// public SSAValue createInstance(final TypeReference T, final boolean asManaged, VariableKey key, Set<SSAValue> seen) {
|
||||
|
|
|
@ -102,6 +102,7 @@ public class LoopAndroidModel extends SingleStartAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterSTART_OF_LOOP (int PC) {
|
||||
logger.info("PC {} is the jump target of START_OF_LOOP", PC);
|
||||
|
||||
|
@ -136,6 +137,7 @@ public class LoopAndroidModel extends SingleStartAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterAFTER_LOOP (int PC) {
|
||||
assert(outerLoopPC > 0) : "Somehow you managed to get the loop-target negative. This is wierd!";
|
||||
|
||||
|
@ -192,6 +194,7 @@ public class LoopAndroidModel extends SingleStartAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int leaveAT_LAST (int PC) {
|
||||
logger.info("Leaving Model with PC = {}", PC);
|
||||
return PC;
|
||||
|
|
|
@ -98,6 +98,7 @@ public class LoopKillAndroidModel extends LoopAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterAT_FIRST(int PC) {
|
||||
logger.info("PC {} is the jump target of START_OF_LOOP", PC);
|
||||
|
||||
|
@ -132,6 +133,7 @@ public class LoopKillAndroidModel extends LoopAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int leaveAT_LAST (int PC) {
|
||||
assert(outerLoopPC > 0) : "Somehow you managed to get the loop-target negative. This is wierd!";
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ public final class SequentialAndroidModel extends AbstractAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterAT_FIRST(int PC) {
|
||||
return PC;
|
||||
}
|
||||
|
@ -87,6 +88,7 @@ public final class SequentialAndroidModel extends AbstractAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterBEFORE_LOOP (int PC) {
|
||||
return PC;
|
||||
}
|
||||
|
@ -96,6 +98,7 @@ public final class SequentialAndroidModel extends AbstractAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterSTART_OF_LOOP (int PC) {
|
||||
return PC;
|
||||
}
|
||||
|
@ -105,6 +108,7 @@ public final class SequentialAndroidModel extends AbstractAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterMIDDLE_OF_LOOP (int PC) {
|
||||
return PC;
|
||||
}
|
||||
|
@ -114,6 +118,7 @@ public final class SequentialAndroidModel extends AbstractAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterMULTIPLE_TIMES_IN_LOOP (int PC) {
|
||||
return PC;
|
||||
}
|
||||
|
@ -123,6 +128,7 @@ public final class SequentialAndroidModel extends AbstractAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterEND_OF_LOOP (int PC) {
|
||||
return PC;
|
||||
}
|
||||
|
@ -132,6 +138,7 @@ public final class SequentialAndroidModel extends AbstractAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterAFTER_LOOP (int PC) {
|
||||
return PC;
|
||||
}
|
||||
|
@ -141,6 +148,7 @@ public final class SequentialAndroidModel extends AbstractAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterAT_LAST (int PC) {
|
||||
return PC;
|
||||
}
|
||||
|
@ -150,6 +158,7 @@ public final class SequentialAndroidModel extends AbstractAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int leaveAT_LAST (int PC) {
|
||||
return PC;
|
||||
}
|
||||
|
|
|
@ -102,6 +102,7 @@ public class SingleStartAndroidModel extends AbstractAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterMULTIPLE_TIMES_IN_LOOP (int PC) {
|
||||
logger.info("PC {} is the jump target of START_OF_LOOP", PC);
|
||||
this.outerLoopPC = PC;
|
||||
|
@ -135,6 +136,7 @@ public class SingleStartAndroidModel extends AbstractAndroidModel {
|
|||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected int enterEND_OF_LOOP (int PC) {
|
||||
assert(outerLoopPC > 0) : "Somehow you managed to get the loop-target negative. This is wierd!";
|
||||
|
||||
|
|
|
@ -151,6 +151,7 @@ public class Intent implements ContextItem, Comparable<Intent> {
|
|||
this.immutable = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent clone() {
|
||||
final Intent clone = new Intent();
|
||||
clone.action = this.action; // OK here?
|
||||
|
|
|
@ -1454,6 +1454,7 @@ public class DexSSABuilder extends AbstractIntRegisterMachine {
|
|||
* @param index - index into IR instruction array
|
||||
* @param vn - value number
|
||||
*/
|
||||
@Override
|
||||
public String[] getLocalNames(int index, int vn) {
|
||||
try {
|
||||
if (!dexCFG.getMethod().hasLocalVariableTable()) {
|
||||
|
|
|
@ -31,6 +31,7 @@ public class Activator extends Plugin {
|
|||
*
|
||||
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
@Override
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
|
@ -41,6 +42,7 @@ public class Activator extends Plugin {
|
|||
*
|
||||
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
@Override
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
|
|
|
@ -87,6 +87,7 @@ public class DomainElement {
|
|||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return codeElement.toString() + ", " + taintSource;
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ public class InstanceKeyElement extends CodeElement {
|
|||
return ik.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "InstanceKeyElement("+ik+")";
|
||||
|
|
|
@ -128,6 +128,7 @@ public class PrefixVariable extends AbstractVariable<PrefixVariable>{
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return knownPrefixes.toString();
|
||||
}
|
||||
|
|
|
@ -204,6 +204,7 @@ public class StringBuilderUseAnalysis {
|
|||
return retVal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ("StringBuilderToString(instanceID = " + instanceID + "; concatenatedInstanceKeys = " + concatenatedInstanceKeys + ")");
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ public class ConstantString extends InstanceKeySite {
|
|||
return retVal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ("ConstantString(instanceID = " + instanceID + "; value = " + constantValue + ")");
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ public class UriAppendString extends InstanceKeySite {
|
|||
return retVal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ("UriAppendString(instanceID = " + instanceID + "; uriInstanceID = " + uriInstanceID + "; stringInstanceID = " + stringInstanceID + ")");
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ public class UriParseString extends InstanceKeySite {
|
|||
return retVal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ("UriParseString(instanceID = " + instanceID + "; stringInstanceID = " + stringInstanceID + ")");
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ public class EntryArgSinkSpec extends SinkSpec {
|
|||
argNums = args;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E extends ISSABasicBlock> Collection<FlowType<E>> getFlowType(
|
||||
BasicBlockInContext<E> block) {
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ public class DexDotUtil extends DotUtil {
|
|||
* @return StringBuffer holding dot output representing G
|
||||
* @throws WalaException
|
||||
*/
|
||||
private static <T> StringBuffer dotOutput(Graph<T> g, NodeDecorator<T> labels, String title) throws WalaException {
|
||||
public static <T> StringBuffer dotOutput(Graph<T> g, NodeDecorator<T> labels, String title) throws WalaException {
|
||||
StringBuffer result = new StringBuffer("digraph \"DirectedGraph\" {\n");
|
||||
|
||||
if (title != null) {
|
||||
|
|
|
@ -182,7 +182,7 @@ public class DotUtil {
|
|||
* @return StringBuffer holding dot output representing G
|
||||
* @throws WalaException
|
||||
*/
|
||||
private static <T> StringBuffer dotOutput(Graph<T> g, NodeDecorator<T> labels, String title) throws WalaException {
|
||||
public static <T> StringBuffer dotOutput(Graph<T> g, NodeDecorator<T> labels, String title) throws WalaException {
|
||||
StringBuffer result = new StringBuffer("digraph \"DirectedGraph\" {\n");
|
||||
|
||||
if (title != null) {
|
||||
|
|
Loading…
Reference in New Issue