OLD | NEW |
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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 443 |
444 WarmUpSandboxNvidia(gpu_info, should_initialize_gl_context); | 444 WarmUpSandboxNvidia(gpu_info, should_initialize_gl_context); |
445 | 445 |
446 if (watchdog_thread) { | 446 if (watchdog_thread) { |
447 // LinuxSandbox needs to be able to ensure that the thread | 447 // LinuxSandbox needs to be able to ensure that the thread |
448 // has really been stopped. | 448 // has really been stopped. |
449 LinuxSandbox::StopThread(watchdog_thread); | 449 LinuxSandbox::StopThread(watchdog_thread); |
450 } | 450 } |
451 | 451 |
452 #if defined(ADDRESS_SANITIZER) | 452 #if defined(ADDRESS_SANITIZER) |
| 453 const std::string sancov_file_name = |
| 454 "gpu." + base::Uint64ToString(base::RandUint64()); |
453 LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance(); | 455 LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance(); |
454 linux_sandbox->sanitizer_args()->coverage_sandboxed = 1; | 456 linux_sandbox->sanitizer_args()->coverage_sandboxed = 1; |
455 linux_sandbox->sanitizer_args()->coverage_fd = -1; | 457 linux_sandbox->sanitizer_args()->coverage_fd = |
| 458 __sanitizer_maybe_open_cov_file(sancov_file_name.c_str()); |
456 linux_sandbox->sanitizer_args()->coverage_max_block_size = 0; | 459 linux_sandbox->sanitizer_args()->coverage_max_block_size = 0; |
457 #endif | 460 #endif |
458 | 461 |
459 // LinuxSandbox::InitializeSandbox() must always be called | 462 // LinuxSandbox::InitializeSandbox() must always be called |
460 // with only one thread. | 463 // with only one thread. |
461 res = LinuxSandbox::InitializeSandbox(); | 464 res = LinuxSandbox::InitializeSandbox(); |
462 if (watchdog_thread) { | 465 if (watchdog_thread) { |
463 watchdog_thread->Start(); | 466 watchdog_thread->Start(); |
464 } | 467 } |
465 | 468 |
(...skipping 14 matching lines...) Expand all Loading... |
480 return true; | 483 return true; |
481 } | 484 } |
482 | 485 |
483 return false; | 486 return false; |
484 } | 487 } |
485 #endif // defined(OS_WIN) | 488 #endif // defined(OS_WIN) |
486 | 489 |
487 } // namespace. | 490 } // namespace. |
488 | 491 |
489 } // namespace content | 492 } // namespace content |
OLD | NEW |