Avoid removing new-instance instruction twice.
Includes a fail-before/pass-after regression test.
Rationale:
In some corner cases, one new instance reached more than one
java.lang.String.<init> method call. As a result, the new
instance instruction appeared multiple times in the vector
uninitialized_strings_. A second removal crashes the compiler.
This change list avoid the crash by simply skipping instructions
that are already removed.
BUG=27847265
Change-Id: I7f8a4f84ea3c184e1529ec3e90bd6749c83c445b
diff --git a/test/591-new-instance-string/expected.txt b/test/591-new-instance-string/expected.txt
new file mode 100644
index 0000000..b0aad4d
--- /dev/null
+++ b/test/591-new-instance-string/expected.txt
@@ -0,0 +1 @@
+passed