diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-02-27 18:06:26 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-02-27 18:08:12 -0800 |
commit | 8580154e01910459d99074ef10584b8d647d912f (patch) | |
tree | da6e717eb6f77c8cf959a9b0d1f8073f63d4e9fd /runtime/mirror/array-inl.h | |
parent | b63841060cdca9603bf72e737de52a9cec0d6434 (diff) | |
download | android_art-8580154e01910459d99074ef10584b8d647d912f.tar.gz android_art-8580154e01910459d99074ef10584b8d647d912f.tar.bz2 android_art-8580154e01910459d99074ef10584b8d647d912f.zip |
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
Diffstat (limited to 'runtime/mirror/array-inl.h')
-rw-r--r-- | runtime/mirror/array-inl.h | 1 |
1 files changed, 1 insertions, 0 deletions
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); |