summaryrefslogtreecommitdiff
path: root/runtime/stack.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/stack.cc')
-rw-r--r--runtime/stack.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc
index 45aeb92793..56ef5aaa90 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -678,10 +678,8 @@ void StackVisitor::SanityCheckFrame() const {
if (space->IsImageSpace()) {
auto* image_space = space->AsImageSpace();
const auto& header = image_space->GetImageHeader();
- const ImageSection& methods = header.GetMethodsSection();
- const ImageSection& runtime_methods = header.GetRuntimeMethodsSection();
- const size_t offset = reinterpret_cast<const uint8_t*>(method) - image_space->Begin();
- if (methods.Contains(offset) || runtime_methods.Contains(offset)) {
+ const auto* methods = &header.GetMethodsSection();
+ if (methods->Contains(reinterpret_cast<const uint8_t*>(method) - image_space->Begin())) {
in_image = true;
break;
}