diff options
| author | 2017-02-11 00:43:10 +0000 | |
|---|---|---|
| committer | 2017-02-13 16:52:07 -0800 | |
| commit | 724f77e2fed038d57a3d08fdcf656d703e3473ea (patch) | |
| tree | a9ce49e4e345defa257df168f354710159a818ff /runtime/stack.cc | |
| parent | 38c20d4a694eea44a1bd3af32a6a99512c139358 (diff) | |
Revert^4 "Make class redefinition work with native methods on stack."
We had a problem where there was a brief period of time where the dex
file for an obsolete method could not be obtained. This meant that not
all functions of ArtMethod could safely be called, causing some
problems.
This reverts commit 38c20d4a694eea44a1bd3af32a6a99512c139358.
Reason for revert: Fixed issues with interp-ac and relocate-npatchoat
Test: ART_TEST_RUN_TEST_RELOCATE_NO_PATCHOAT=true \
ART_TEST_INTERPRETER_ACCESS_CHECKS=true \
mma -j40 test-art-host
Change-Id: I04991f3e76813831b6446f97636b6fa404397f36
Diffstat (limited to 'runtime/stack.cc')
| -rw-r--r-- | runtime/stack.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc index d7ba1d75d8..51a24e4e01 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -874,9 +874,13 @@ void StackVisitor::WalkStack(bool include_transitions) { CHECK_EQ(GetMethod(), callee) << "Expected: " << ArtMethod::PrettyMethod(callee) << " Found: " << ArtMethod::PrettyMethod(GetMethod()); } else { - CHECK_EQ(instrumentation_frame.method_, GetMethod()) - << "Expected: " << ArtMethod::PrettyMethod(instrumentation_frame.method_) - << " Found: " << ArtMethod::PrettyMethod(GetMethod()); + // Instrumentation generally doesn't distinguish between a method's obsolete and + // non-obsolete version. + CHECK_EQ(instrumentation_frame.method_->GetNonObsoleteMethod(), + GetMethod()->GetNonObsoleteMethod()) + << "Expected: " + << ArtMethod::PrettyMethod(instrumentation_frame.method_->GetNonObsoleteMethod()) + << " Found: " << ArtMethod::PrettyMethod(GetMethod()->GetNonObsoleteMethod()); } if (num_frames_ != 0) { // Check agreement of frame Ids only if num_frames_ is computed to avoid infinite @@ -903,7 +907,7 @@ void StackVisitor::WalkStack(bool include_transitions) { << " native=" << method->IsNative() << std::noboolalpha << " entrypoints=" << method->GetEntryPointFromQuickCompiledCode() - << "," << method->GetEntryPointFromJni() + << "," << (method->IsNative() ? method->GetEntryPointFromJni() : nullptr) << " next=" << *cur_quick_frame_; } |