diff --git a/api/tools/data/tap2pcap_h2_ipv4.txt b/api/tools/data/tap2pcap_h2_ipv4.txt index f46bd469b8ca..ac8785ac1e49 100644 --- a/api/tools/data/tap2pcap_h2_ipv4.txt +++ b/api/tools/data/tap2pcap_h2_ipv4.txt @@ -1,6 +1,6 @@ 1 0.000000 127.0.0.1 → 127.0.0.1 HTTP2 157 Magic, SETTINGS[0], WINDOW_UPDATE[0], HEADERS[1]: GET / 2 0.013713 127.0.0.1 → 127.0.0.1 HTTP2 91 SETTINGS[0], SETTINGS[0], WINDOW_UPDATE[0] - 3 0.013820 127.0.0.1 → 127.0.0.1 HTTP2 63 SETTINGS[0] + 3 0.013821 127.0.0.1 → 127.0.0.1 HTTP2 63 SETTINGS[0] 4 0.128649 127.0.0.1 → 127.0.0.1 HTTP2 5586 HEADERS[1]: 200 OK - 5 0.130006 127.0.0.1 → 127.0.0.1 HTTP2 7573 DATA[1] - 6 0.131044 127.0.0.1 → 127.0.0.1 HTTP2 3152 DATA[1], DATA[1] (text/html) + 5 0.130007 127.0.0.1 → 127.0.0.1 HTTP2 7573 DATA[1] + 6 0.131045 127.0.0.1 → 127.0.0.1 HTTP2 3152 DATA[1], DATA[1] (text/html) diff --git a/bazel/protobuf.patch b/bazel/protobuf.patch index 69c7cc28e0ba..d51b67e92457 100644 --- a/bazel/protobuf.patch +++ b/bazel/protobuf.patch @@ -1,13 +1,13 @@ diff --git a/src/google/protobuf/stubs/strutil.cc b/src/google/protobuf/stubs/strutil.cc -index 1d34870deb..3844fa6b8b 100644 +index 3844fa6b8b..5486887295 100644 --- a/src/google/protobuf/stubs/strutil.cc +++ b/src/google/protobuf/stubs/strutil.cc -@@ -1116,10 +1116,12 @@ char* FastUInt64ToBufferLeft(uint64 u64, char* buffer) { +@@ -1065,10 +1065,12 @@ char* FastUInt32ToBufferLeft(uint32 u, char* buffer) { } - char* FastInt64ToBufferLeft(int64 i, char* buffer) { -- uint64 u = i; -+ uint64 u = 0; + char* FastInt32ToBufferLeft(int32 i, char* buffer) { +- uint32 u = i; ++ uint32 u = 0; if (i < 0) { *buffer++ = '-'; - u = -i; @@ -15,20 +15,19 @@ index 1d34870deb..3844fa6b8b 100644 + } else { + u = i; } - return FastUInt64ToBufferLeft(u, buffer); + return FastUInt32ToBufferLeft(u, buffer); } -diff --git a/src/google/protobuf/text_format.cc b/src/google/protobuf/text_format.cc -index ba0c3028ee..801a8e3786 100644 ---- a/src/google/protobuf/text_format.cc -+++ b/src/google/protobuf/text_format.cc -@@ -1315,7 +1315,9 @@ class TextFormat::Printer::TextGenerator - while (size > buffer_size_) { - // Data exceeds space in the buffer. Write what we can and request a new - // buffer. -- memset(buffer_, ' ', buffer_size_); -+ if (buffer_size_ > 0) { -+ memset(buffer_, ' ', buffer_size_); -+ } - size -= buffer_size_; - void* void_buffer; - failed_ = !output_->Next(&void_buffer, &buffer_size_); + +diff --git a/BUILD b/BUILD +index 6665de94..55f28582 100644 +--- a/BUILD ++++ b/BUILD +@@ -19,6 +19,6 @@ config_setting( + # ZLIB configuration + ################################################################################ + +-ZLIB_DEPS = ["@zlib//:zlib"] ++ZLIB_DEPS = ["//external:zlib"] + + ################################################################################ + # Protobuf Runtime Library \ No newline at end of file diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index c957a1b8cd5c..ed14486d3a5e 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -486,9 +486,10 @@ def _com_google_absl(): def _com_google_protobuf(): _repository_impl( "com_google_protobuf", - # The patch is only needed until - # https://github.com/protocolbuffers/protobuf/pull/5901 is available. - # TODO(htuch): remove this when > protobuf 3.7.1 is released. + # The patch includes + # https://github.com/protocolbuffers/protobuf/pull/6333 and also uses + # foreign_cc build for zlib as its dependency. + # TODO(asraa): remove this when > protobuf 3.8.0 is released. patch_args = ["-p1"], patches = ["@envoy//bazel:protobuf.patch"], ) @@ -499,9 +500,10 @@ def _com_google_protobuf(): _repository_impl( "com_google_protobuf_cc", repository_key = "com_google_protobuf", - # The patch is only needed until - # https://github.com/protocolbuffers/protobuf/pull/5901 is available. - # TODO(htuch): remove this when > protobuf 3.7.1 is released. + # The patch includes + # https://github.com/protocolbuffers/protobuf/pull/6333 and also uses + # foreign_cc build for zlib as its dependency. + # TODO(asraa): remove this when > protobuf 3.8.0 is released. patch_args = ["-p1"], patches = ["@envoy//bazel:protobuf.patch"], ) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 58c12e35916f..6e25d2fd589e 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -205,9 +205,9 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/google/googletest/archive/d7003576dd133856432e2e07340f45926242cc3a.tar.gz"], ), com_google_protobuf = dict( - sha256 = "c10ef8d8ad5a9e5f850483051b7f9ee2c8bb3ca2e0e16a4cf105bd1321afb2d6", - strip_prefix = "protobuf-3.7.1", - urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-all-3.7.1.tar.gz"], + sha256 = "b7220b41481011305bf9100847cf294393973e869973a9661046601959b2960b", + strip_prefix = "protobuf-3.8.0", + urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v3.8.0/protobuf-all-3.8.0.tar.gz"], ), grpc_httpjson_transcoding = dict( sha256 = "dedd76b0169eb8c72e479529301a1d9b914a4ccb4d2b5ddb4ebe92d63a7b2152",