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

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

Issue 10095012: Disable the signal handlers set by AddressSanitizer. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "native_client/src/trusted/service_runtime/sel_main_chrome.h" 7 #include "native_client/src/trusted/service_runtime/sel_main_chrome.h"
8 8
9 #include "native_client/src/include/portability.h" 9 #include "native_client/src/include/portability.h"
10 #include "native_client/src/include/portability_io.h" 10 #include "native_client/src/include/portability_io.h"
(...skipping 15 matching lines...) Expand all
26 #include "native_client/src/trusted/service_runtime/nacl_globals.h" 26 #include "native_client/src/trusted/service_runtime/nacl_globals.h"
27 #include "native_client/src/trusted/service_runtime/env_cleanser.h" 27 #include "native_client/src/trusted/service_runtime/env_cleanser.h"
28 #include "native_client/src/trusted/service_runtime/nacl_app.h" 28 #include "native_client/src/trusted/service_runtime/nacl_app.h"
29 #include "native_client/src/trusted/service_runtime/nacl_all_modules.h" 29 #include "native_client/src/trusted/service_runtime/nacl_all_modules.h"
30 #include "native_client/src/trusted/service_runtime/nacl_signal.h" 30 #include "native_client/src/trusted/service_runtime/nacl_signal.h"
31 #include "native_client/src/trusted/service_runtime/osx/mach_exception_handler.h " 31 #include "native_client/src/trusted/service_runtime/osx/mach_exception_handler.h "
32 #include "native_client/src/trusted/service_runtime/sel_ldr.h" 32 #include "native_client/src/trusted/service_runtime/sel_ldr.h"
33 #include "native_client/src/trusted/service_runtime/sel_qualify.h" 33 #include "native_client/src/trusted/service_runtime/sel_qualify.h"
34 #include "native_client/src/trusted/service_runtime/win/exception_patch/ntdll_pa tch.h" 34 #include "native_client/src/trusted/service_runtime/win/exception_patch/ntdll_pa tch.h"
35 35
36 #ifdef ADDRESS_SANITIZER
Mark Seaborn 2012/04/19 16:16:39 Can you add a comment to explain what this is for,
37 extern __asan_disable_signal_handlers();
Mark Seaborn 2012/04/19 16:16:39 Surely "void __asan_disable_signal_handlers(void);
38 #endif
39
36 static int const kSrpcFd = 5; 40 static int const kSrpcFd = 5;
37 41
38 struct NaClChromeMainArgs *NaClChromeMainArgsCreate(void) { 42 struct NaClChromeMainArgs *NaClChromeMainArgsCreate(void) {
39 struct NaClChromeMainArgs *args = malloc(sizeof(*args)); 43 struct NaClChromeMainArgs *args = malloc(sizeof(*args));
40 if (args == NULL) 44 if (args == NULL)
41 return NULL; 45 return NULL;
42 args->imc_bootstrap_handle = NACL_INVALID_HANDLE; 46 args->imc_bootstrap_handle = NACL_INVALID_HANDLE;
43 args->irt_fd = -1; 47 args->irt_fd = -1;
44 args->enable_exception_handling = 0; 48 args->enable_exception_handling = 0;
45 args->enable_debug_stub = 0; 49 args->enable_debug_stub = 0;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 NaClAddImcHandle(nap, args->imc_bootstrap_handle, export_addr_to); 144 NaClAddImcHandle(nap, args->imc_bootstrap_handle, export_addr_to);
141 145
142 /* 146 /*
143 * in order to report load error to the browser plugin through the 147 * in order to report load error to the browser plugin through the
144 * secure command channel, we do not immediate jump to cleanup code 148 * secure command channel, we do not immediate jump to cleanup code
145 * on error. rather, we continue processing (assuming earlier 149 * on error. rather, we continue processing (assuming earlier
146 * errors do not make it inappropriate) until the secure command 150 * errors do not make it inappropriate) until the secure command
147 * channel is set up, and then bail out. 151 * channel is set up, and then bail out.
148 */ 152 */
149 153
154 #ifdef ADDRESS_SANITIZER
155 __asan_disable_signal_handlers();
Mark Seaborn 2012/04/19 16:16:39 Can you add a comment to explain what this is for,
156 #endif
150 /* 157 /*
151 * Ensure this operating system platform is supported. 158 * Ensure this operating system platform is supported.
152 */ 159 */
153 skip_qualification = getenv("NACL_DANGEROUS_SKIP_QUALIFICATION_TEST") != NULL; 160 skip_qualification = getenv("NACL_DANGEROUS_SKIP_QUALIFICATION_TEST") != NULL;
154 if (skip_qualification) { 161 if (skip_qualification) {
155 fprintf(stderr, "PLATFORM QUALIFICATION DISABLED - " 162 fprintf(stderr, "PLATFORM QUALIFICATION DISABLED - "
156 "Native Client's sandbox will be unreliable!\n"); 163 "Native Client's sandbox will be unreliable!\n");
157 } else { 164 } else {
158 errcode = NACL_FI_VAL("pq", NaClErrorCode, 165 errcode = NACL_FI_VAL("pq", NaClErrorCode,
159 NaClRunSelQualificationTests()); 166 NaClRunSelQualificationTests());
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 if (LOAD_OK != errcode) { 322 if (LOAD_OK != errcode) {
316 NaClBlockIfCommandChannelExists(nap); 323 NaClBlockIfCommandChannelExists(nap);
317 } 324 }
318 325
319 done_ctor: 326 done_ctor:
320 327
321 NaClAllModulesFini(); 328 NaClAllModulesFini();
322 329
323 NaClExit(ret_code); 330 NaClExit(ret_code);
324 } 331 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698