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

Unified Diff: content/common/sandbox_linux/sandbox_linux.h

Issue 280303002: Add sandbox support for AsanCoverage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address remaining comments 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/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 8ff42dfc885302dded01e24d1f31f167dc794661..d42fde349ca7436de5ada2918be5e952a29255f9 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 {
+ return sanitizer_args_.get();
+ };
+#endif
+
private:
friend struct DefaultSingletonTraits<LinuxSandbox>;
@@ -120,6 +132,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
DISALLOW_COPY_AND_ASSIGN(LinuxSandbox);
};
« no previous file with comments | « no previous file | content/common/sandbox_linux/sandbox_linux.cc » ('j') | content/common/sandbox_linux/sandbox_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698