From 8feb7eb99360e88e7083be82ac7a63e4a9a28552 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 4 Feb 2020 09:21:33 +0000 Subject: 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 --- runtime/stack.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/stack.cc') 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(), -- cgit v1.2.3-59-g8ed1b