Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: src/trusted/service_runtime/nacl_secure_service.c

Issue 997683002: Exit cleanly for the SRPC "log" requests instead of generating crash reports. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: run the hook just in case Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/service_runtime/nacl_error_log_hook.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/nacl_secure_service.c
diff --git a/src/trusted/service_runtime/nacl_secure_service.c b/src/trusted/service_runtime/nacl_secure_service.c
index 9e5e315764d5c661ed34c0be7a44a654ae5d572b..e0e36694cc90ac969eaab98eef2a2758dde35fbc 100644
--- a/src/trusted/service_runtime/nacl_secure_service.c
+++ b/src/trusted/service_runtime/nacl_secure_service.c
@@ -257,6 +257,19 @@ static void NaClSecureServiceLogRpc(
UNREFERENCED_PARAMETER(out_args);
NaClLog(5, "NaClSecureChannelLogRpc\n");
+ if (LOG_FATAL == severity) {
+ /*
+ * Do not actually abort due to LOG_FATAL. SRPC is deprecated and the
+ * only remaining user of this Log RPC corresponds to fairly benign
+ * errors. Also, at this point the backtraces will not be terribly
+ * interesting. Therefore, avoid spamming the crash report counter
+ * for such errors and exit cleanly. Run the abort hook as well,
+ * to flush the logs.
+ */
+ NaClLog(LOG_ERROR, "%s\n", msg);
+ NaClLogRunAbortBehavior();
+ NaClExit(1);
+ }
NaClLog(severity, "%s\n", msg);
NaClLog(5, "NaClSecureChannelLogRpc\n");
rpc->result = NACL_SRPC_RESULT_OK;
« no previous file with comments | « src/trusted/service_runtime/nacl_error_log_hook.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698