summaryrefslogtreecommitdiff
path: root/test/utils/python/generate_java_main.py
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2016-09-07 12:04:20 -0700
committerAlex Light <allight@google.com>2016-09-09 10:26:42 -0700
commit1f3925d4f067438d3689ef2736fd2af063c98668 (patch)
tree4e1ad2f24b73dbf6c2ea99881e6c4cd99193be76 /test/utils/python/generate_java_main.py
parent038cb84f792501ae01561fe5ea4e8144f1918b7e (diff)
Fix vtable corruption issue
We were adding duplicate methods to the vtable in some cases where default methods (and conflict methods) were used. This caused issues where they were not correctly overridden in subclasses that implement these methods directly. When overridden only one of the vtable entries was updated meaning it was still possible to reach the overridden code using a virtual call. This change prevents the duplicate methods from being added to the vtable in this circumstance. It also adds a debug check that ensures that the vtable has no duplicates to prevent regressions. Bug: 31280371 Test: mma test-art-host Test: mma test-art-host-run-test-960-default-smali Change-Id: I17d88fb8949c8d5d75b4de3c734fd98660b81e61
Diffstat (limited to 'test/utils/python/generate_java_main.py')
-rwxr-xr-xtest/utils/python/generate_java_main.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/utils/python/generate_java_main.py b/test/utils/python/generate_java_main.py
index f66d0dd372..1c76b06dda 100755
--- a/test/utils/python/generate_java_main.py
+++ b/test/utils/python/generate_java_main.py
@@ -175,7 +175,11 @@ class Func(mixins.Named, mixins.NameComparableMixin):
return;
}} catch (Error e) {{
System.out.printf("%s-{invoke_type} on {farg}: {callfunc}() threw exception!\\n", s);
- e.printStackTrace(System.out);
+ if (e instanceof IncompatibleClassChangeError) {{
+ System.out.printf("Exception is of type %s\\n", e.getClass().getName());
+ }} else {{
+ e.printStackTrace(System.out);
+ }}
}}
}}
"""