Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dependencies: update protobuf to 3.8.0 (#7510)
In addition to updating protobuf to 3.8.0, this PR also Removes old protobuf patch now included in 3.8.0 - Patches protocolbuffers/protobuf#6333 that fixes a UBSAN error in the protobuf library. - Patches protobuf's BUILD to depend on foreign_cc zlib Risk level: low/medium Testing: bazel test //test/... Signed-off-by: Asra Ali <asraa@google.com>
- Loading branch information
Showing
4 changed files
with
34 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
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; | ||
+ u -= i; | ||
+ } 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters