Chromium Code Reviews| Index: content/common/sandbox_linux/sandbox_linux.h |
| diff --git a/content/common/sandbox_linux/sandbox_linux.h b/content/common/sandbox_linux/sandbox_linux.h |
| index 4f0a680d79eacf6e6481f0900851f520968ec323..2d33023cb3e9856eda169a8b62baa9258cafa252 100644 |
| --- a/content/common/sandbox_linux/sandbox_linux.h |
| +++ b/content/common/sandbox_linux/sandbox_linux.h |
| @@ -11,6 +11,11 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "content/public/common/sandbox_linux.h" |
| +#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \ |
| + defined(LEAK_SANITIZER) |
| +#include <sanitizer/common_interface_defs.h> |
| +#endif |
| + |
| template <typename T> struct DefaultSingletonTraits; |
| namespace base { |
| class Thread; |
| @@ -82,6 +87,13 @@ class LinuxSandbox { |
| // to make some vulnerabilities harder to exploit. |
| bool LimitAddressSpace(const std::string& process_type); |
| +#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \ |
| + defined(LEAK_SANITIZER) |
| + __sanitizer_sandbox_arguments* sanitizer_args() const { |
|
jln (very slow on Chromium)
2014/05/14 17:49:41
Since this is a scoped_ptr and we're not doing a t
|
| + return sanitizer_args_.get(); |
| + }; |
| +#endif |
| + |
| private: |
| friend struct DefaultSingletonTraits<LinuxSandbox>; |
| @@ -117,6 +129,10 @@ class LinuxSandbox { |
| bool seccomp_bpf_supported_; // Accurate if pre_initialized_. |
| bool yama_is_enforcing_; // Accurate if pre_initialized_. |
| scoped_ptr<sandbox::SetuidSandboxClient> setuid_sandbox_client_; |
| +#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \ |
| + defined(LEAK_SANITIZER) |
| + scoped_ptr<__sanitizer_sandbox_arguments> sanitizer_args_; |
| +#endif |
| ~LinuxSandbox(); |
| DISALLOW_IMPLICIT_CONSTRUCTORS(LinuxSandbox); |