diff options
Diffstat (limited to 'compiler/exception_test.cc')
-rw-r--r-- | compiler/exception_test.cc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/compiler/exception_test.cc b/compiler/exception_test.cc index 495398b4b3..9a3a2bafc9 100644 --- a/compiler/exception_test.cc +++ b/compiler/exception_test.cc @@ -14,6 +14,8 @@ * limitations under the License. */ +#include <android-base/test_utils.h> + #include <memory> #include <type_traits> @@ -78,7 +80,12 @@ class ExceptionTest : public CommonRuntimeTest { ArenaStack arena_stack(&pool); ScopedArenaAllocator allocator(&arena_stack); StackMapStream stack_maps(&allocator, kRuntimeISA); - stack_maps.BeginMethod(4 * sizeof(void*), 0u, 0u, 0u); + stack_maps.BeginMethod(/* frame_size_in_bytes= */ 4 * sizeof(void*), + /* core_spill_mask= */ 0u, + /* fp_spill_mask= */ 0u, + /* num_dex_registers= */ 0u, + /* baseline= */ false, + /* debuggable= */ false); stack_maps.BeginStackMapEntry(kDexPc, native_pc_offset); stack_maps.EndStackMapEntry(); stack_maps.EndMethod(code_size); @@ -86,7 +93,7 @@ class ExceptionTest : public CommonRuntimeTest { const size_t stack_maps_size = stack_map.size(); const size_t header_size = sizeof(OatQuickMethodHeader); - const size_t code_alignment = GetInstructionSetAlignment(kRuntimeISA); + const size_t code_alignment = GetInstructionSetCodeAlignment(kRuntimeISA); fake_header_code_and_maps_.resize(stack_maps_size + header_size + code_size + code_alignment); // NB: The start of the vector might not have been allocated the desired alignment. @@ -163,6 +170,7 @@ TEST_F(ExceptionTest, FindCatchHandler) { } TEST_F(ExceptionTest, StackTraceElement) { + SKIP_WITH_HWASAN; // TODO(b/230392320): re-enable with HWASan once fixed. Thread* thread = Thread::Current(); thread->TransitionFromSuspendedToRunnable(); bool started = runtime_->Start(); @@ -187,15 +195,15 @@ TEST_F(ExceptionTest, StackTraceElement) { fake_stack.push_back(0); } - fake_stack.push_back(method_g_->GetOatQuickMethodHeader(0)->ToNativeQuickPc( - method_g_, kDexPc, /* is_for_catch_handler= */ false)); // return pc + OatQuickMethodHeader* header = OatQuickMethodHeader::FromEntryPoint( + method_g_->GetEntryPointFromQuickCompiledCode()); + fake_stack.push_back(header->ToNativeQuickPc(method_g_, kDexPc)); // return pc // Create/push fake 16byte stack frame for method g fake_stack.push_back(reinterpret_cast<uintptr_t>(method_g_)); fake_stack.push_back(0); fake_stack.push_back(0); - fake_stack.push_back(method_g_->GetOatQuickMethodHeader(0)->ToNativeQuickPc( - method_g_, kDexPc, /* is_for_catch_handler= */ false)); // return pc + fake_stack.push_back(header->ToNativeQuickPc(method_g_, kDexPc)); // return pc // Create/push fake 16byte stack frame for method f fake_stack.push_back(reinterpret_cast<uintptr_t>(method_f_)); |