From 1f3925d4f067438d3689ef2736fd2af063c98668 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Wed, 7 Sep 2016 12:04:20 -0700 Subject: 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 --- test/utils/python/generate_java_main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/utils/python/generate_java_main.py') 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); + }} }} }} """ -- cgit v1.2.3