Fix braino in ArtCode refactoring.
AssertPcIsWithinQuickCode is tricky. Will clean-up in
next changes.
Change-Id: Ie97d3d4a54cb568ea33e645e7d6d9a0c337e9c6a
diff --git a/runtime/art_code.cc b/runtime/art_code.cc
index b999ec8..ad0b170 100644
--- a/runtime/art_code.cc
+++ b/runtime/art_code.cc
@@ -286,8 +286,10 @@
return;
}
- uint32_t code_size = reinterpret_cast<const OatQuickMethodHeader*>(code)[-1].code_size_;
- CHECK(PcIsWithinQuickCode(pc))
+ uint32_t code_size = reinterpret_cast<const OatQuickMethodHeader*>(
+ EntryPointToCodePointer(code))[-1].code_size_;
+ uintptr_t code_start = reinterpret_cast<uintptr_t>(code);
+ CHECK(code_start <= pc && pc <= (code_start + code_size))
<< PrettyMethod(method_)
<< " pc=" << std::hex << pc
<< " code=" << code