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

Unified Diff: content/zygote/zygote_main_linux.cc

Issue 868893004: Replace the asan_coverage GYP flag with sanitizer_coverage which is to be used with other sanitizer… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« build/common.gypi ('K') | « content/zygote/zygote_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/zygote/zygote_main_linux.cc
diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc
index 8f89580d42f6ed7a97b86e0e8651acf0905675a5..621455921b49afab479c447d3c7c12d49b3b48ed 100644
--- a/content/zygote/zygote_main_linux.cc
+++ b/content/zygote/zygote_main_linux.cc
@@ -62,8 +62,8 @@
#include "third_party/libjingle/overrides/init_webrtc.h"
#endif
-#if defined(ADDRESS_SANITIZER)
-#include <sanitizer/asan_interface.h>
+#if defined(SANITIZER_COVERAGE)
+#include <sanitizer/common_interface_defs.h>
#endif
namespace content {
@@ -470,7 +470,7 @@ static bool EnterSuidSandbox(sandbox::SetuidSandboxClient* setuid_sandbox,
return true;
}
-#if defined(ADDRESS_SANITIZER)
+#if defined(SANITIZER_COVERAGE)
const size_t kSanitizerMaxMessageLength = 1 * 1024 * 1024;
// A helper process which collects code coverage data from the renderers over a
@@ -524,7 +524,7 @@ static pid_t ForkSanitizerCoverageHelper(
}
}
-#endif // defined(ADDRESS_SANITIZER)
+#endif // defined(SANITIZER_COVERAGE)
// If |is_suid_sandbox_child|, then make sure that the setuid sandbox is
// engaged.
@@ -558,7 +558,7 @@ bool ZygoteMain(const MainFunctionParams& params,
LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance();
-#if defined(ADDRESS_SANITIZER)
+#if defined(SANITIZER_COVERAGE)
const std::string sancov_file_name =
"zygote." + base::Uint64ToString(base::RandUint64());
base::ScopedFD sancov_file_fd(
@@ -574,7 +574,7 @@ bool ZygoteMain(const MainFunctionParams& params,
// sure the init process does not hold on to it.
fds_to_close_post_fork.push_back(sancov_socket_fds[0]);
fds_to_close_post_fork.push_back(sancov_socket_fds[1]);
-#endif
+#endif // SANITIZER_COVERAGE
// Skip pre-initializing sandbox under --no-sandbox for crbug.com/444900.
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -621,7 +621,7 @@ bool ZygoteMain(const MainFunctionParams& params,
std::vector<pid_t> extra_children;
std::vector<int> extra_fds;
-#if defined(ADDRESS_SANITIZER)
+#if defined(SANITIZER_COVERAGE)
pid_t sancov_helper_pid = ForkSanitizerCoverageHelper(
sancov_socket_fds[0], sancov_socket_fds[1], sancov_file_fd.Pass(),
sandbox_fds_to_close_post_fork);
@@ -634,7 +634,7 @@ bool ZygoteMain(const MainFunctionParams& params,
// from the zygote. We must keep it open until the very end of the zygote's
// lifetime, even though we don't explicitly use it.
extra_fds.push_back(sancov_socket_fds[1]);
-#endif
+#endif // SANITIZER_COVERAGE
int sandbox_flags = linux_sandbox->GetStatus();
bool setuid_sandbox_engaged = sandbox_flags & kSandboxLinuxSUID;
« build/common.gypi ('K') | « content/zygote/zygote_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698