summaryrefslogtreecommitdiff
path: root/runtime/stack.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2020-02-04 09:21:33 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2020-02-04 15:18:58 +0000
commit8feb7eb99360e88e7083be82ac7a63e4a9a28552 (patch)
tree9800853684da751524d239da0c9229abcfe8372e /runtime/stack.cc
parent002eac6f818dc89c75487ba928fbe5901e4f82e8 (diff)
Adjust CHECK on instrumentation stack.
When installing the instrumentation stack, it may be that we hit a resolution stub at the bottom of the call stack. This means the instrumentation stack will have an instrumentation frame with a runtime method, when the actual stack will replace this method with the actual ArtMethod being called. Adjust CHECK in stack walking to not assume methods match with the instrumentation stack when seeing a runtime method. Bug: 72608560 Test: ./art/test/run-test --host --dev --runtime-option -verbose:deopt,plugin --prebuild --compact-dex-level fast --jit --no-relocate --create-runner --runtime-option -Xjitthreshold:0 --no-relocate --gcstress --runtime-option -Xcheck:jni 2001-virtual-structural-multithread Test: art/tools/parallel_run.py -j80 /tmp/path/runit.sh --out failure.txt Change-Id: Ic208fa52f4d8b14838b21022744e048e3ca7d093
Diffstat (limited to 'runtime/stack.cc')
-rw-r--r--runtime/stack.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc
index 4148dc71bb..a4ce99b4d8 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -960,7 +960,9 @@ void StackVisitor::WalkStack(bool include_transitions) {
Runtime::Current()->GetCalleeSaveMethod(CalleeSaveType::kSaveRefsAndArgs);
CHECK_EQ(GetMethod(), callee) << "Expected: " << ArtMethod::PrettyMethod(callee)
<< " Found: " << ArtMethod::PrettyMethod(GetMethod());
- } else {
+ } else if (!instrumentation_frame.method_->IsRuntimeMethod()) {
+ // Trampolines get replaced with their actual method in the stack,
+ // so don't do the check below for runtime methods.
// Instrumentation generally doesn't distinguish between a method's obsolete and
// non-obsolete version.
CHECK_EQ(instrumentation_frame.method_->GetNonObsoleteMethod(),