summaryrefslogtreecommitdiff
path: root/compiler/common_compiler_test.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2021-02-01 10:16:05 +0000
committerVladimir Marko <vmarko@google.com>2021-02-01 12:27:34 +0000
commit36e4d1d398a1526c6bc5eba12b32279dc07749d8 (patch)
treeff094d112e7b2cb950a9504360957daa8967e1fe /compiler/common_compiler_test.cc
parentdaf1133c3dcf5338ad1d4155e06ec241b5a2ab3b (diff)
Remove HWASan tag from method entrypoint in tests.
Test: run-gtests.sh Bug: 177816575 Change-Id: If76f186d69ac9311a81e025960c13d9b99be6e56
Diffstat (limited to 'compiler/common_compiler_test.cc')
-rw-r--r--compiler/common_compiler_test.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc
index 535749b530..426135c971 100644
--- a/compiler/common_compiler_test.cc
+++ b/compiler/common_compiler_test.cc
@@ -90,7 +90,9 @@ void CommonCompilerTestImpl::MakeExecutable(ArtMethod* method,
const void* code_ptr = reinterpret_cast<const uint8_t*>(unaligned_code_ptr) + padding;
CHECK_EQ(code_ptr, static_cast<const void*>(chunk->data() + (chunk->size() - code_size)));
MakeExecutable(code_ptr, code.size());
- const void* method_code = CompiledMethod::CodePointer(code_ptr,
+ // Remove hwasan tag. This is done in kernel in newer versions. This supports older kernels.
+ // This is needed to support stack walking, including exception handling.
+ const void* method_code = CompiledMethod::CodePointer(HWASanUntag(code_ptr),
compiled_method->GetInstructionSet());
LOG(INFO) << "MakeExecutable " << method->PrettyMethod() << " code=" << method_code;
method->SetEntryPointFromQuickCompiledCode(method_code);