summaryrefslogtreecommitdiff
path: root/runtime/entrypoints_order_test.cc
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2019-10-04 20:34:46 +0000
committer Alex Light <allight@google.com> 2019-10-04 14:21:21 -0700
commitea2a3d949354c8b054983ba629c81bc5ff7163da (patch)
treedc94a9c92b254d3f94d96ad0dc27f195d5a7767c /runtime/entrypoints_order_test.cc
parent7fca6ef7b9dbe5a54f2c93a3484035f48ebae27a (diff)
Revert^2 "Walk internal ArtField/ArtMethod pointers"
This reverts commit 712fa800b2b78e527d36c88dc369bf4b723587ea. We incorrectly didn't check if a method was obsolete before giving its class's MethodIds array. We then incorrectly used this array and the (placeholder) -1 index to try to find the previous method-id. Since -1 is not a valid array index we got check failures. To fix this we simply added a check that the method is not obsolete and if it is we go to the slow-path. Reason for revert: Fixed issue causing out-of-bounds array access Test: ./test.py --host --debuggable --ndebuggable Bug: 134162467 Change-Id: Iaffefeab6e889b4fb6554a11452d0af051001cb7
Diffstat (limited to 'runtime/entrypoints_order_test.cc')
-rw-r--r--runtime/entrypoints_order_test.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/entrypoints_order_test.cc b/runtime/entrypoints_order_test.cc
index 5b4275cbad..5235f65224 100644
--- a/runtime/entrypoints_order_test.cc
+++ b/runtime/entrypoints_order_test.cc
@@ -136,10 +136,13 @@ class EntrypointsOrderTest : public CommonRuntimeTest {
EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, flip_function, method_verifier, sizeof(void*));
EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, method_verifier, thread_local_mark_stack, sizeof(void*));
EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_mark_stack, async_exception, sizeof(void*));
+ EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, async_exception, top_reflective_handle_scope,
+ sizeof(void*));
// The first field after tlsPtr_ is forced to a 16 byte alignment so it might have some space.
auto offset_tlsptr_end = OFFSETOF_MEMBER(Thread, tlsPtr_) +
sizeof(decltype(reinterpret_cast<Thread*>(16)->tlsPtr_));
- CHECKED(offset_tlsptr_end - OFFSETOF_MEMBER(Thread, tlsPtr_.async_exception) == sizeof(void*),
+ CHECKED(offset_tlsptr_end - OFFSETOF_MEMBER(Thread, tlsPtr_.top_reflective_handle_scope) ==
+ sizeof(void*),
"async_exception last field");
}