Merge "binder - include calling PID/UID in uncaught remote exception code" am: ea62c76948

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2510075

Change-Id: If858bd4cd6d19c8a638872d86dc9c7387ed3fea5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-03-29 03:11:03 +00:00
committed by Automerger Merge Worker

View File

@@ -413,9 +413,13 @@ protected:
if (env->ExceptionCheck()) { if (env->ExceptionCheck()) {
ScopedLocalRef<jthrowable> excep(env, env->ExceptionOccurred()); ScopedLocalRef<jthrowable> excep(env, env->ExceptionOccurred());
binder_report_exception(env, excep.get(),
"*** Uncaught remote exception! " auto state = IPCThreadState::self();
"(Exceptions are not yet supported across processes.)"); String8 msg;
msg.appendFormat("*** Uncaught remote exception! Exceptions are not yet supported "
"across processes. Client PID %d UID %d.",
state->getCallingPid(), state->getCallingUid());
binder_report_exception(env, excep.get(), msg.c_str());
res = JNI_FALSE; res = JNI_FALSE;
} }
@@ -431,6 +435,7 @@ protected:
ScopedLocalRef<jthrowable> excep(env, env->ExceptionOccurred()); ScopedLocalRef<jthrowable> excep(env, env->ExceptionOccurred());
binder_report_exception(env, excep.get(), binder_report_exception(env, excep.get(),
"*** Uncaught exception in onBinderStrictModePolicyChange"); "*** Uncaught exception in onBinderStrictModePolicyChange");
// TODO: should turn this to fatal?
} }
// Need to always call through the native implementation of // Need to always call through the native implementation of