Home
last modified time | relevance | path

Searched refs:mutation (Results 1 – 25 of 28) sorted by relevance

12

/art/tools/dexfuzz/src/dexfuzz/program/mutators/
DTryBlockShifter.java165 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
166 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
167 mutation.tryIdx = tryIdx; in generateMutation()
168 mutation.shiftingTryBlock = shiftingTryBlock; in generateMutation()
169 mutation.shiftingStart = shiftingStart; in generateMutation()
170 mutation.shiftingHandlerCatchall = shiftingHandlerCatchall; in generateMutation()
171 mutation.shiftingHandlerIdx = shiftingHandlerIdx; in generateMutation()
172 mutation.newShiftedInsnIdx = newInsnIdx; in generateMutation()
173 return mutation; in generateMutation()
179 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
[all …]
DRandomInstructionGenerator.java146 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
147 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
148 mutation.insertionIdx = insertionIdx; in generateMutation()
149 mutation.newOpcode = newOpcodeInfo.value; in generateMutation()
154 mutation.hasConst = true; in generateMutation()
155 mutation.constValue = rng.nextLong() % ((ContainsConst)fmt).getConstRange(); in generateMutation()
158 mutation.hasPoolIndex = true; in generateMutation()
163 mutation.poolIndexValue = rng.nextInt(maxPoolIndex); in generateMutation()
165 mutation.poolIndexValue = 0; in generateMutation()
172 mutation.hasVregs = true; in generateMutation()
[all …]
DNewMethodCaller.java122 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
123 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
124 mutation.insertionIdx = insertionIdx; in generateMutation()
128 mutation.invokeType = AssociatedMutation.InvokeType.STATIC; in generateMutation()
129 mutation.className = "Ljava/lang/System;"; in generateMutation()
130 mutation.methodName = "gc"; in generateMutation()
131 mutation.signature = "()V"; in generateMutation()
132 mutation.numArgs = 0; in generateMutation()
134 return mutation; in generateMutation()
140 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
[all …]
DSwitchBranchShifter.java141 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
142 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
143 mutation.switchInsnIdx = switchInsnIdx; in generateMutation()
144 mutation.switchTargetIdx = switchTargetIdx; in generateMutation()
145 mutation.newTargetIdx = newTargetIdx; in generateMutation()
146 return mutation; in generateMutation()
152 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
153 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
157 MSwitchInsn switchInsn = switchInsns.get(mutation.switchInsnIdx); in applyMutation()
161 mutatableCode.getInstructionAt(mutation.newTargetIdx); in applyMutation()
[all …]
DVRegChanger.java144 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
145 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
146 mutation.vregInsnIdx = vregInsnIdx; in generateMutation()
147 mutation.mutatingVreg = mutatingVreg; in generateMutation()
148 mutation.newVregValue = newVregValue; in generateMutation()
149 return mutation; in generateMutation()
155 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
156 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
160 MInsn vregInsn = vregInsns.get(mutation.vregInsnIdx); in applyMutation()
168 switch (mutation.mutatingVreg) { in applyMutation()
[all …]
DInstructionSwapper.java135 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
136 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
137 mutation.swapInsnIdx = swapInsnIdx; in generateMutation()
138 mutation.swapWithInsnIdx = swapWithInsnIdx; in generateMutation()
139 return mutation; in generateMutation()
145 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
146 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
148 MInsn toBeSwapped = mutatableCode.getInstructionAt(mutation.swapInsnIdx); in applyMutation()
149 MInsn swappedWith = mutatableCode.getInstructionAt(mutation.swapWithInsnIdx); in applyMutation()
155 mutatableCode.swapInstructionsByIndex(mutation.swapInsnIdx, mutation.swapWithInsnIdx); in applyMutation()
DNewInstanceChanger.java130 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
131 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
132 mutation.newInstanceToChangeIdx = newInstanceIdxInCache; in generateMutation()
133 mutation.newInstanceTypeIdx = newTypeIdx; in generateMutation()
134 return mutation; in generateMutation()
140 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
141 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
145 MInsn newInstanceInsn = newInstanceCachedInsns.get(mutation.newInstanceToChangeIdx); in applyMutation()
149 poolIndex.setPoolIndex(newInstanceInsn.insn, mutation.newInstanceTypeIdx); in applyMutation()
152 " to " + mutation.newInstanceTypeIdx); in applyMutation()
[all …]
DNonsenseStringPrinter.java88 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
89 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
90 mutation.insertionIdx = insertionIdx; in generateMutation()
91 mutation.nonsenseString = getRandomString(); in generateMutation()
92 return mutation; in generateMutation()
98 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
99 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
110 mutation.nonsenseString); in applyMutation()
112 MInsn insertionPoint = mutatableCode.getInstructionAt(mutation.insertionIdx); in applyMutation()
141 mutation.nonsenseString, insertionPoint)); in applyMutation()
[all …]
DRegisterClobber.java76 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
77 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
78 mutation.regClobberIdx = insertionIdx; in generateMutation()
79 return mutation; in generateMutation()
84 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
85 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
95 mutatableCode.insertInstructionAt(newInsn, mutation.regClobberIdx + i); in applyMutation()
99 " at index " + mutation.regClobberIdx); in applyMutation()
DInstructionDuplicator.java82 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
83 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
84 mutation.insnToDuplicateIdx = insnIdx; in generateMutation()
85 return mutation; in generateMutation()
91 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
92 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
94 MInsn oldInsn = mutatableCode.getInstructionAt(mutation.insnToDuplicateIdx); in applyMutation()
102 mutatableCode.insertInstructionAt(newInsn, mutation.insnToDuplicateIdx); in applyMutation()
DConstantValueChanger.java119 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
120 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
121 mutation.constInsnIdx = constInsnIdx; in generateMutation()
122 mutation.newConstant = newConstant; in generateMutation()
123 return mutation; in generateMutation()
129 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
130 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
134 MInsn constInsn = constInsns.get(mutation.constInsnIdx); in applyMutation()
138 Log.info("Changed constant value #" + oldConstant + " to #" + mutation.newConstant in applyMutation()
144 ((ContainsConst)constInsn.insn.info.format).setConst(constInsn.insn, mutation.newConstant); in applyMutation()
DInstructionDeleter.java80 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
81 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
82 mutation.insnToDeleteIdx = insnIdx; in generateMutation()
83 return mutation; in generateMutation()
89 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
90 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
93 mutatableCode.getInstructionAt(mutation.insnToDeleteIdx); in applyMutation()
100 mutatableCode.deleteInstruction(mutation.insnToDeleteIdx); in applyMutation()
DBranchShifter.java140 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
141 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
142 mutation.branchInsnIdx = branchInsnIdx; in generateMutation()
143 mutation.newTargetIdx = newTargetIdx; in generateMutation()
144 return mutation; in generateMutation()
150 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
151 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
155 MBranchInsn branchInsn = branchInsns.get(mutation.branchInsnIdx); in applyMutation()
158 MInsn newTargetInsn = mutatableCode.getInstructionAt(mutation.newTargetIdx); in applyMutation()
DPoolIndexChanger.java166 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
167 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
168 mutation.poolIndexInsnIdx = poolIndexInsnIdx; in generateMutation()
169 mutation.newPoolIndex = newPoolIndex; in generateMutation()
170 return mutation; in generateMutation()
176 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
177 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
181 MInsn poolIndexInsn = poolIndexInsns.get(mutation.poolIndexInsnIdx); in applyMutation()
188 Log.info("Changed pool index " + oldPoolIndex + " to " + mutation.newPoolIndex in applyMutation()
194 containsPoolIndex.setPoolIndex(poolIndexInsn.insn, mutation.newPoolIndex); in applyMutation()
DFieldFlagChanger.java121 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
122 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
123 mutation.fieldInsnIdx = fieldInsnIdx; in generateMutation()
124 mutation.setVolatile = setVolatile; in generateMutation()
125 return mutation; in generateMutation()
131 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
132 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
136 Instruction insn = fieldInsns.get(mutation.fieldInsnIdx).insn; in applyMutation()
141 if (mutation.setVolatile) { in applyMutation()
DIfBranchChanger.java110 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
111 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
112 mutation.ifBranchInsnIdx = ifBranchInsnIdx; in generateMutation()
113 return mutation; in generateMutation()
118 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
119 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
123 MInsn ifBranchInsn = ifBranchInsns.get(mutation.ifBranchInsnIdx); in applyMutation()
DCmpBiasChanger.java103 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
104 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
105 mutation.cmpBiasInsnIdx = cmpBiasInsnIdx; in generateMutation()
106 return mutation; in generateMutation()
112 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
113 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
117 MInsn cmpBiasInsn = cmpBiasInsns.get(mutation.cmpBiasInsnIdx); in applyMutation()
DCodeMutator.java97 public void forceMutate(Mutation mutation) { in forceMutate() argument
99 applyMutation(mutation); in forceMutate()
117 Mutation mutation = generateMutation(mutatableCode); in generateAndApplyMutation() local
119 mutations.add(mutation); in generateAndApplyMutation()
120 applyMutation(mutation); in generateAndApplyMutation()
DNewArrayLengthChanger.java104 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
105 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
106 mutation.newArrayToChangeIdx = newArrayIdx; in generateMutation()
107 return mutation; in generateMutation()
113 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
114 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
115 MInsn newArrayInsn = newArrayLengthInsns.get(mutation.newArrayToChangeIdx); in applyMutation()
DConversionRepeater.java101 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
102 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
103 mutation.conversionInsnIdx = conversionInsnIdx; in generateMutation()
104 return mutation; in generateMutation()
110 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
111 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
115 MInsn originalInsn = conversionInsns.get(mutation.conversionInsnIdx); in applyMutation()
DInvokeChanger.java121 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
122 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
123 mutation.invokeCallInsnIdx = invokeCallInsnIdx; in generateMutation()
124 return mutation; in generateMutation()
130 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
131 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
135 MInsn invokeInsn = invokeCallInsns.get(mutation.invokeCallInsnIdx); in applyMutation()
DValuePrinter.java99 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
100 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
101 mutation.printedOutputIdx = printedOutputIdx; in generateMutation()
102 return mutation; in generateMutation()
108 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
109 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
112 mutatableCode.getInstructionAt(mutation.printedOutputIdx); in applyMutation()
186 mutatableCode.insertInstructionAfter(invokeInsn, mutation.printedOutputIdx); in applyMutation()
187 mutatableCode.insertInstructionAfter(streamLoadInsn, mutation.printedOutputIdx); in applyMutation()
188 mutatableCode.insertInstructionAfter(valueCopyInsn, mutation.printedOutputIdx); in applyMutation()
DArithOpChanger.java119 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
120 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
121 mutation.arithmeticInsnIdx = arithmeticInsnIdx; in generateMutation()
122 mutation.newOpcode = newOpcodeInfo.value; in generateMutation()
123 return mutation; in generateMutation()
129 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
130 MutatableCode mutatableCode = mutation.mutatableCode; in applyMutation()
134 MInsn randomInsn = arithmeticInsns.get(mutation.arithmeticInsnIdx); in applyMutation()
138 OpcodeInfo newOpcodeInfo = Instruction.getOpcodeInfo(mutation.newOpcode); in applyMutation()
/art/tools/dexfuzz/src/dexfuzz/program/
DMutationSerializer.java31 public static String getMutationString(Mutation mutation) { in getMutationString() argument
33 builder.append(mutation.mutatorClass.getCanonicalName()).append(" "); in getMutationString()
34 builder.append(mutation.mutatableCodeIdx).append(" "); in getMutationString()
35 builder.append(mutation.getString()); in getMutationString()
39 public static void writeMutation(BufferedWriter writer, Mutation mutation) throws IOException { in writeMutation() argument
41 writer.write(mutation.mutatorClass.getCanonicalName() + " " in writeMutation()
42 + mutation.mutatableCodeIdx + " "); in writeMutation()
45 writer.write(mutation.getString() + "\n"); in writeMutation()
69 Mutation mutation = null; in readMutation() local
71 mutation = mutatorClass.newInstance().getNewMutation(); in readMutation()
[all …]
DProgram.java497 for (Mutation mutation : mutations) { in writeMutationsToDisk()
498 MutationSerializer.writeMutation(writer, mutation); in writeMutationsToDisk()
511 Mutation mutation = MutationSerializer.readMutation(reader); in loadMutationsFromDisk() local
512 mutations.add(mutation); in loadMutationsFromDisk()
522 for (Mutation mutation : mutations) { in applyMutationsFromList()
524 mutation.mutatableCode = mutatableCodes.get(mutation.mutatableCodeIdx); in applyMutationsFromList()
527 CodeMutator mutator = mutatorsLookupByClass.get(mutation.mutatorClass); in applyMutationsFromList()
530 mutator.forceMutate(mutation); in applyMutationsFromList()
533 if (!mutatedCodes.contains(mutation.mutatableCode)) { in applyMutationsFromList()
534 mutatedCodes.add(mutation.mutatableCode); in applyMutationsFromList()

12