Fix possible overrun bug for resolving startup strings
Moved the ResolveConstStrings after verification and added logic to
only resolve strings for classes that verify. This fixes a bug
where invalid Dex bytecode could cause dex2oat to crash.
Bug: 128915540
Test: test-art-host
Change-Id: Id2e5e4b10e5afbb8955e805d199754bc255a2f42
diff --git a/test/StringLiterals/StringLiterals.java b/test/StringLiterals/StringLiterals.java
index 9ab37ca..c2b518a 100644
--- a/test/StringLiterals/StringLiterals.java
+++ b/test/StringLiterals/StringLiterals.java
@@ -33,6 +33,13 @@
System.out.println("Loading " + resource);
}
+ static class InnerClass {
+ void startUpMethod2() {
+ String resource = "ab11.apk";
+ System.out.println("Start up method 2");
+ }
+ }
+
void otherMethod() {
System.out.println("Unexpected error");
System.out.println("Shutting down!");