diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2013-11-21 12:42:36 -0800 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2013-11-21 12:42:36 -0800 |
commit | cbbb080e8b45e46ea43af521ba2a0b3d432702a7 (patch) | |
tree | 3743409700a99c7f8d91059a24962e28d04a8be9 /runtime/entrypoints/quick | |
parent | 1febddf359ae500ef1bb01ab4883b076fcb56440 (diff) | |
download | art-cbbb080e8b45e46ea43af521ba2a0b3d432702a7.zip art-cbbb080e8b45e46ea43af521ba2a0b3d432702a7.tar.gz art-cbbb080e8b45e46ea43af521ba2a0b3d432702a7.tar.bz2 |
Fix a libartd.so boot crash in Heap::AllocObjectWithAllocator()
Bug: 11806947
Change-Id: I826875f23ee2233d4128e852ff6fe7e26ced378f
Diffstat (limited to 'runtime/entrypoints/quick')
-rw-r--r-- | runtime/entrypoints/quick/quick_alloc_entrypoints.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/runtime/entrypoints/quick/quick_alloc_entrypoints.cc b/runtime/entrypoints/quick/quick_alloc_entrypoints.cc index b71b880..9155088 100644 --- a/runtime/entrypoints/quick/quick_alloc_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_alloc_entrypoints.cc @@ -57,14 +57,22 @@ extern "C" mirror::Array* artCheckAndAllocArrayFromCode##suffix##suffix2( \ mirror::ArtMethod** sp) \ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { \ FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly); \ - return CheckAndAllocArrayFromCode(type_idx, method, component_count, self, false, allocator_type); \ + if (!instrumented_bool) { \ + return CheckAndAllocArrayFromCode(type_idx, method, component_count, self, false, allocator_type); \ + } else { \ + return CheckAndAllocArrayFromCodeInstrumented(type_idx, method, component_count, self, false, allocator_type); \ + } \ } \ extern "C" mirror::Array* artCheckAndAllocArrayFromCodeWithAccessCheck##suffix##suffix2( \ uint32_t type_idx, mirror::ArtMethod* method, int32_t component_count, Thread* self, \ mirror::ArtMethod** sp) \ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { \ FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly); \ - return CheckAndAllocArrayFromCode(type_idx, method, component_count, self, true, allocator_type); \ + if (!instrumented_bool) { \ + return CheckAndAllocArrayFromCode(type_idx, method, component_count, self, true, allocator_type); \ + } else { \ + return CheckAndAllocArrayFromCodeInstrumented(type_idx, method, component_count, self, true, allocator_type); \ + } \ } #define GENERATE_ENTRYPOINTS_FOR_ALLOCATOR(suffix, allocator_type) \ |