summaryrefslogtreecommitdiffstats
path: root/runtime/jni_internal.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2013-08-15 10:26:54 -0700
committerBrian Carlstrom <bdc@google.com>2013-08-19 15:13:34 -0700
commitabd7be989a7509d6dd7325d505fa9926ed502355 (patch)
treeb6dfd2d5f4ebff454c75fb435c438af56be78e29 /runtime/jni_internal.h
parent7571e8b761ebc2c923525e12ea9fcf07e62cb33e (diff)
downloadandroid_art-abd7be989a7509d6dd7325d505fa9926ed502355.tar.gz
android_art-abd7be989a7509d6dd7325d505fa9926ed502355.tar.bz2
android_art-abd7be989a7509d6dd7325d505fa9926ed502355.zip
Prevent segvs in JNI.
A segv in JNI code (without CheckJNI) is hard to debug as we fail to see stacks, pending exceptions.. Make JNI code robust to null arguments, but don't go to the lengths that CheckJNI does in also sanity checking arguments, the priority here is just to stop the VM from crashing. Bug 10305723 Also, allow an unknown throw location not to crash exception dumping. Found/useful for debugging bug 10331039. (cherry picked from commit bc939663ccfbe0c648dd6a3670041510aca82420) Change-Id: Id0203db7d9e320d45ae5ba25d2b63939c79e5c16
Diffstat (limited to 'runtime/jni_internal.h')
-rw-r--r--runtime/jni_internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/jni_internal.h b/runtime/jni_internal.h
index e3ffc8421b..f7caa0f56d 100644
--- a/runtime/jni_internal.h
+++ b/runtime/jni_internal.h
@@ -51,7 +51,7 @@ class Thread;
void JniAbortF(const char* jni_function_name, const char* fmt, ...)
__attribute__((__format__(__printf__, 2, 3)));
void RegisterNativeMethods(JNIEnv* env, const char* jni_class_name, const JNINativeMethod* methods,
- size_t method_count);
+ jint method_count);
JValue InvokeWithJValues(const ScopedObjectAccess&, jobject obj, jmethodID mid, jvalue* args)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);