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

Unified Diff: content/gpu/gpu_main.cc

Issue 280303002: Add sandbox support for AsanCoverage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: helper exits on 0 bytes received, zygote waits on it Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/gpu/gpu_main.cc
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 8974994f94b23240c5a5b51a90af3c639414c7f0..db39df6b0853cc147a6ed2d4f748670a0cfa4d88 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -56,6 +56,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 {
@@ -444,6 +448,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();

Powered by Google App Engine
This is Rietveld 408576698