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

Side by Side Diff: content/gpu/gpu_main.cc

Issue 868893004: Replace the asan_coverage GYP flag with sanitizer_coverage which is to be used with other sanitizer… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <dwmapi.h> 8 #include <dwmapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 #if defined(OS_LINUX) 52 #if defined(OS_LINUX)
53 #include "content/public/common/sandbox_init.h" 53 #include "content/public/common/sandbox_init.h"
54 #endif 54 #endif
55 55
56 #if defined(OS_MACOSX) 56 #if defined(OS_MACOSX)
57 #include "base/message_loop/message_pump_mac.h" 57 #include "base/message_loop/message_pump_mac.h"
58 #include "content/common/sandbox_mac.h" 58 #include "content/common/sandbox_mac.h"
59 #endif 59 #endif
60 60
61 #if defined(ADDRESS_SANITIZER) 61 #if defined(SANITIZER_COVERAGE)
62 #include <sanitizer/asan_interface.h> 62 #include <sanitizer/common_interface_defs.h>
63 #endif 63 #endif
64 64
65 const int kGpuTimeout = 10000; 65 const int kGpuTimeout = 10000;
66 66
67 namespace content { 67 namespace content {
68 68
69 namespace { 69 namespace {
70 70
71 void GetGpuInfoFromCommandLine(gpu::GPUInfo& gpu_info, 71 void GetGpuInfoFromCommandLine(gpu::GPUInfo& gpu_info,
72 const base::CommandLine& command_line); 72 const base::CommandLine& command_line);
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 bool res = false; 482 bool res = false;
483 483
484 WarmUpSandboxNvidia(gpu_info, should_initialize_gl_context); 484 WarmUpSandboxNvidia(gpu_info, should_initialize_gl_context);
485 485
486 if (watchdog_thread) { 486 if (watchdog_thread) {
487 // LinuxSandbox needs to be able to ensure that the thread 487 // LinuxSandbox needs to be able to ensure that the thread
488 // has really been stopped. 488 // has really been stopped.
489 LinuxSandbox::StopThread(watchdog_thread); 489 LinuxSandbox::StopThread(watchdog_thread);
490 } 490 }
491 491
492 #if defined(ADDRESS_SANITIZER) 492 #if defined(SANITIZER_COVERAGE)
493 const std::string sancov_file_name = 493 const std::string sancov_file_name =
494 "gpu." + base::Uint64ToString(base::RandUint64()); 494 "gpu." + base::Uint64ToString(base::RandUint64());
495 LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance(); 495 LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance();
496 linux_sandbox->sanitizer_args()->coverage_sandboxed = 1; 496 linux_sandbox->sanitizer_args()->coverage_sandboxed = 1;
497 linux_sandbox->sanitizer_args()->coverage_fd = 497 linux_sandbox->sanitizer_args()->coverage_fd =
498 __sanitizer_maybe_open_cov_file(sancov_file_name.c_str()); 498 __sanitizer_maybe_open_cov_file(sancov_file_name.c_str());
499 linux_sandbox->sanitizer_args()->coverage_max_block_size = 0; 499 linux_sandbox->sanitizer_args()->coverage_max_block_size = 0;
500 #endif 500 #endif
501 501
502 // LinuxSandbox::InitializeSandbox() must always be called 502 // LinuxSandbox::InitializeSandbox() must always be called
(...skipping 22 matching lines...) Expand all
525 return true; 525 return true;
526 } 526 }
527 527
528 return false; 528 return false;
529 } 529 }
530 #endif // defined(OS_WIN) 530 #endif // defined(OS_WIN)
531 531
532 } // namespace. 532 } // namespace.
533 533
534 } // namespace content 534 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698