• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 15f51edf989cc47588c3d8635a62c255cdeb0072 Mon Sep 17 00:00:00 2001
2From: Daniel Cheng <dcheng@chromium.org>
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 where the
7standard is UB. At the time, libc++ lacked corresponding hardening
8checks, so we forced the use of absl types. As of
9https://crbug.com/1335422, this is no longer true. Switching so the STL
10versions of optional and variant is tracked by https://crbug.com/1373619 and
11https://crbug.com/1373620, respectively.
12---
13 third_party/abseil-cpp/absl/base/options.h | 10 +++++-----
14 1 file changed, 5 insertions(+), 5 deletions(-)
15
16diff --git a/third_party/abseil-cpp/absl/base/options.h b/third_party/abseil-cpp/absl/base/options.h
17index 230bf1eecc4a4..1641271cd3ff9 100644
18--- a/third_party/abseil-cpp/absl/base/options.h
19+++ b/third_party/abseil-cpp/absl/base/options.h
20@@ -127,7 +127,7 @@
21 // absl::optional is a typedef of std::optional, use the feature macro
22 // ABSL_USES_STD_OPTIONAL.
23
24-#define ABSL_OPTION_USE_STD_OPTIONAL 2
25+#define ABSL_OPTION_USE_STD_OPTIONAL 0
26
27
28 // ABSL_OPTION_USE_STD_STRING_VIEW
29@@ -180,7 +180,7 @@
30 // absl::variant is a typedef of std::variant, use the feature macro
31 // ABSL_USES_STD_VARIANT.
32
33-#define ABSL_OPTION_USE_STD_VARIANT 2
34+#define ABSL_OPTION_USE_STD_VARIANT 0
35
36
37 // ABSL_OPTION_USE_INLINE_NAMESPACE
38@@ -233,6 +233,6 @@
39 // checks enabled by this option may abort the program in a different way and
40 // log additional information when `NDEBUG` is not defined.
41
42-#define ABSL_OPTION_HARDENED 0
43+#define ABSL_OPTION_HARDENED 1
44
45 #endif  // ABSL_BASE_OPTIONS_H_
46--
472.33.0.882.g93a45727a2-goog
48
49