1From 15f51edf989cc47588c3d8635a62c255cdeb0072 Mon Sep 17 00:00:00 2001 2From: Daniel Cheng <[email protected]> 3Date: Wed, 6 Oct 2021 03:23:23 -0700 4Subject: [PATCH] Turn on hardened mode and alias absl types to STL types.. 5 6The absl implementations contain various hardening checks that are 7sometimes simply UB as defined by the standard, and thus, as 8implemented by STL. 9--- 10 third_party/abseil-cpp/absl/base/options.h | 10 +++++----- 11 1 file changed, 5 insertions(+), 5 deletions(-) 12 13diff --git a/third_party/abseil-cpp/absl/base/options.h b/third_party/abseil-cpp/absl/base/options.h 14index 230bf1eecc4a4..1641271cd3ff9 100644 15--- a/third_party/abseil-cpp/absl/base/options.h 16+++ b/third_party/abseil-cpp/absl/base/options.h 17@@ -100,7 +100,7 @@ 18 // User code should not inspect this macro. To check in the preprocessor if 19 // absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY. 20 21-#define ABSL_OPTION_USE_STD_ANY 2 22+#define ABSL_OPTION_USE_STD_ANY 0 23 24 25 // ABSL_OPTION_USE_STD_OPTIONAL 26@@ -127,7 +127,7 @@ 27 // absl::optional is a typedef of std::optional, use the feature macro 28 // ABSL_USES_STD_OPTIONAL. 29 30-#define ABSL_OPTION_USE_STD_OPTIONAL 2 31+#define ABSL_OPTION_USE_STD_OPTIONAL 0 32 33 34 // ABSL_OPTION_USE_STD_STRING_VIEW 35@@ -154,7 +154,7 @@ 36 // absl::string_view is a typedef of std::string_view, use the feature macro 37 // ABSL_USES_STD_STRING_VIEW. 38 39-#define ABSL_OPTION_USE_STD_STRING_VIEW 2 40+#define ABSL_OPTION_USE_STD_STRING_VIEW 0 41 42 // ABSL_OPTION_USE_STD_VARIANT 43 // 44@@ -180,7 +180,7 @@ 45 // absl::variant is a typedef of std::variant, use the feature macro 46 // ABSL_USES_STD_VARIANT. 47 48-#define ABSL_OPTION_USE_STD_VARIANT 2 49+#define ABSL_OPTION_USE_STD_VARIANT 0 50 51 52 // ABSL_OPTION_USE_INLINE_NAMESPACE 53@@ -233,6 +233,6 @@ 54 // checks enabled by this option may abort the program in a different way and 55 // log additional information when `NDEBUG` is not defined. 56 57-#define ABSL_OPTION_HARDENED 0 58+#define ABSL_OPTION_HARDENED 1 59 60 #endif // ABSL_BASE_OPTIONS_H_ 61-- 622.33.0.882.g93a45727a2-goog 63 64