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 std::stringstream ss; | |
454 ss << "gpu." << base::RandUint64(); | |
455 std::string sancov_file_name = ss.str(); | |
jln (very slow on Chromium)
2014/06/03 21:43:40
please do:
const std::string sancov_file_name = "
earthdok
2014/06/03 21:49:27
Done.
| |
453 LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance(); | 456 LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance(); |
454 linux_sandbox->sanitizer_args()->coverage_sandboxed = 1; | 457 linux_sandbox->sanitizer_args()->coverage_sandboxed = 1; |
455 linux_sandbox->sanitizer_args()->coverage_fd = -1; | 458 linux_sandbox->sanitizer_args()->coverage_fd = |
459 __sanitizer_maybe_open_cov_file(sancov_file_name.c_str()); | |
456 linux_sandbox->sanitizer_args()->coverage_max_block_size = 0; | 460 linux_sandbox->sanitizer_args()->coverage_max_block_size = 0; |
457 #endif | 461 #endif |
458 | 462 |
459 // LinuxSandbox::InitializeSandbox() must always be called | 463 // LinuxSandbox::InitializeSandbox() must always be called |
460 // with only one thread. | 464 // with only one thread. |
461 res = LinuxSandbox::InitializeSandbox(); | 465 res = LinuxSandbox::InitializeSandbox(); |
462 if (watchdog_thread) { | 466 if (watchdog_thread) { |
463 watchdog_thread->Start(); | 467 watchdog_thread->Start(); |
464 } | 468 } |
465 | 469 |
(...skipping 14 matching lines...) Expand all Loading... | |
480 return true; | 484 return true; |
481 } | 485 } |
482 | 486 |
483 return false; | 487 return false; |
484 } | 488 } |
485 #endif // defined(OS_WIN) | 489 #endif // defined(OS_WIN) |
486 | 490 |
487 } // namespace. | 491 } // namespace. |
488 | 492 |
489 } // namespace content | 493 } // namespace content |
OLD | NEW |