diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 16fa71612e5af..479cbf6f3926f 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -150,12 +150,12 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "Abseil", project_desc = "Open source collection of C++ libraries drawn from the most fundamental pieces of Google’s internal codebase", project_url = "https://abseil.io/", - version = "8317b9a01cbc32594ad4bf971709c97cb13ec921", - sha256 = "f772811a2d5dff79da54e24d6d4f5f5bc06d49e4d4ef4107f74a6c361edada99", + version = "9bff2a9302a8dbf91712fc215eb2e2cf8ec234e7", + sha256 = "ae959138730b55b3fb968d3c357e740e7ffdeab4648dc3eb28843a1e9fa56b57", strip_prefix = "abseil-cpp-{version}", urls = ["https://github.com/abseil/abseil-cpp/archive/{version}.tar.gz"], use_category = ["dataplane_core", "controlplane"], - release_date = "2022-10-06", + release_date = "2022-12-07", cpe = "N/A", license = "Apache-2.0", license_url = "https://github.com/abseil/abseil-cpp/blob/{version}/LICENSE", diff --git a/mobile/bazel/abseil.patch b/mobile/bazel/abseil.patch deleted file mode 100644 index 51bd90fa6e232..0000000000000 --- a/mobile/bazel/abseil.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- absl/time/internal/cctz/BUILD.bazel -+++ absl/time/internal/cctz/BUILD.bazel -@@ -76,7 +76,7 @@ cc_library( - ], - linkopts = select({ - ":osx": [ -- "-framework Foundation", -+ # "-framework Foundation", - ], - ":ios": [ - "-framework Foundation", diff --git a/mobile/bazel/envoy_mobile_repositories.bzl b/mobile/bazel/envoy_mobile_repositories.bzl index f53eaaeb3d699..9f0223cb45e90 100644 --- a/mobile/bazel/envoy_mobile_repositories.bzl +++ b/mobile/bazel/envoy_mobile_repositories.bzl @@ -38,19 +38,6 @@ def upstream_envoy_overrides(): build_file_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])""", ) - # Patch upstream Abseil to prevent Foundation dependency from leaking into Android builds. - # Workaround for https://github.com/abseil/abseil-cpp/issues/326. - # TODO: Should be removed in https://github.com/envoyproxy/envoy-mobile/issues/136 once rules_android - # supports platform toolchains. - http_archive( - name = "com_google_absl", - patches = ["@envoy_mobile//bazel:abseil.patch"], - sha256 = "3a0bb3d2e6f53352526a8d1a7e7b5749c68cd07f2401766a404fb00d2853fa49", - strip_prefix = "abseil-cpp-4bbdb026899fea9f882a95cbd7d6a4adaf49b2dd", - # 2022-07-05 - urls = ["https://github.com/abseil/abseil-cpp/archive/4bbdb026899fea9f882a95cbd7d6a4adaf49b2dd.tar.gz"], - ) - # This should be kept in sync with Envoy itself, we just need to apply this patch # Remove this once https://boringssl-review.googlesource.com/c/boringssl/+/37804 is in master-with-bazel http_archive( diff --git a/source/common/http/status.cc b/source/common/http/status.cc index 2ce7e3318253e..c3500fcae9f9d 100644 --- a/source/common/http/status.cc +++ b/source/common/http/status.cc @@ -41,7 +41,10 @@ struct PrematureResponsePayload : public EnvoyStatusPayload { }; template void storePayload(absl::Status& status, const T& payload) { - absl::Cord cord(absl::string_view(reinterpret_cast(&payload), sizeof(payload))); + const T* allocated = new T(payload); + const absl::string_view sv = + absl::string_view(reinterpret_cast(allocated), sizeof(allocated)); + absl::Cord cord = absl::MakeCordFromExternal(sv, [allocated]() { delete allocated; }); cord.Flatten(); // Flatten ahead of time for easier access later. status.SetPayload(EnvoyPayloadUrl, std::move(cord)); }