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

Side by Side Diff: chrome/app/chrome_exe_main_gtk.cc

Issue 10823038: Set the default ASan options for the Official Chrome build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
« 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "build/build_config.h" 5 #include "build/build_config.h"
6 #include "chrome/browser/first_run/upgrade_util.h" 6 #include "chrome/browser/first_run/upgrade_util.h"
7 7
8 // The entry point for all invocations of Chromium, browser and renderer. On 8 // The entry point for all invocations of Chromium, browser and renderer. On
9 // windows, this does nothing but load chrome.dll and invoke its entry point in 9 // windows, this does nothing but load chrome.dll and invoke its entry point in
10 // order to make it easy to update the app from GoogleUpdate. We don't need 10 // order to make it easy to update the app from GoogleUpdate. We don't need
11 // that extra layer with on linux. 11 // that extra layer with on linux.
12 12
13 #if defined(ADDRESS_SANITIZER) && defined(GOOGLE_CHROME_BUILD)
14 const char *kAsanDefaultOptions = "quarantine_size=1048576";
15
16 // Override the default ASan options for the Google Chrome executable.
17 // __asan_default_options should not be instrumented, because it is called
18 // before ASan is initialized.
19 extern "C"
20 __attribute__((no_address_safety_analysis))
21 const char *__asan_default_options() {
22 return kAsanDefaultOptions;
23 }
24 #endif
25
13 extern "C" { 26 extern "C" {
14 int ChromeMain(int argc, const char** argv); 27 int ChromeMain(int argc, const char** argv);
15 } 28 }
16 29
17 int main(int argc, const char** argv) { 30 int main(int argc, const char** argv) {
18 int return_code = ChromeMain(argc, argv); 31 int return_code = ChromeMain(argc, argv);
19 32
20 #if defined(OS_LINUX) 33 #if defined(OS_LINUX)
21 // Launch a new instance if we're shutting down because we detected an 34 // Launch a new instance if we're shutting down because we detected an
22 // upgrade in the persistent mode. 35 // upgrade in the persistent mode.
23 upgrade_util::RelaunchChromeBrowserWithNewCommandLineIfNeeded(); 36 upgrade_util::RelaunchChromeBrowserWithNewCommandLineIfNeeded();
24 #endif 37 #endif
25 38
26 return return_code; 39 return return_code;
27 } 40 }
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