xref: /aosp_15_r20/external/cronet/third_party/abseil-cpp/patches/0001-Turn-on-hardened-mode.patch (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
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 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 to the STL
10version of variant is tracked by https://crbug.com/1373620.
11---
12 third_party/abseil-cpp/absl/base/options.h | 10 +++++-----
13 1 file changed, 5 insertions(+), 5 deletions(-)
14
15diff --git a/third_party/abseil-cpp/absl/base/options.h b/third_party/abseil-cpp/absl/base/options.h
16index 230bf1eecc4a4..1641271cd3ff9 100644
17--- a/third_party/abseil-cpp/absl/base/options.h
18+++ b/third_party/abseil-cpp/absl/base/options.h
19@@ -180,7 +180,7 @@
20 // absl::variant is a typedef of std::variant, use the feature macro
21 // ABSL_USES_STD_VARIANT.
22
23-#define ABSL_OPTION_USE_STD_VARIANT 2
24+#define ABSL_OPTION_USE_STD_VARIANT 0
25
26
27 // ABSL_OPTION_USE_INLINE_NAMESPACE
28@@ -233,6 +233,6 @@
29 // checks enabled by this option may abort the program in a different way and
30 // log additional information when `NDEBUG` is not defined.
31
32-#define ABSL_OPTION_HARDENED 0
33+#define ABSL_OPTION_HARDENED 1
34
35 #endif  // ABSL_BASE_OPTIONS_H_
36--
372.33.0.882.g93a45727a2-goog
38