From f1b809ce611e943f926fff97cefe0930226ffcc2 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Tue, 26 Nov 2019 18:52:06 +0000 Subject: Revert^2 "Allow structural redefinition on non-final classes." We were incorrectly racing with the rest of the runtime in a couple of places. First we would return an ObjPtr of a newly defined class after holding it over a suspend point. This could lead to DefineClass returning an obsolete class in some cases. We also failed to ensure the class-status was synchronized between the old and new classes during structural redefinition. This could lead to a class appearing to go backwards in status. This reverts commit 88b1c83080afcb2bfb6f781ded1c90fe8f9eab4d. Reason for revert: Fixed issues causing test failures. Test: ./test.py --host Bug: 134162467 Bug: 144168550 Change-Id: I4d0f7718490532f0ef14a9561b8e7000ef292b12 --- test/1999-virtual-structural/src/Main.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/1999-virtual-structural/src/Main.java (limited to 'test/1999-virtual-structural/src/Main.java') diff --git a/test/1999-virtual-structural/src/Main.java b/test/1999-virtual-structural/src/Main.java new file mode 100644 index 0000000000..86a492bcb6 --- /dev/null +++ b/test/1999-virtual-structural/src/Main.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +public class Main { + public static void main(String[] args) throws Exception { + art.Test1999.run(); + } +} -- cgit v1.2.3-59-g8ed1b