summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Theodore Dubois <tbodt@google.com> 2022-11-30 16:44:47 -0800
committer Treehugger Robot <treehugger-gerrit@google.com> 2022-12-02 17:53:34 +0000
commitf531f197b87a3b8ca8deea6e753012c8b46a05ef (patch)
tree68ae6b21145a81dc2c6cd8fe9c0bd304c14fdf73
parent7b97aebac851b345c7733d56ffe0fedf66010dbb (diff)
Remove stack protector from checkjni functions too
r.android.com/2127962 disabled stack protector on these functions in jni_internal.cc, but check_jni.cc functions wrap these in non-user builds. This fixes crash handling in eng/userdebug builds. Test: lunch sdk_phone_x86_64 and boot emulator Test: adb shell am crash com.android.contacts, java stack appears Bug: 168258494 Change-Id: I28004f8b9343052b525222d3494af4e6dd447ffa
-rw-r--r--runtime/jni/check_jni.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/jni/check_jni.cc b/runtime/jni/check_jni.cc
index 127d1a3a61..5f0e468a93 100644
--- a/runtime/jni/check_jni.cc
+++ b/runtime/jni/check_jni.cc
@@ -2340,6 +2340,7 @@ class CheckJNI {
CallMethodV(__FUNCTION__, env, obj, c, mid, vargs, Primitive::kPrimVoid, kDirect);
}
+ NO_STACK_PROTECTOR
static void CallStaticVoidMethodV(JNIEnv* env, jclass c, jmethodID mid, va_list vargs) {
CallMethodV(__FUNCTION__, env, nullptr, c, mid, vargs, Primitive::kPrimVoid, kStatic);
}
@@ -3304,6 +3305,7 @@ class CheckJNI {
return result;
}
+ NO_STACK_PROTECTOR
static JniValueType CallMethodV(const char* function_name, JNIEnv* env, jobject obj, jclass c,
jmethodID mid, va_list vargs, Primitive::Type type,
InvokeType invoke) {