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

Side by Side Diff: remoting/host/win/entry_point.cc

Issue 2621223003: Fix building ASAN instrumented executables with custom entrypoints (Closed)
Patch Set: nits Created 3 years, 11 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 | « remoting/host/win/BUILD.gn ('k') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include <windows.h> 5 #include <windows.h>
6 6
7 #include "remoting/host/host_main.h" 7 #include "remoting/host/host_main.h"
8 8
9 // The common entry point for remoting_host.exe and remoting_desktop.exe. In 9 // The common entry point for remoting_host.exe and remoting_desktop.exe. In
10 // order to be really small the app doesn't link against the CRT. 10 // order to be really small the app doesn't link against the CRT.
11 void HostEntryPoint() { 11 void HostEntryPoint() {
12 // CommandLine::Init() ignores the passed parameters on Windows, so it is safe 12 // CommandLine::Init() ignores the passed parameters on Windows, so it is safe
13 // to pass nullptr here. 13 // to pass nullptr here.
14 int exit_code = remoting::HostMain(0, nullptr); 14 int exit_code = remoting::HostMain(0, nullptr);
15 ExitProcess(exit_code); 15 ExitProcess(exit_code);
16 } 16 }
17
18 #if defined(ADDRESS_SANITIZER)
19 // Executables instrumented with ASAN need CRT functions. We do not use
20 // the /ENTRY switch for ASAN instrumented executable and a "main" function
21 // is required.
22 int WINAPI wWinMain (HINSTANCE hInstance,
23 HINSTANCE hPrevInstance,
24 LPSTR lpCmdLine,
25 int nCmdShow) {
26 HostEntryPoint();
27 return 0;
28 }
29
30 int wmain() {
31 HostEntryPoint();
32 return 0;
33 }
34 #endif
OLDNEW
« no previous file with comments | « remoting/host/win/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698