summaryrefslogtreecommitdiff
path: root/absl/base
diff options
context:
space:
mode:
authorGravatar Dave MacLachlan <dmaclach@google.com>2023-03-16 09:24:51 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-03-16 09:26:35 -0700
commit3853b482ca84f78c50e8024d0d7861d949de5daa (patch)
treeda731351813069501e4641902322a4d040884615 /absl/base
parent50a9e2b27ee7144c306c0d8b40290e131c7f1b34 (diff)
Define ABSL_HAVE_DATAFLOW_SANITIZER
PiperOrigin-RevId: 517142676 Change-Id: If50a1bf5f92da166d6b4923110ec8b25446b6b11
Diffstat (limited to 'absl/base')
-rw-r--r--absl/base/config.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/absl/base/config.h b/absl/base/config.h
index 2929aa15..3c2f60c1 100644
--- a/absl/base/config.h
+++ b/absl/base/config.h
@@ -799,6 +799,20 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
#define ABSL_HAVE_HWADDRESS_SANITIZER 1
#endif
+// ABSL_HAVE_DATAFLOW_SANITIZER
+//
+// Dataflow Sanitizer (or DFSAN) is a generalised dynamic data flow analysis.
+#ifdef ABSL_HAVE_DATAFLOW_SANITIZER
+#error "ABSL_HAVE_DATAFLOW_SANITIZER cannot be directly set."
+#elif defined(DATAFLOW_SANITIZER)
+// GCC provides no method for detecting the presence of the standalone
+// DataFlowSanitizer (-fsanitize=dataflow), so GCC users of -fsanitize=dataflow
+// should also use -DDATAFLOW_SANITIZER.
+#define ABSL_HAVE_DATAFLOW_SANITIZER 1
+#elif ABSL_HAVE_FEATURE(dataflow_sanitizer)
+#define ABSL_HAVE_DATAFLOW_SANITIZER 1
+#endif
+
// ABSL_HAVE_LEAK_SANITIZER
//
// LeakSanitizer (or lsan) is a detector of memory leaks.
@@ -813,7 +827,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
#ifdef ABSL_HAVE_LEAK_SANITIZER
#error "ABSL_HAVE_LEAK_SANITIZER cannot be directly set."
#elif defined(LEAK_SANITIZER)
-// GCC provides no method for detecting the presense of the standalone
+// GCC provides no method for detecting the presence of the standalone
// LeakSanitizer (-fsanitize=leak), so GCC users of -fsanitize=leak should also
// use -DLEAK_SANITIZER.
#define ABSL_HAVE_LEAK_SANITIZER 1