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

Side by Side Diff: src/trusted/service_runtime/sel_main.c

Issue 9316125: Adding untrusted crash dump / stack trace tests. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: add json escaping to fix windows Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl Simple/secure ELF loader (NaCl SEL). 8 * NaCl Simple/secure ELF loader (NaCl SEL).
9 */ 9 */
10 #include "native_client/src/include/portability.h" 10 #include "native_client/src/include/portability.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 NaClLog(LOG_FATAL, "Adding item to env_vars failed\n"); 385 NaClLog(LOG_FATAL, "Adding item to env_vars failed\n");
386 } 386 }
387 break; 387 break;
388 default: 388 default:
389 fprintf(stderr, "ERROR: unknown option: [%c]\n\n", opt); 389 fprintf(stderr, "ERROR: unknown option: [%c]\n\n", opt);
390 PrintUsage(); 390 PrintUsage();
391 exit(-1); 391 exit(-1);
392 } 392 }
393 } 393 }
394 394
395 if (getenv("NACL_UNTRUSTED_EXCEPTION_HANDLING") != NULL) {
396 exception_handling_requested = 1;
397 }
395 if (exception_handling_requested) { 398 if (exception_handling_requested) {
396 #if NACL_WINDOWS 399 #if NACL_WINDOWS
397 int status; 400 int status;
398 DWORD exit_code; 401 DWORD exit_code;
399 enable_exception_handling = 1; 402 enable_exception_handling = 1;
400 status = NaClLaunchAndDebugItself(argv[0], &exit_code); 403 status = NaClLaunchAndDebugItself(argv[0], &exit_code);
401 if (status == DEBUG_EXCEPTION_HANDLER_NOT_SUPPORTED) { 404 if (status == DEBUG_EXCEPTION_HANDLER_NOT_SUPPORTED) {
402 enable_exception_handling = 0; 405 enable_exception_handling = 0;
403 } else if (status == DEBUG_EXCEPTION_HANDLER_SUCCESS) { 406 } else if (status == DEBUG_EXCEPTION_HANDLER_SUCCESS) {
404 return exit_code; 407 return exit_code;
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 fflush(stdout); 932 fflush(stdout);
930 933
931 if (handle_signals) NaClSignalHandlerFini(); 934 if (handle_signals) NaClSignalHandlerFini();
932 NaClAllModulesFini(); 935 NaClAllModulesFini();
933 936
934 NaClExit(ret_code); 937 NaClExit(ret_code);
935 938
936 /* Unreachable, but having the return prevents a compiler error. */ 939 /* Unreachable, but having the return prevents a compiler error. */
937 return ret_code; 940 return ret_code;
938 } 941 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698