Commit f9f5c936 authored by earthdok@chromium.org's avatar earthdok@chromium.org

Remove conflicting function declaration.

We used to declare sanitizer interface functions explicitly because we didn't
have access to sanitizer interface headers. That has not been the case for a
while. Also, a recent clang roll changed the signature of
__sanitizer_sandbox_on_notify() causing conflicts with our own declaration.

BUG=none
TBR=jln@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/294093012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272885 0039d316-1c4b-4281-b951-d872f2087c98
parent 043ed6e4
...@@ -34,6 +34,11 @@ ...@@ -34,6 +34,11 @@
#include "sandbox/linux/services/yama.h" #include "sandbox/linux/services/yama.h"
#include "sandbox/linux/suid/client/setuid_sandbox_client.h" #include "sandbox/linux/suid/client/setuid_sandbox_client.h"
#if (defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \
defined(LEAK_SANITIZER))
#include <sanitizer/common_interface_defs.h>
#endif
using sandbox::Yama; using sandbox::Yama;
namespace { namespace {
...@@ -124,12 +129,6 @@ LinuxSandbox* LinuxSandbox::GetInstance() { ...@@ -124,12 +129,6 @@ LinuxSandbox* LinuxSandbox::GetInstance() {
return instance; return instance;
} }
#if (defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \
defined(LEAK_SANITIZER)) && defined(OS_LINUX)
// Sanitizer API call to notify the tool the sandbox is going to be turned on.
extern "C" void __sanitizer_sandbox_on_notify(void *reserved);
#endif
void LinuxSandbox::PreinitializeSandbox() { void LinuxSandbox::PreinitializeSandbox() {
CHECK(!pre_initialized_); CHECK(!pre_initialized_);
seccomp_bpf_supported_ = false; seccomp_bpf_supported_ = false;
...@@ -137,7 +136,7 @@ void LinuxSandbox::PreinitializeSandbox() { ...@@ -137,7 +136,7 @@ void LinuxSandbox::PreinitializeSandbox() {
defined(LEAK_SANITIZER)) && defined(OS_LINUX) defined(LEAK_SANITIZER)) && defined(OS_LINUX)
// Sanitizers need to open some resources before the sandbox is enabled. // Sanitizers need to open some resources before the sandbox is enabled.
// This should not fork, not launch threads, not open a directory. // This should not fork, not launch threads, not open a directory.
__sanitizer_sandbox_on_notify(/*reserved*/ NULL); __sanitizer_sandbox_on_notify(/*args*/ NULL);
#endif #endif
#if !defined(NDEBUG) #if !defined(NDEBUG)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment