summaryrefslogtreecommitdiff
path: root/runtime/oat_quick_method_header.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/oat_quick_method_header.h')
-rw-r--r--runtime/oat_quick_method_header.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/oat_quick_method_header.h b/runtime/oat_quick_method_header.h
index c8ee9b4e91..9a1133e0ac 100644
--- a/runtime/oat_quick_method_header.h
+++ b/runtime/oat_quick_method_header.h
@@ -114,7 +114,8 @@ class PACKED(4) OatQuickMethodHeader {
}
bool Contains(uintptr_t pc) const {
- uintptr_t code_start = reinterpret_cast<uintptr_t>(code_);
+ // Remove hwasan tag to make comparison below valid. The PC from the stack does not have it.
+ uintptr_t code_start = reinterpret_cast<uintptr_t>(HWASanUntag(code_));
static_assert(kRuntimeISA != InstructionSet::kThumb2, "kThumb2 cannot be a runtime ISA");
if (kRuntimeISA == InstructionSet::kArm) {
// On Thumb-2, the pc is offset by one.