From 8580154e01910459d99074ef10584b8d647d912f Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Thu, 27 Feb 2014 18:06:26 -0800 Subject: Fix 080-oom-throw with semispace GC. Fixes a moving GC related error in array allocations where we didn't consider that the array class might have moved. Change-Id: Iefe8bdc06b51ec2329a7984359f3da7fda479fec --- runtime/mirror/array-inl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/mirror/array-inl.h') diff --git a/runtime/mirror/array-inl.h b/runtime/mirror/array-inl.h index 8158bc5f61..1d37775f93 100644 --- a/runtime/mirror/array-inl.h +++ b/runtime/mirror/array-inl.h @@ -141,6 +141,7 @@ inline Array* Array::Alloc(Thread* self, Class* array_class, int32_t component_c allocator_type, visitor)); } if (kIsDebugBuild && result != nullptr && Runtime::Current()->IsStarted()) { + array_class = result->GetClass(); // In case the array class moved. CHECK_EQ(array_class->GetComponentSize(), component_size); if (!fill_usable) { CHECK_EQ(result->SizeOf(), size); -- cgit v1.2.3-59-g8ed1b