From cb3c3b2819f326d54a6bd960a9a82c5290aa69b0 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 17 Feb 2025 14:21:07 +0000 Subject: Do not inline a method that was marked as un-compilable. The compiler may have internally mark a method as not compilable. Do not clear the verification results from the compiler callbacks, we still need them during compilation. Test: 860-vdex-failure Bug: 395243275 Change-Id: I79ba61eb8a7ba6729b22c4c27fa83d8373fce03a --- dex2oat/common_compiler_driver_test.cc | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'dex2oat/common_compiler_driver_test.cc') diff --git a/dex2oat/common_compiler_driver_test.cc b/dex2oat/common_compiler_driver_test.cc index 81e06b2345..7ce5e94bcd 100644 --- a/dex2oat/common_compiler_driver_test.cc +++ b/dex2oat/common_compiler_driver_test.cc @@ -28,7 +28,7 @@ namespace art { -CommonCompilerDriverTest::CommonCompilerDriverTest() : inaccessible_page_(nullptr) {} +CommonCompilerDriverTest::CommonCompilerDriverTest() {} CommonCompilerDriverTest::~CommonCompilerDriverTest() {} void CommonCompilerDriverTest::CompileAll(jobject class_loader, @@ -44,13 +44,7 @@ void CommonCompilerDriverTest::CompileAll(jobject class_loader, timings, &compiler_options_->image_classes_); - // Verification results in the `callback_` should not be used during compilation. - down_cast(callbacks_.get())->SetVerificationResults( - reinterpret_cast(inaccessible_page_)); compiler_driver_->CompileAll(class_loader, dex_files, timings); - down_cast(callbacks_.get())->SetVerificationResults( - verification_results_.get()); - compiler_driver_->FreeThreadPools(); } @@ -107,19 +101,9 @@ void CommonCompilerDriverTest::SetUp() { CommonCompilerTest::SetUp(); CreateCompilerDriver(); - - // Note: We cannot use MemMap because some tests tear down the Runtime and destroy - // the gMaps, so when destroying the MemMap, the test would crash. - const size_t page_size = MemMap::GetPageSize(); - inaccessible_page_ = mmap(nullptr, page_size, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - CHECK(inaccessible_page_ != MAP_FAILED) << strerror(errno); } void CommonCompilerDriverTest::TearDown() { - if (inaccessible_page_ != nullptr) { - munmap(inaccessible_page_, MemMap::GetPageSize()); - inaccessible_page_ = nullptr; - } image_reservation_.Reset(); compiler_driver_.reset(); verification_results_.reset(); -- cgit v1.2.3-59-g8ed1b