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

Side by Side Diff: components/nacl/loader/nacl_helper_linux.cc

Issue 1641003002: [exp] ash: Ash in Mus. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A mini-zygote specifically for Native Client. 5 // A mini-zygote specifically for Native Client.
6 6
7 #include "components/nacl/loader/nacl_helper_linux.h" 7 #include "components/nacl/loader/nacl_helper_linux.h"
8 8
9 #include <errno.h> 9 #include <errno.h>
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 #if defined(ADDRESS_SANITIZER) 406 #if defined(ADDRESS_SANITIZER)
407 // Do not install the SIGSEGV handler in ASan. This should make the NaCl 407 // Do not install the SIGSEGV handler in ASan. This should make the NaCl
408 // platform qualification test pass. 408 // platform qualification test pass.
409 // detect_odr_violation=0: http://crbug.com/376306 409 // detect_odr_violation=0: http://crbug.com/376306
410 static const char kAsanDefaultOptionsNaCl[] = 410 static const char kAsanDefaultOptionsNaCl[] =
411 "handle_segv=0:detect_odr_violation=0"; 411 "handle_segv=0:detect_odr_violation=0";
412 412
413 // Override the default ASan options for the NaCl helper. 413 // Override the default ASan options for the NaCl helper.
414 // __asan_default_options should not be instrumented, because it is called 414 // __asan_default_options should not be instrumented, because it is called
415 // before ASan is initialized. 415 // before ASan is initialized.
416 extern "C" 416 extern "C" __attribute__((no_sanitize_address))
417 __attribute__((no_sanitize_address))
418 // The function isn't referenced from the executable itself. Make sure it isn't 417 // The function isn't referenced from the executable itself. Make sure it isn't
419 // stripped by the linker. 418 // stripped by the linker.
420 __attribute__((used)) 419 __attribute__((used)) __attribute__((visibility("default"))) const char*
421 __attribute__((visibility("default"))) 420 __asan_default_optionsx() {
422 const char* __asan_default_options() {
423 return kAsanDefaultOptionsNaCl; 421 return kAsanDefaultOptionsNaCl;
424 } 422 }
425 #endif 423 #endif
426 424
427 int main(int argc, char* argv[]) { 425 int main(int argc, char* argv[]) {
428 base::CommandLine::Init(argc, argv); 426 base::CommandLine::Init(argc, argv);
429 base::AtExitManager exit_manager; 427 base::AtExitManager exit_manager;
430 base::RandUint64(); // acquire /dev/urandom fd before sandbox is raised 428 base::RandUint64(); // acquire /dev/urandom fd before sandbox is raised
431 429
432 const NaClLoaderSystemInfo system_info = { 430 const NaClLoaderSystemInfo system_info = {
(...skipping 30 matching lines...) Expand all
463 // Now handle requests from the Zygote. 461 // Now handle requests from the Zygote.
464 while (true) { 462 while (true) {
465 bool request_handled = HandleZygoteRequest( 463 bool request_handled = HandleZygoteRequest(
466 kNaClZygoteDescriptor, system_info, nacl_sandbox.get()); 464 kNaClZygoteDescriptor, system_info, nacl_sandbox.get());
467 // Do not turn this into a CHECK() without thinking about robustness 465 // Do not turn this into a CHECK() without thinking about robustness
468 // against malicious IPC requests. 466 // against malicious IPC requests.
469 DCHECK(request_handled); 467 DCHECK(request_handled);
470 } 468 }
471 NOTREACHED(); 469 NOTREACHED();
472 } 470 }
OLDNEW
« no previous file with comments | « components/mus/ws/window_finder.cc ('k') | mash/browser_driver/browser_driver_application_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698