From 54ed0150a42297a1a5e477d6569619193fcbffd0 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 23 Dec 2020 17:29:32 +0000 Subject: Handle VERIFY_ERROR_INSTANTIATION in compiler and nterp. Nterp always supported it, but the compiler was missing a check. Test: test.py Test: 600-verifier-fails Change-Id: I8675ca6f61c68c4152212c81843da8248781f18a --- compiler/optimizing/instruction_builder.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/optimizing/instruction_builder.cc') diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index 76ee456b55..3b1086e88e 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -1269,6 +1269,7 @@ HNewInstance* HInstructionBuilder::BuildNewInstance(dex::TypeIndex type_index, u if (load_class->NeedsAccessCheck() || klass == nullptr || // Finalizable/instantiable is unknown. klass->IsFinalizable() || + klass.Get() == klass->GetClass() || // Classes cannot be allocated in code !klass->IsInstantiable()) { entrypoint = kQuickAllocObjectWithChecks; } -- cgit v1.2.3-59-g8ed1b