diff options
| author | 2019-11-12 15:02:51 +0000 | |
|---|---|---|
| committer | 2019-11-13 11:52:43 +0000 | |
| commit | 149cddaa22a1a78e8dde179d2c33b745cb500629 (patch) | |
| tree | af751d1b98fad44a2742089c6928677261f9f580 /runtime/interpreter/interpreter_switch_impl-inl.h | |
| parent | fdbe207596c11cf84c23855123d87ea6e15b70ff (diff) | |
Check stored references in transactional interpreter.
For boot image extension, we need to reject references to
classes that are defined in a dex file belonging to the boot
image we're compiling against but not actually in the boot
image. Allowing such references could yield duplicate class
objects from multiple extensions.
Test: Additional tests in transaction_test.
Test: m test-art-host-gtest
Test: testrunner.py --host --interp-ac
Change-Id: I99eaec331f6d992dba60aeb98a88c268edac11ac
Diffstat (limited to 'runtime/interpreter/interpreter_switch_impl-inl.h')
| -rw-r--r-- | runtime/interpreter/interpreter_switch_impl-inl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/interpreter/interpreter_switch_impl-inl.h b/runtime/interpreter/interpreter_switch_impl-inl.h index 8afaed5cde..989f99740e 100644 --- a/runtime/interpreter/interpreter_switch_impl-inl.h +++ b/runtime/interpreter/interpreter_switch_impl-inl.h @@ -974,6 +974,9 @@ class InstructionHandler { ObjPtr<mirror::Object> val = GetVRegReference(A()); ObjPtr<mirror::ObjectArray<mirror::Object>> array = a->AsObjectArray<mirror::Object>(); if (array->CheckIsValidIndex(index) && array->CheckAssignable(val)) { + if (transaction_active && !CheckWriteValueConstraint(self, val)) { + return false; + } array->SetWithoutChecks<transaction_active>(index, val); } else { return false; // Pending exception. |