diff options
author | Ian Rogers <irogers@google.com> | 2014-01-02 17:36:41 -0800 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-01-03 10:51:59 -0800 |
commit | 1d99e4549309d05007d041d058b1878de88e9585 (patch) | |
tree | 3c5508e7f4084b124532aabaa39fdea10eb1788c /runtime/interpreter/interpreter_common.cc | |
parent | 5de028bf066052afd15c6733a4e6edfe91ad222c (diff) | |
download | art-1d99e4549309d05007d041d058b1878de88e9585.zip art-1d99e4549309d05007d041d058b1878de88e9585.tar.gz art-1d99e4549309d05007d041d058b1878de88e9585.tar.bz2 |
Disallow JNI NewObjectArray of primitive types.
Also, make jni_internal_test execute via the interpreter rather than compile
methods. Add tests for passing negative array sizes to JNI routines new
functions. Re-enable the tests NewStringNullCharsNonzeroLength and
NewDirectBuffer_GetDirectBufferAddress_GetDirectBufferCapacity. Test and
explicitly fail if the initial value argument to NewObjectArray isn't
assignable to that type of array.
Use unchecked ObjectArray::Set with NewObjectArray with an initial value.
Change-Id: If3491cb5f974b42cf70c1b850819265f9963ee48
Diffstat (limited to 'runtime/interpreter/interpreter_common.cc')
-rw-r--r-- | runtime/interpreter/interpreter_common.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc index 5b9e55f..f149828 100644 --- a/runtime/interpreter/interpreter_common.cc +++ b/runtime/interpreter/interpreter_common.cc @@ -151,6 +151,9 @@ bool DoCall(ArtMethod* method, Object* receiver, Thread* self, ShadowFrame& shad // Do the call now. if (LIKELY(Runtime::Current()->IsStarted())) { + if (kIsDebugBuild && method->GetEntryPointFromInterpreter() == nullptr) { + LOG(FATAL) << "Attempt to invoke non-executable method: " << PrettyMethod(method); + } (method->GetEntryPointFromInterpreter())(self, mh, code_item, new_shadow_frame, result); } else { UnstartedRuntimeInvoke(self, mh, code_item, new_shadow_frame, result, first_dest_reg); |