summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 3d268e4538..9034560689 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -2215,7 +2215,10 @@ mirror::Class* ClassLinker::CreateArrayClass(Thread* self, const char* descripto
DCHECK(self->IsExceptionPending());
return nullptr;
}
-
+ if (UNLIKELY(component_type->IsPrimitiveVoid())) {
+ ThrowNoClassDefFoundError("Attempt to create array of void primitive type");
+ return nullptr;
+ }
// See if the component type is already loaded. Array classes are
// always associated with the class loader of their underlying
// element type -- an array of Strings goes with the loader for