diff options
Diffstat (limited to 'runtime/stack.cc')
-rw-r--r-- | runtime/stack.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc index 410e0fd144..72690da088 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -748,14 +748,13 @@ void StackVisitor::SanityCheckFrame() const { // Frame sanity. size_t frame_size = GetCurrentQuickFrameInfo().FrameSizeInBytes(); CHECK_NE(frame_size, 0u); - // A rough guess at an upper size we expect to see for a frame. + // For compiled code, we could try to have a rough guess at an upper size we expect + // to see for a frame: // 256 registers // 2 words HandleScope overhead // 3+3 register spills - // TODO: this seems architecture specific for the case of JNI frames. - // TODO: 083-compiler-regressions ManyFloatArgs shows this estimate is wrong. // const size_t kMaxExpectedFrameSize = (256 + 2 + 3 + 3) * sizeof(word); - const size_t kMaxExpectedFrameSize = 2 * KB; + const size_t kMaxExpectedFrameSize = interpreter::kMaxNterpFrame; CHECK_LE(frame_size, kMaxExpectedFrameSize) << method->PrettyMethod(); size_t return_pc_offset = GetCurrentQuickFrameInfo().GetReturnPcOffset(); CHECK_LT(return_pc_offset, frame_size); @@ -852,7 +851,6 @@ void StackVisitor::WalkStack(bool include_transitions) { cur_quick_frame_ = current_fragment->GetTopQuickFrame(); cur_quick_frame_pc_ = 0; cur_oat_quick_method_header_ = nullptr; - if (cur_quick_frame_ != nullptr) { // Handle quick stack frames. // Can't be both a shadow and a quick fragment. DCHECK(current_fragment->GetTopShadowFrame() == nullptr); |