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

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

Issue 229973003: Move '#include <string.h>' into '#if defined(ADDRESS_SANITIZER)' block. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // The entry point for all Mac Chromium processes, including the outer app 5 // The entry point for all Mac Chromium processes, including the outer app
6 // bundle (browser) and helper app (renderer, plugin, and friends). 6 // bundle (browser) and helper app (renderer, plugin, and friends).
7 7
8 #if defined(ADDRESS_SANITIZER) 8 #if defined(ADDRESS_SANITIZER)
9 #include <crt_externs.h> // for _NSGetArgc, _NSGetArgv 9 #include <crt_externs.h> // for _NSGetArgc, _NSGetArgv
10 #include <string.h>
10 #endif // ADDRESS_SANITIZER 11 #endif // ADDRESS_SANITIZER
11 #include <stdlib.h> 12 #include <stdlib.h>
12 #include <string.h>
13 13
14 #if defined(ADDRESS_SANITIZER) 14 #if defined(ADDRESS_SANITIZER)
15 // NaCl requires its own SEGV handler, so we need to add handle_segv=0 to 15 // NaCl requires its own SEGV handler, so we need to add handle_segv=0 to
16 // ASAN_OPTIONS. This is done by injecting __asan_default_options into the 16 // ASAN_OPTIONS. This is done by injecting __asan_default_options into the
17 // executable. 17 // executable.
18 // Because there's no distinct NaCl executable on OSX, we have to look at the 18 // Because there's no distinct NaCl executable on OSX, we have to look at the
19 // command line arguments to understand whether the process is a NaCl loader. 19 // command line arguments to understand whether the process is a NaCl loader.
20 20
21 static const char kNaClDefaultOptions[] = "handle_segv=0"; 21 static const char kNaClDefaultOptions[] = "handle_segv=0";
22 static const char kNaClFlag[] = "--type=nacl-loader"; 22 static const char kNaClFlag[] = "--type=nacl-loader";
(...skipping 26 matching lines...) Expand all
49 } // extern "C" 49 } // extern "C"
50 50
51 __attribute__((visibility("default"))) 51 __attribute__((visibility("default")))
52 int main(int argc, char* argv[]) { 52 int main(int argc, char* argv[]) {
53 int rv = ChromeMain(argc, argv); 53 int rv = ChromeMain(argc, argv);
54 54
55 // exit, don't return from main, to avoid the apparent removal of main from 55 // exit, don't return from main, to avoid the apparent removal of main from
56 // stack backtraces under tail call optimization. 56 // stack backtraces under tail call optimization.
57 exit(rv); 57 exit(rv);
58 } 58 }
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