From 5553de265e16ce8e9960329a4dc3d609872dd236 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Thu, 15 Feb 2024 12:57:35 -0800 Subject: [PATCH] Verify more than one message set entities. PiperOrigin-RevId: 607427370 --- src/google/protobuf/extension_set_heavy.cc | 1 + src/google/protobuf/extension_set_unittest.cc | 3 +++ src/google/protobuf/fully_verify_message_sets_opt_out.cc | 9 +++++++++ 3 files changed, 13 insertions(+) create mode 100644 src/google/protobuf/fully_verify_message_sets_opt_out.cc diff --git a/src/google/protobuf/extension_set_heavy.cc b/src/google/protobuf/extension_set_heavy.cc index ef3a794809..69568b0d5c 100644 --- a/src/google/protobuf/extension_set_heavy.cc +++ b/src/google/protobuf/extension_set_heavy.cc @@ -16,6 +16,7 @@ #include #include +#include "absl/base/attributes.h" #include "absl/log/absl_check.h" #include "google/protobuf/arena.h" #include "google/protobuf/descriptor.h" diff --git a/src/google/protobuf/extension_set_unittest.cc b/src/google/protobuf/extension_set_unittest.cc index cb969896a5..35a8038ec5 100644 --- a/src/google/protobuf/extension_set_unittest.cc +++ b/src/google/protobuf/extension_set_unittest.cc @@ -44,6 +44,9 @@ namespace protobuf { namespace internal { + +extern bool fully_verify_message_sets_opt_out; + namespace { using ::google::protobuf::internal::DownCast; diff --git a/src/google/protobuf/fully_verify_message_sets_opt_out.cc b/src/google/protobuf/fully_verify_message_sets_opt_out.cc new file mode 100644 index 0000000000..c2c53dadf1 --- /dev/null +++ b/src/google/protobuf/fully_verify_message_sets_opt_out.cc @@ -0,0 +1,9 @@ +namespace google { +namespace protobuf { +namespace internal { + +bool fully_verify_message_sets_opt_out = true; + +} // namespace internal +} // namespace protobuf +} // namespace google