Index: content/gpu/gpu_main.cc |
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc |
index 0dac81d459486c2f04a8a862b9afedc92e47e284..162e83e60e3941ed61d5cfdc0447485701e07ae3 100644 |
--- a/content/gpu/gpu_main.cc |
+++ b/content/gpu/gpu_main.cc |
@@ -51,6 +51,10 @@ |
#include "content/public/common/sandbox_init.h" |
#endif |
+#if defined(ADDRESS_SANITIZER) |
+#include <sanitizer/asan_interface.h> |
+#endif |
+ |
const int kGpuTimeout = 10000; |
namespace content { |
@@ -426,6 +430,18 @@ bool StartSandboxLinux(const gpu::GPUInfo& gpu_info, |
// has really been stopped. |
LinuxSandbox::StopThread(watchdog_thread); |
} |
+ |
+#if defined(ADDRESS_SANITIZER) |
+ LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance(); |
+ struct __sanitizer_sandbox_arguments* sanitizer_args = |
+ new struct __sanitizer_sandbox_arguments; |
+ memset(sanitizer_args, 0, sizeof(*sanitizer_args)); |
jln (very slow on Chromium)
2014/05/13 01:17:35
*sanitizer_args = {0}; instead?
earthdok
2014/05/14 17:00:26
Done.
|
+ sanitizer_args->coverage_sandboxed = 1; |
+ sanitizer_args->coverage_fd = -1; |
+ |
+ linux_sandbox->SetSanitizerArgs(sanitizer_args); |
+#endif |
+ |
// LinuxSandbox::InitializeSandbox() must always be called |
// with only one thread. |
res = LinuxSandbox::InitializeSandbox(); |