From b68ed2c708a5a3fcc8c2cec944c1080a6fbb88f5 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Wed, 20 Jun 2018 10:39:31 -0700 Subject: ART: Ensure OatQuickMethodHeader is trivially copyable Remove empty constructor. Test: mmma art Change-Id: Ie58721299a6675797e9a525f4eb7e6df82abed50 --- compiler/common_compiler_test.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/common_compiler_test.cc') diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc index a7f16d394e..1d4f020391 100644 --- a/compiler/common_compiler_test.cc +++ b/compiler/common_compiler_test.cc @@ -16,6 +16,8 @@ #include "common_compiler_test.h" +#include + #include "arch/instruction_set_features.h" #include "art_field-inl.h" #include "art_method-inl.h" @@ -79,6 +81,7 @@ void CommonCompilerTest::MakeExecutable(ArtMethod* method) { const size_t size = method_info.size() + vmap_table.size() + sizeof(method_header) + code_size; chunk->reserve(size + max_padding); chunk->resize(sizeof(method_header)); + static_assert(std::is_trivially_copyable::value, "Cannot use memcpy"); memcpy(&(*chunk)[0], &method_header, sizeof(method_header)); chunk->insert(chunk->begin(), vmap_table.begin(), vmap_table.end()); chunk->insert(chunk->begin(), method_info.begin(), method_info.end()); -- cgit v1.2.3-59-g8ed1b