Searched refs:mutation (Results 1 - 22 of 22) sorted by relevance

/art/tools/dexfuzz/src/dexfuzz/program/
H A DMutationSerializer.java31 public static String getMutationString(Mutation mutation) { argument
33 builder.append(mutation.mutatorClass.getCanonicalName()).append(" ");
34 builder.append(mutation.mutatableCodeIdx).append(" ");
35 builder.append(mutation.getString());
39 public static void writeMutation(BufferedWriter writer, Mutation mutation) throws IOException { argument
41 writer.write(mutation.mutatorClass.getCanonicalName() + " "
42 + mutation.mutatableCodeIdx + " ");
44 // Use the mutation's own function to write out the rest of the fields.
45 writer.write(mutation.getString() + "\n");
55 Log.errorAndQuit("Could not read line during mutation loadin
[all...]
H A DProgram.java74 * The RNG used during mutation.
122 * Tracks mutation stats.
373 // so to make the highest mutation value the rarest,
406 Log.info("Bailing out on mutation for this method, tried too many times...");
425 * Afterwards, call updateRawDexFile() to apply the results of mutation to the
484 for (Mutation mutation : mutations) {
485 MutationSerializer.writeMutation(writer, mutation);
498 Mutation mutation = MutationSerializer.readMutation(reader);
499 mutations.add(mutation);
509 for (Mutation mutation
[all...]
/art/tools/dexfuzz/src/dexfuzz/program/mutators/
H A DTryBlockShifter.java32 * mutation that this CodeMutator can perform, to allow separate
165 AssociatedMutation mutation = new AssociatedMutation();
166 mutation.setup(this.getClass(), mutatableCode);
167 mutation.tryIdx = tryIdx;
168 mutation.shiftingTryBlock = shiftingTryBlock;
169 mutation.shiftingStart = shiftingStart;
170 mutation.shiftingHandlerCatchall = shiftingHandlerCatchall;
171 mutation.shiftingHandlerIdx = shiftingHandlerIdx;
172 mutation.newShiftedInsnIdx = newInsnIdx;
173 return mutation;
[all...]
H A DNewMethodCaller.java34 * mutation that this CodeMutator can perform, to allow separate
122 AssociatedMutation mutation = new AssociatedMutation();
123 mutation.setup(this.getClass(), mutatableCode);
124 mutation.insertionIdx = insertionIdx;
128 mutation.invokeType = AssociatedMutation.InvokeType.STATIC;
129 mutation.className = "Ljava/lang/System;";
130 mutation.methodName = "gc";
131 mutation.signature = "()V";
132 mutation.numArgs = 0;
134 return mutation;
[all...]
H A DRandomInstructionGenerator.java40 * mutation that this CodeMutator can perform, to allow separate
150 AssociatedMutation mutation = new AssociatedMutation();
151 mutation.setup(this.getClass(), mutatableCode);
152 mutation.insertionIdx = insertionIdx;
153 mutation.newOpcode = newOpcodeInfo.value;
158 mutation.hasConst = true;
159 mutation.constValue = rng.nextLong() % ((ContainsConst)fmt).getConstRange();
162 mutation.hasPoolIndex = true;
167 mutation.poolIndexValue = rng.nextInt(maxPoolIndex);
169 mutation
[all...]
H A DInstructionSwapper.java31 * mutation that this CodeMutator can perform, to allow separate
135 AssociatedMutation mutation = new AssociatedMutation();
136 mutation.setup(this.getClass(), mutatableCode);
137 mutation.swapInsnIdx = swapInsnIdx;
138 mutation.swapWithInsnIdx = swapWithInsnIdx;
139 return mutation;
145 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
146 MutatableCode mutatableCode = mutation.mutatableCode;
148 MInsn toBeSwapped = mutatableCode.getInstructionAt(mutation.swapInsnIdx);
149 MInsn swappedWith = mutatableCode.getInstructionAt(mutation
[all...]
H A DInstructionDeleter.java32 * mutation that this CodeMutator can perform, to allow separate
80 AssociatedMutation mutation = new AssociatedMutation();
81 mutation.setup(this.getClass(), mutatableCode);
82 mutation.insnToDeleteIdx = insnIdx;
83 return mutation;
89 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
90 MutatableCode mutatableCode = mutation.mutatableCode;
93 mutatableCode.getInstructionAt(mutation.insnToDeleteIdx);
100 mutatableCode.deleteInstruction(mutation.insnToDeleteIdx);
H A DInstructionDuplicator.java32 * mutation that this CodeMutator can perform, to allow separate
82 AssociatedMutation mutation = new AssociatedMutation();
83 mutation.setup(this.getClass(), mutatableCode);
84 mutation.insnToDuplicateIdx = insnIdx;
85 return mutation;
91 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
92 MutatableCode mutatableCode = mutation.mutatableCode;
94 MInsn oldInsn = mutatableCode.getInstructionAt(mutation.insnToDuplicateIdx);
102 mutatableCode.insertInstructionAt(newInsn, mutation.insnToDuplicateIdx);
H A DConstantValueChanger.java33 * mutation that this CodeMutator can perform, to allow separate
119 AssociatedMutation mutation = new AssociatedMutation();
120 mutation.setup(this.getClass(), mutatableCode);
121 mutation.constInsnIdx = constInsnIdx;
122 mutation.newConstant = newConstant;
123 return mutation;
129 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
130 MutatableCode mutatableCode = mutation.mutatableCode;
134 MInsn constInsn = constInsns.get(mutation.constInsnIdx);
138 Log.info("Changed constant value #" + oldConstant + " to #" + mutation
[all...]
H A DVRegChanger.java33 * mutation that this CodeMutator can perform, to allow separate
144 AssociatedMutation mutation = new AssociatedMutation();
145 mutation.setup(this.getClass(), mutatableCode);
146 mutation.vregInsnIdx = vregInsnIdx;
147 mutation.mutatingVreg = mutatingVreg;
148 mutation.newVregValue = newVregValue;
149 return mutation;
155 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
156 MutatableCode mutatableCode = mutation.mutatableCode;
160 MInsn vregInsn = vregInsns.get(mutation
[all...]
H A DNonsenseStringPrinter.java33 * mutation that this CodeMutator can perform, to allow separate
88 AssociatedMutation mutation = new AssociatedMutation();
89 mutation.setup(this.getClass(), mutatableCode);
90 mutation.insertionIdx = insertionIdx;
91 mutation.nonsenseString = getRandomString();
92 return mutation;
98 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
99 MutatableCode mutatableCode = mutation.mutatableCode;
110 mutation.nonsenseString);
112 MInsn insertionPoint = mutatableCode.getInstructionAt(mutation
[all...]
H A DSwitchBranchShifter.java33 * mutation that this CodeMutator can perform, to allow separate
141 AssociatedMutation mutation = new AssociatedMutation();
142 mutation.setup(this.getClass(), mutatableCode);
143 mutation.switchInsnIdx = switchInsnIdx;
144 mutation.switchTargetIdx = switchTargetIdx;
145 mutation.newTargetIdx = newTargetIdx;
146 return mutation;
152 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
153 MutatableCode mutatableCode = mutation.mutatableCode;
157 MSwitchInsn switchInsn = switchInsns.get(mutation
[all...]
H A DBranchShifter.java33 * mutation that this CodeMutator can perform, to allow separate
140 AssociatedMutation mutation = new AssociatedMutation();
141 mutation.setup(this.getClass(), mutatableCode);
142 mutation.branchInsnIdx = branchInsnIdx;
143 mutation.newTargetIdx = newTargetIdx;
144 return mutation;
150 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
151 MutatableCode mutatableCode = mutation.mutatableCode;
155 MBranchInsn branchInsn = branchInsns.get(mutation.branchInsnIdx);
158 MInsn newTargetInsn = mutatableCode.getInstructionAt(mutation
[all...]
H A DCodeMutator.java75 Log.info("Set mutation likelihood to " + likelihood
84 * is expected to implement to perform its mutation.
86 * @return If mutation took place.
93 Log.info("Skipping mutation.");
97 public void forceMutate(Mutation mutation) { argument
98 Log.info("Forcing mutation.");
99 applyMutation(mutation);
108 * provided likelihood of mutation.
117 Mutation mutation = generateMutation(mutatableCode);
118 // Always save the mutation
[all...]
H A DCmpBiasChanger.java34 * mutation that this CodeMutator can perform, to allow separate
103 AssociatedMutation mutation = new AssociatedMutation();
104 mutation.setup(this.getClass(), mutatableCode);
105 mutation.cmpBiasInsnIdx = cmpBiasInsnIdx;
106 return mutation;
112 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
113 MutatableCode mutatableCode = mutation.mutatableCode;
117 MInsn cmpBiasInsn = cmpBiasInsns.get(mutation.cmpBiasInsnIdx);
H A DPoolIndexChanger.java34 * mutation that this CodeMutator can perform, to allow separate
166 AssociatedMutation mutation = new AssociatedMutation();
167 mutation.setup(this.getClass(), mutatableCode);
168 mutation.poolIndexInsnIdx = poolIndexInsnIdx;
169 mutation.newPoolIndex = newPoolIndex;
170 return mutation;
176 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
177 MutatableCode mutatableCode = mutation.mutatableCode;
181 MInsn poolIndexInsn = poolIndexInsns.get(mutation.poolIndexInsnIdx);
188 Log.info("Changed pool index " + oldPoolIndex + " to " + mutation
[all...]
H A DFieldFlagChanger.java36 * mutation that this CodeMutator can perform, to allow separate
121 AssociatedMutation mutation = new AssociatedMutation();
122 mutation.setup(this.getClass(), mutatableCode);
123 mutation.fieldInsnIdx = fieldInsnIdx;
124 mutation.setVolatile = setVolatile;
125 return mutation;
131 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
132 MutatableCode mutatableCode = mutation.mutatableCode;
136 Instruction insn = fieldInsns.get(mutation.fieldInsnIdx).insn;
141 if (mutation
[all...]
H A DConversionRepeater.java34 * mutation that this CodeMutator can perform, to allow separate
101 AssociatedMutation mutation = new AssociatedMutation();
102 mutation.setup(this.getClass(), mutatableCode);
103 mutation.conversionInsnIdx = conversionInsnIdx;
104 return mutation;
110 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
111 MutatableCode mutatableCode = mutation.mutatableCode;
115 MInsn originalInsn = conversionInsns.get(mutation.conversionInsnIdx);
H A DValuePrinter.java33 * mutation that this CodeMutator can perform, to allow separate
99 AssociatedMutation mutation = new AssociatedMutation();
100 mutation.setup(this.getClass(), mutatableCode);
101 mutation.printedOutputIdx = printedOutputIdx;
102 return mutation;
108 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
109 MutatableCode mutatableCode = mutation.mutatableCode;
112 mutatableCode.getInstructionAt(mutation.printedOutputIdx);
186 mutatableCode.insertInstructionAfter(invokeInsn, mutation.printedOutputIdx);
187 mutatableCode.insertInstructionAfter(streamLoadInsn, mutation
[all...]
H A DArithOpChanger.java35 * mutation that this CodeMutator can perform, to allow separate
119 AssociatedMutation mutation = new AssociatedMutation();
120 mutation.setup(this.getClass(), mutatableCode);
121 mutation.arithmeticInsnIdx = arithmeticInsnIdx;
122 mutation.newOpcode = newOpcodeInfo.value;
123 return mutation;
129 AssociatedMutation mutation = (AssociatedMutation) uncastMutation;
130 MutatableCode mutatableCode = mutation.mutatableCode;
134 MInsn randomInsn = arithmeticInsns.get(mutation.arithmeticInsnIdx);
138 OpcodeInfo newOpcodeInfo = Instruction.getOpcodeInfo(mutation
[all...]
/art/tools/dexfuzz/src/dexfuzz/listeners/
H A DConsoleLoggerListener.java56 for (Mutation mutation : mutations) {
57 logToConsole("Applied mutation: " + mutation.toString());
H A DLogFileListener.java211 write(" Failed mutation: " + failedMutation);
273 for (Mutation mutation : mutations) {
274 write(MutationSerializer.getMutationString(mutation));

Completed in 155 milliseconds