Added a new mutator called NewInstanceChanger.
Added a new mutator named NewInstanceChanger which changes the type of
the instance to any random type from the pool. Most of the times, it becomes
invalid after being changed. It tries to change the type of invoke direct that
follows. Also, the mutator makes a matching method id if needed.
Test: ran dexfuzz until the mutation showed up.
before:
new-instance v0, LX; // type@0001
invoke-direct {v0}, LX;.<init>:()V // method@0000
after:
new-instance v0, LY; // type@0002
invoke-direct {v0}, LY;.<init>:()V // method@0000
Change-Id: I6eccaebf9910c177e9cff0b5d3ac058565c4331e
diff --git a/tools/dexfuzz/README b/tools/dexfuzz/README
index 1f74262..fff5473 100644
--- a/tools/dexfuzz/README
+++ b/tools/dexfuzz/README
@@ -139,6 +139,7 @@
InstructionSwapper 80
InvokeChanger 30
NewArrayLengthChanger 50
+NewInstanceChanger 10
NewMethodCaller 10
NonsenseStringPrinter 10
OppositeBranchChanger 40