[grpc][upb][re2] grpc v1.31.1 (#13084)

This commit is contained in:
Jozef Izso 2020-08-23 07:25:20 +02:00 committed by GitHub
parent 4e65ce52ab
commit 3283dd7fb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 90 additions and 68 deletions

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index be695c20e3..dd9ffd95f9 100644
index a067308142..086d4c5837 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -150,6 +150,9 @@ if(UNIX)
@@ -153,6 +153,9 @@ if(UNIX)
endif()
if(WIN32)
set(_gRPC_PLATFORM_WINDOWS ON)
@ -12,7 +12,7 @@ index be695c20e3..dd9ffd95f9 100644
endif()
# Use C99 standard
@@ -188,6 +191,9 @@ if(MSVC)
@@ -191,6 +194,9 @@ if(MSVC)
set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4267")
# TODO(jtattermusch): needed to build boringssl with VS2017, revisit later
set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4987 /wd4774 /wd4819 /wd4996 /wd4619")
@ -22,7 +22,7 @@ index be695c20e3..dd9ffd95f9 100644
endif()
if (MINGW)
add_definitions(-D_WIN32_WINNT=0x600)
@@ -254,6 +260,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
@@ -258,6 +264,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
# ``.proto`` files
#
function(protobuf_generate_grpc_cpp)
@ -33,7 +33,7 @@ index be695c20e3..dd9ffd95f9 100644
if(NOT ARGN)
message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files")
return()
@@ -326,6 +336,7 @@ if (gRPC_BUILD_GRPC_RUBY_PLUGIN)
@@ -330,6 +340,7 @@ if (gRPC_BUILD_GRPC_RUBY_PLUGIN)
list(APPEND _gRPC_PLUGIN_LIST grpc_ruby_plugin)
endif ()
@ -41,7 +41,7 @@ index be695c20e3..dd9ffd95f9 100644
add_custom_target(plugins
DEPENDS ${_gRPC_PLUGIN_LIST}
)
@@ -344,6 +355,7 @@ add_custom_target(tools_cxx
@@ -348,6 +359,7 @@ add_custom_target(tools_cxx
add_custom_target(tools
DEPENDS tools_c tools_cxx)
@ -50,10 +50,10 @@ index be695c20e3..dd9ffd95f9 100644
protobuf_generate_grpc_cpp(
src/proto/grpc/channelz/channelz.proto
diff --git a/src/core/lib/iomgr/resource_quota.cc b/src/core/lib/iomgr/resource_quota.cc
index b5df53ecdb..4099d0b63e 100644
index dbe84e3466..cda40b6435 100644
--- a/src/core/lib/iomgr/resource_quota.cc
+++ b/src/core/lib/iomgr/resource_quota.cc
@@ -943,7 +943,7 @@ bool grpc_resource_user_alloc(grpc_resource_user* resource_user, size_t size,
@@ -945,7 +945,7 @@ bool grpc_resource_user_alloc(grpc_resource_user* resource_user, size_t size,
void grpc_resource_user_free(grpc_resource_user* resource_user, size_t size) {
gpr_mu_lock(&resource_user->mu);
grpc_resource_quota* resource_quota = resource_user->resource_quota;

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd9ffd95f9..9f35ad3f6c 100644
index 086d4c5837..e556a99b47 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,6 +180,11 @@ if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
@@ -183,6 +183,11 @@ if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")

View File

@ -1,5 +1,5 @@
diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc
index 6adcd8d..20745df 100644
index 99a32980aa..f55db67113 100644
--- a/src/core/lib/transport/transport.cc
+++ b/src/core/lib/transport/transport.cc
@@ -97,6 +97,8 @@ void grpc_stream_ref_init(grpc_stream_refcount* refcount, int /*initial_refs*/,

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f35ad3f6c..bdadbc9867 100644
index e556a99b47..a337149f1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -246,7 +246,7 @@ elseif(UNIX)
@@ -250,7 +250,7 @@ elseif(UNIX)
endif()
if(WIN32)

View File

@ -1,8 +1,8 @@
diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc
index c0e21648f7..331e54c45a 100644
index 0dacbfef3e..310bf1de1b 100644
--- a/src/core/lib/slice/slice.cc
+++ b/src/core/lib/slice/slice.cc
@@ -214,6 +214,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr<char> p,
@@ -234,6 +234,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr<char> p,
size_t len) {
uint8_t* ptr = reinterpret_cast<uint8_t*>(p.get());
grpc_slice slice;
@ -10,16 +10,25 @@ index c0e21648f7..331e54c45a 100644
if (len <= sizeof(slice.data.inlined.bytes)) {
slice.refcount = nullptr;
slice.data.inlined.length = len;
@@ -253,7 +254,7 @@ grpc_slice grpc_slice_from_moved_string(grpc_core::UniquePtr<char> p) {
}
grpc_slice grpc_slice_from_cpp_string(std::string str) {
- grpc_slice slice;
+ grpc_slice slice = { 0 };
if (str.size() <= sizeof(slice.data.inlined.bytes)) {
slice.refcount = nullptr;
slice.data.inlined.length = str.size();
diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc
index d22b52ad6f..203112e87b 100644
index cab0cd56c4..2c88fd625b 100644
--- a/src/core/lib/surface/server.cc
+++ b/src/core/lib/surface/server.cc
@@ -1230,7 +1230,7 @@ grpc_call_error queue_call_request(grpc_server* server, size_t cq_idx,
@@ -1301,7 +1301,7 @@ grpc_call_error queue_call_request(grpc_server* server, size_t cq_idx,
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown"));
return GRPC_CALL_OK;
}
- RequestMatcherInterface* rm;
+ RequestMatcherInterface* rm = nullptr;
switch (rc->type) {
case BATCH_CALL:
rm = server->unregistered_request_matcher;
case RequestedCallType::BATCH_CALL:
rm = server->unregistered_request_matcher.get();

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bdadbc9867..f2b1dd774a 100644
index a337149f1f..6baab5d37b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,6 +81,9 @@ set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package")
@@ -84,6 +84,9 @@ set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package")
set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "Provider of protobuf library")
set_property(CACHE gRPC_PROTOBUF_PROVIDER PROPERTY STRINGS "module" "package")
@ -12,7 +12,7 @@ index bdadbc9867..f2b1dd774a 100644
set(gRPC_PROTOBUF_PACKAGE_TYPE "" CACHE STRING "Algorithm for searching protobuf package")
set_property(CACHE gRPC_PROTOBUF_PACKAGE_TYPE PROPERTY STRINGS "CONFIG" "MODULE")
@@ -1791,7 +1794,6 @@ target_link_libraries(grpc
@@ -1807,7 +1810,6 @@ target_link_libraries(grpc
${_gRPC_ALLTARGETS_LIBRARIES}
gpr
address_sorting
@ -20,7 +20,7 @@ index bdadbc9867..f2b1dd774a 100644
absl::optional
absl::strings
absl::inlined_vector
@@ -1870,7 +1872,6 @@ target_link_libraries(grpc_csharp_ext
@@ -1887,7 +1889,6 @@ target_link_libraries(grpc_csharp_ext
grpc
gpr
address_sorting
@ -28,7 +28,7 @@ index bdadbc9867..f2b1dd774a 100644
)
@@ -2386,7 +2387,6 @@ target_link_libraries(grpc_unsecure
@@ -2409,7 +2410,6 @@ target_link_libraries(grpc_unsecure
${_gRPC_ALLTARGETS_LIBRARIES}
gpr
address_sorting
@ -36,7 +36,7 @@ index bdadbc9867..f2b1dd774a 100644
absl::optional
absl::strings
absl::inlined_vector
@@ -2580,7 +2580,6 @@ target_link_libraries(grpc++
@@ -2606,7 +2606,6 @@ target_link_libraries(grpc++
grpc
gpr
address_sorting
@ -44,7 +44,7 @@ index bdadbc9867..f2b1dd774a 100644
)
foreach(_hdr
@@ -2856,7 +2855,6 @@ target_link_libraries(grpc++_alts
@@ -2876,7 +2875,6 @@ target_link_libraries(grpc++_alts
grpc
gpr
address_sorting
@ -52,7 +52,7 @@ index bdadbc9867..f2b1dd774a 100644
)
foreach(_hdr
@@ -2924,7 +2922,6 @@ target_link_libraries(grpc++_error_details
@@ -2945,7 +2943,6 @@ target_link_libraries(grpc++_error_details
grpc
gpr
address_sorting
@ -60,7 +60,7 @@ index bdadbc9867..f2b1dd774a 100644
)
foreach(_hdr
@@ -2997,7 +2994,6 @@ target_link_libraries(grpc++_reflection
@@ -3019,7 +3016,6 @@ target_link_libraries(grpc++_reflection
grpc
gpr
address_sorting
@ -68,7 +68,7 @@ index bdadbc9867..f2b1dd774a 100644
)
foreach(_hdr
@@ -3274,7 +3270,6 @@ target_link_libraries(grpc++_unsecure
@@ -3300,7 +3296,6 @@ target_link_libraries(grpc++_unsecure
grpc_unsecure
gpr
address_sorting
@ -76,7 +76,7 @@ index bdadbc9867..f2b1dd774a 100644
)
foreach(_hdr
@@ -3621,7 +3616,6 @@ target_link_libraries(grpcpp_channelz
@@ -3642,7 +3637,6 @@ target_link_libraries(grpcpp_channelz
grpc
gpr
address_sorting
@ -84,7 +84,7 @@ index bdadbc9867..f2b1dd774a 100644
)
foreach(_hdr
@@ -3648,6 +3642,7 @@ endif()
@@ -3669,6 +3663,7 @@ endif()
endif()
@ -92,7 +92,7 @@ index bdadbc9867..f2b1dd774a 100644
add_library(upb
third_party/upb/upb/decode.c
third_party/upb/upb/encode.c
@@ -3697,7 +3692,7 @@ if(gRPC_INSTALL)
@@ -3719,7 +3714,7 @@ if(gRPC_INSTALL)
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
)
endif()
@ -102,13 +102,13 @@ index bdadbc9867..f2b1dd774a 100644
add_executable(check_epollexclusive
diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in
index 5bfa73c291..db0865ee57 100644
index 3623f4aa5e..df6ced560e 100644
--- a/cmake/gRPCConfig.cmake.in
+++ b/cmake/gRPCConfig.cmake.in
@@ -7,6 +7,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules)
@_gRPC_FIND_SSL@
@@ -8,6 +8,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules)
@_gRPC_FIND_CARES@
@_gRPC_FIND_ABSL@
@_gRPC_FIND_RE2@
+@_gRPC_FIND_UPB@
# Targets

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f2b1dd774a..e9adc1ae27 100644
index 6baab5d37b..48bc6cf0de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1797,6 +1797,8 @@ target_link_libraries(grpc
@@ -1813,6 +1813,8 @@ target_link_libraries(grpc
absl::optional
absl::strings
absl::inlined_vector
@ -11,7 +11,7 @@ index f2b1dd774a..e9adc1ae27 100644
)
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
target_link_libraries(grpc "-framework CoreFoundation")
@@ -2390,6 +2392,8 @@ target_link_libraries(grpc_unsecure
@@ -2413,6 +2415,8 @@ target_link_libraries(grpc_unsecure
absl::optional
absl::strings
absl::inlined_vector

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e9adc1ae27..d1f5a3f93e 100644
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48bc6cf0de..399aff7d1e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1838,10 +1838,14 @@ endif()
@@ -1854,10 +1854,14 @@ endif()
if(gRPC_BUILD_CSHARP_EXT)
@ -18,7 +18,7 @@ index e9adc1ae27..d1f5a3f93e 100644
set_target_properties(grpc_csharp_ext PROPERTIES
VERSION ${gRPC_CORE_VERSION}
SOVERSION ${gRPC_CORE_SOVERSION}
@@ -1855,6 +1859,12 @@ if(WIN32 AND MSVC)
@@ -1871,6 +1875,12 @@ if(WIN32 AND MSVC)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_csharp_ext.pdb
DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
)

View File

@ -1,6 +1,6 @@
Source: grpc
Version: 1.30.2
Build-Depends: zlib, openssl, protobuf, c-ares (!uwp), upb, abseil
Version: 1.31.1
Build-Depends: zlib, openssl, protobuf, c-ares (!uwp), upb, abseil, re2
Homepage: https://github.com/grpc/grpc
Description: An RPC library and framework

View File

@ -5,8 +5,8 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO grpc/grpc
REF de6defa6fff08de20e36f9168f5b277e292daf46 #v1.30.2
SHA512 e77ba43fdce5c2257abb957908b94f3132b191d930c3c1ab1350bdf6d859aaf76f0afb067f4af6abb3c8428de20dd47596f316262eb5d8569ebb2ffa13b50054
REF 7d7e4567625db7cfebf8969a225948097a3f9f89 #v1.31.1
SHA512 a348b8779f533c53b99c052264e0a008121087267bcf836fb2310819ab384effdc0996df031f407ee4bf8bb0cb37a81e061e65ab24ab7011ce6400de3808f5a4
HEAD_REF master
PATCHES
00001-fix-uwp.patch
@ -52,6 +52,7 @@ vcpkg_configure_cmake(
-DgRPC_PROTOBUF_PROVIDER=package
-DgRPC_ABSL_PROVIDER=package
-DgRPC_UPB_PROVIDER=package
-DgRPC_RE2_PROVIDER=package
-DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG
-DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER}
-DgRPC_GFLAGS_PROVIDER=none

View File

@ -1,4 +1,4 @@
Source: re2
Version: 2020-01-01
Version: 2020-06-01
Homepage: https://github.com/google/re2
Description: RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.

View File

@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/re2
REF 2020-01-01
SHA512 ca9c5e3b63b55074ad1d74b73bcf115ae285b3b8989bb56de0bccdfd7b423df742cfd1d1b6eb963da6dc550b81f492eaef9a9c582e354906b8dd1b92fb451ed0
REF 2020-06-01
SHA512 8592a5409cb087c3188023746a4121bd58972a7a21bae98022af587f6191b3096bbb5d379e622ea853ff3373c76972fb61f331354550715c9a7e77d08fba6f3c
HEAD_REF master
)

View File

@ -1,4 +1,4 @@
Source: upb
Version: 2019-10-21-2
Version: 2020-08-19
Homepage: https://github.com/protocolbuffers/upb/
Description: μpb (often written 'upb') is a small protobuf implementation written in C.

View File

@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 836c5ff..6eb8bb5 100644
index 4dd6454..eda6a72 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ else()
@ -11,27 +11,25 @@ index 836c5ff..6eb8bb5 100644
cmake_policy(SET CMP0048 NEW)
project(upb)
@@ -59,7 +59,7 @@ elseif(UNIX)
endif()
@@ -62,6 +62,7 @@ enable_testing()
enable_testing()
-
add_library(port
upb/port.c)
+add_library(descriptor_upbproto INTERFACE)
add_library(upb
upb/decode.c
upb/encode.c
@@ -136,12 +136,35 @@ target_link_libraries(upb_cc_bindings INTERFACE
descriptor_upbproto
@@ -154,6 +155,7 @@ target_link_libraries(upb_cc_bindings INTERFACE
handlers
port
upb)
-add_library(upb_test
+if(ENABLE_TESTING)
+add_executable(upb_test
add_library(upb_test
tests/testmain.cc
tests/test_util.h
tests/upb_test.h)
target_link_libraries(upb_test
@@ -162,5 +164,28 @@ target_link_libraries(upb_test
handlers
port
upb)
+endif()
@ -41,8 +39,9 @@ index 836c5ff..6eb8bb5 100644
+ DESTINATION include
+ FILES_MATCHING
+ PATTERN "*.h"
+ PATTERN "*.hpp"
+ PATTERN "*.inc"
+ PATTERN "*.int.h" EXCLUDE
+ PATTERN "*.int.h"
+)
+target_include_directories(upb PUBLIC $<INSTALL_INTERFACE:include>)
+install(TARGETS
@ -50,10 +49,10 @@ index 836c5ff..6eb8bb5 100644
+ upb_cc_bindings
+ upb_json
+ upb_pb
+ port
+ table
+ descriptor_upbproto
+ handlers
+ legacy_msg_reflection
+ reflection
+ EXPORT upb-config
+)

View File

@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 577000a..759e35b 100644
index eda6a72..386966f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,10 @@ elseif(UNIX)
@ -11,5 +11,18 @@ index 577000a..759e35b 100644
+endif()
+
enable_testing()
add_library(descriptor_upbproto INTERFACE)
add_library(upb
add_library(port
diff --git a/upb/json_decode.c b/upb/json_decode.c
index 953d238..5185ffd 100644
--- a/upb/json_decode.c
+++ b/upb/json_decode.c
@@ -1138,7 +1138,7 @@ static void jsondec_struct(jsondec *d, upb_msg *msg, const upb_msgdef *m) {
static void jsondec_wellknownvalue(jsondec *d, upb_msg *msg,
const upb_msgdef *m) {
upb_msgval val;
- const upb_fielddef *f;
+ const upb_fielddef *f = NULL;
upb_msg *submsg;
switch (jsondec_peek(d)) {

View File

@ -3,8 +3,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO protocolbuffers/upb
REF 9effcbcb27f0a665f9f345030188c0b291e32482
SHA512 416ff26ec21181d53be23e94203205072152ab3a8e4b3b28d16263a601995fd2d2f8afe5d8cfbecdac8543249482287b9fe6129314f7c9a7880660f5508bb85e
REF 7338facddb8ce405fe7a0a52a6061a1e7c823279
SHA512 a2ece65612ca7c3cdc7b79994aa488623e5ce4227988611ab60724fae5dc7ba9311363bf5c73f6c74910a6b91392e0a231c28f0b2f4c8cc2c4d4328ed33bc265
HEAD_REF master
PATCHES
add-cmake-install.patch