Home
last modified time | relevance | path

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

/art/tools/dexfuzz/src/dexfuzz/program/mutators/
DTryBlockShifter.java162 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
163 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
164 mutation.tryIdx = tryIdx; in generateMutation()
165 mutation.shiftingTryBlock = shiftingTryBlock; in generateMutation()
166 mutation.shiftingStart = shiftingStart; in generateMutation()
167 mutation.shiftingHandlerCatchall = shiftingHandlerCatchall; in generateMutation()
168 mutation.shiftingHandlerIdx = shiftingHandlerIdx; in generateMutation()
169 mutation.newShiftedInsnIdx = newInsnIdx; in generateMutation()
170 return mutation; in generateMutation()
176 AssociatedMutation mutation = (AssociatedMutation) uncastMutation; in applyMutation() local
[all …]
DRandomInstructionGenerator.java150 AssociatedMutation mutation = new AssociatedMutation(); in generateMutation() local
151 mutation.setup(this.getClass(), mutatableCode); in generateMutation()
152 mutation.insertionIdx = insertionIdx; in generateMutation()
153 mutation.newOpcode = newOpcodeInfo.value; in generateMutation()
158 mutation.hasConst = true; in generateMutation()
159 mutation.constValue = rng.nextLong() % ((ContainsConst)fmt).getConstRange(); in generateMutation()
162 mutation.hasPoolIndex = true; in generateMutation()
167 mutation.poolIndexValue = rng.nextInt(maxPoolIndex); in generateMutation()
169 mutation.poolIndexValue = 0; in generateMutation()
176 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()
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 …]
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()
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()
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()
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.java484 for (Mutation mutation : mutations) { in writeMutationsToDisk()
485 MutationSerializer.writeMutation(writer, mutation); in writeMutationsToDisk()
498 Mutation mutation = MutationSerializer.readMutation(reader); in loadMutationsFromDisk() local
499 mutations.add(mutation); in loadMutationsFromDisk()
509 for (Mutation mutation : mutations) { in applyMutationsFromList()
511 mutation.mutatableCode = mutatableCodes.get(mutation.mutatableCodeIdx); in applyMutationsFromList()
514 CodeMutator mutator = mutatorsLookupByClass.get(mutation.mutatorClass); in applyMutationsFromList()
517 mutator.forceMutate(mutation); in applyMutationsFromList()
520 if (!mutatedCodes.contains(mutation.mutatableCode)) { in applyMutationsFromList()
521 mutatedCodes.add(mutation.mutatableCode); in applyMutationsFromList()
/art/tools/dexfuzz/src/dexfuzz/listeners/
DConsoleLoggerListener.java56 for (Mutation mutation : mutations) { in handleMutations()
57 logToConsole("Applied mutation: " + mutation.toString()); in handleMutations()
DLogFileListener.java273 for (Mutation mutation : mutations) { in handleMutations()
274 write(MutationSerializer.getMutationString(mutation)); in handleMutations()
/art/tools/dexfuzz/
DREADME17 for mutation - e.g. some tests taken from the ART test suite - and point it at an
95 MutateFail - because mutation is a random process, and has attempt thresholds to
128 Each bytecode mutation has a chance out of 100% of firing. Following is the listing
129 of each mutation's probability. If you wish to easily adjust these values, copy