Index: content/gpu/gpu_main.cc |
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc |
index 46549d1dfdaa07a6f0d6786d54c9f07853e451ef..eb6b7cbece0810c969490d86514abc93c68a1226 100644 |
--- a/content/gpu/gpu_main.cc |
+++ b/content/gpu/gpu_main.cc |
@@ -55,6 +55,10 @@ |
#include "base/message_loop/message_pump_mac.h" |
#endif |
+#if defined(ADDRESS_SANITIZER) |
+#include <sanitizer/asan_interface.h> |
+#endif |
+ |
const int kGpuTimeout = 10000; |
namespace content { |
@@ -437,6 +441,14 @@ bool StartSandboxLinux(const gpu::GPUInfo& gpu_info, |
// has really been stopped. |
LinuxSandbox::StopThread(watchdog_thread); |
} |
+ |
+#if defined(ADDRESS_SANITIZER) |
+ LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance(); |
+ linux_sandbox->sanitizer_args()->coverage_sandboxed = 1; |
+ linux_sandbox->sanitizer_args()->coverage_fd = -1; |
+ linux_sandbox->sanitizer_args()->coverage_max_block_size = 0; |
+#endif |
+ |
// LinuxSandbox::InitializeSandbox() must always be called |
// with only one thread. |
res = LinuxSandbox::InitializeSandbox(); |