From fa3db3d377bfaceb51c9a97864b17ce02538b7e0 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Fri, 12 Jan 2018 14:42:18 -0800 Subject: Change compiler tests to have aligned code item Previously, the code item was not necessarily 32 bit aligned. This caused bus errors on armv7. Also create a real dexfile object instead of casting 0 initialized memory to a dex file pointer. We just got lucky before that the cdex boolean was false. Test: test-art-target-gtest Bug: 63756964 Bug: 71605148 Change-Id: Ic7199f2b97bbd421de1d702efa5c6531ff45c022 --- compiler/optimizing/optimizing_cfi_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/optimizing_cfi_test.cc') diff --git a/compiler/optimizing/optimizing_cfi_test.cc b/compiler/optimizing/optimizing_cfi_test.cc index e2b2106f65..d20b681b49 100644 --- a/compiler/optimizing/optimizing_cfi_test.cc +++ b/compiler/optimizing/optimizing_cfi_test.cc @@ -41,7 +41,7 @@ namespace art { // Run the tests only on host. #ifndef ART_TARGET_ANDROID -class OptimizingCFITest : public CFITest { +class OptimizingCFITest : public CFITest, public OptimizingUnitTestHelper { public: // Enable this flag to generate the expected outputs. static constexpr bool kGenerateExpected = false; @@ -63,7 +63,7 @@ class OptimizingCFITest : public CFITest { // Setup simple context. std::string error; isa_features_ = InstructionSetFeatures::FromVariant(isa, "default", &error); - graph_ = CreateGraph(&pool_and_allocator_); + graph_ = CreateGraph(); // Generate simple frame with some spills. code_gen_ = CodeGenerator::Create(graph_, isa, *isa_features_, opts_); code_gen_->GetAssembler()->cfi().SetEnabled(true); -- cgit v1.2.3-59-g8ed1b