diff options
-rw-r--r-- | content/gpu/gpu_main.cc | 5 | ||||
-rw-r--r-- | content/zygote/zygote_main_linux.cc | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc index 7cfd446..894c648 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -450,9 +450,12 @@ bool StartSandboxLinux(const gpu::GPUInfo& gpu_info, } #if defined(ADDRESS_SANITIZER) + const std::string sancov_file_name = + "gpu." + base::Uint64ToString(base::RandUint64()); LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance(); linux_sandbox->sanitizer_args()->coverage_sandboxed = 1; - linux_sandbox->sanitizer_args()->coverage_fd = -1; + linux_sandbox->sanitizer_args()->coverage_fd = + __sanitizer_maybe_open_cov_file(sancov_file_name.c_str()); linux_sandbox->sanitizer_args()->coverage_max_block_size = 0; #endif diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc index bae8609..60f08b6 100644 --- a/content/zygote/zygote_main_linux.cc +++ b/content/zygote/zygote_main_linux.cc @@ -22,6 +22,7 @@ #include "base/posix/eintr_wrapper.h" #include "base/posix/unix_domain_socket_linux.h" #include "base/rand_util.h" +#include "base/strings/string_number_conversions.h" #include "base/sys_info.h" #include "build/build_config.h" #include "content/common/child_process_sandbox_support_impl_linux.h" @@ -496,7 +497,10 @@ bool ZygoteMain(const MainFunctionParams& params, LinuxSandbox* linux_sandbox = LinuxSandbox::GetInstance(); #if defined(ADDRESS_SANITIZER) - base::ScopedFD sancov_file_fd(__sanitizer_maybe_open_cov_file("zygote")); + const std::string sancov_file_name = + "zygote." + base::Uint64ToString(base::RandUint64()); + base::ScopedFD sancov_file_fd( + __sanitizer_maybe_open_cov_file(sancov_file_name.c_str())); int sancov_socket_fds[2] = {-1, -1}; CreateSanitizerCoverageSocketPair(sancov_socket_fds); linux_sandbox->sanitizer_args()->coverage_sandboxed = 1; |