Merge remote-tracking branch 'upstream/master' into registration-builder-api

pull/36449/head
yijiem 11 months ago
commit a727810136
  1. 11
      .github/CODEOWNERS
  2. 65
      BUILD
  3. 61
      CMakeLists.txt
  4. 51
      Makefile
  5. 109
      Package.swift
  6. 2
      _metadata.py
  7. 119
      build_autogenerated.yaml
  8. 4
      build_handwritten.yaml
  9. 53
      config.m4
  10. 52
      config.w32
  11. 3
      doc/g_stands_for.md
  12. 127
      gRPC-C++.podspec
  13. 171
      gRPC-Core.podspec
  14. 2
      gRPC-ProtoRPC.podspec
  15. 2
      gRPC-RxLibrary.podspec
  16. 2
      gRPC.podspec
  17. 109
      grpc.gemspec
  18. 1
      include/grpc/module.modulemap
  19. 62
      include/grpc/passive_listener.h
  20. 27
      include/grpcpp/passive_listener.h
  21. 1
      include/grpcpp/security/server_credentials.h
  22. 28
      include/grpcpp/server_builder.h
  23. 4
      include/grpcpp/version_info.h
  24. 115
      package.xml
  25. 112
      src/core/BUILD
  26. 18
      src/core/ext/transport/binder/client/binder_connector.cc
  27. 17
      src/core/ext/transport/binder/client/channel_create.cc
  28. 6
      src/core/ext/transport/binder/client/channel_create_impl.cc
  29. 3
      src/core/ext/transport/binder/client/connection_id_generator.cc
  30. 12
      src/core/ext/transport/binder/client/endpoint_binder_pool.cc
  31. 4
      src/core/ext/transport/binder/client/jni_utils.cc
  32. 6
      src/core/ext/transport/binder/client/security_policy_setting.cc
  33. 12
      src/core/ext/transport/binder/security_policy/binder_security_policy.cc
  34. 10
      src/core/ext/transport/binder/server/binder_server.cc
  35. 4
      src/core/ext/transport/binder/server/binder_server_credentials.cc
  36. 33
      src/core/ext/transport/binder/transport/binder_transport.cc
  37. 3
      src/core/ext/transport/binder/transport/binder_transport.h
  38. 6
      src/core/ext/transport/binder/utils/ndk_binder.cc
  39. 8
      src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc
  40. 3
      src/core/ext/transport/binder/wire_format/binder_android.cc
  41. 21
      src/core/ext/transport/binder/wire_format/transaction.h
  42. 9
      src/core/ext/transport/binder/wire_format/wire_reader_impl.cc
  43. 15
      src/core/ext/transport/binder/wire_format/wire_writer.cc
  44. 7
      src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc
  45. 4
      src/core/ext/transport/chaotic_good/server/chaotic_good_server.h
  46. 4
      src/core/ext/transport/chttp2/alpn/alpn.cc
  47. 15
      src/core/ext/transport/chttp2/client/chttp2_connector.cc
  48. 296
      src/core/ext/transport/chttp2/server/chttp2_server.cc
  49. 33
      src/core/ext/transport/chttp2/server/chttp2_server.h
  50. 9
      src/core/ext/transport/chttp2/transport/bin_decoder.cc
  51. 12
      src/core/ext/transport/chttp2/transport/bin_encoder.cc
  52. 102
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc
  53. 5
      src/core/ext/transport/chttp2/transport/flow_control.cc
  54. 5
      src/core/ext/transport/chttp2/transport/flow_control.h
  55. 5
      src/core/ext/transport/chttp2/transport/frame.cc
  56. 3
      src/core/ext/transport/chttp2/transport/frame_data.cc
  57. 7
      src/core/ext/transport/chttp2/transport/frame_goaway.cc
  58. 3
      src/core/ext/transport/chttp2/transport/frame_ping.cc
  59. 3
      src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
  60. 5
      src/core/ext/transport/chttp2/transport/frame_window_update.cc
  61. 4
      src/core/ext/transport/chttp2/transport/hpack_encoder.cc
  62. 16
      src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc
  63. 3
      src/core/ext/transport/chttp2/transport/hpack_parse_result.cc
  64. 3
      src/core/ext/transport/chttp2/transport/hpack_parse_result.h
  65. 45
      src/core/ext/transport/chttp2/transport/hpack_parser.cc
  66. 7
      src/core/ext/transport/chttp2/transport/hpack_parser_table.cc
  67. 4
      src/core/ext/transport/chttp2/transport/max_concurrent_streams_policy.cc
  68. 23
      src/core/ext/transport/chttp2/transport/parsing.cc
  69. 3
      src/core/ext/transport/chttp2/transport/ping_callbacks.cc
  70. 12
      src/core/ext/transport/chttp2/transport/stream_lists.cc
  71. 4
      src/core/ext/transport/chttp2/transport/varint.h
  72. 4
      src/core/ext/transport/chttp2/transport/write_size_policy.cc
  73. 5
      src/core/ext/transport/chttp2/transport/writing.cc
  74. 7
      src/core/lib/event_engine/extensions/supports_fd.h
  75. 33
      src/core/lib/event_engine/posix_engine/posix_engine.cc
  76. 2
      src/core/lib/event_engine/posix_engine/posix_engine.h
  77. 20
      src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc
  78. 9
      src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h
  79. 4
      src/core/lib/gpr/alloc.cc
  80. 13
      src/core/lib/gpr/log.cc
  81. 48
      src/core/lib/gpr/posix/sync.cc
  82. 15
      src/core/lib/gpr/posix/time.cc
  83. 4
      src/core/lib/gpr/posix/tmpfile.cc
  84. 9
      src/core/lib/gpr/subprocess_posix.cc
  85. 8
      src/core/lib/gpr/sync.cc
  86. 18
      src/core/lib/gpr/time.cc
  87. 4
      src/core/lib/gpr/windows/sync.cc
  88. 5
      src/core/lib/gpr/windows/time.cc
  89. 8
      src/core/lib/gprpp/chunked_vector.h
  90. 3
      src/core/lib/gprpp/down_cast.h
  91. 14
      src/core/lib/gprpp/dual_ref_counted.h
  92. 7
      src/core/lib/gprpp/host_port.cc
  93. 6
      src/core/lib/gprpp/mpscq.h
  94. 6
      src/core/lib/gprpp/posix/stat.cc
  95. 16
      src/core/lib/gprpp/posix/thd.cc
  96. 6
      src/core/lib/gprpp/ref_counted.h
  97. 4
      src/core/lib/gprpp/single_set_ptr.h
  98. 3
      src/core/lib/gprpp/status_helper.cc
  99. 7
      src/core/lib/gprpp/sync.h
  100. 11
      src/core/lib/gprpp/thd.h
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,11 +1,12 @@
/**/OWNERS @markdroth @a11r
/bazel/** @veblush @gnossen
/bazel/experiments.yaml
/cmake/** @veblush @apolcyn
/src/core/ext/filters/client_channel/** @markdroth
/src/core/client_channel/** @markdroth
/src/core/ext/transport/chttp2/transport/** @ctiller
/src/core/ext/xds/** @markdroth
/src/core/lib/resolver/** @markdroth
/src/core/lib/service_config/** @markdroth
/src/core/load_balancing/** @markdroth
/src/core/resolver/** @markdroth
/src/core/server/xds* @markdroth
/src/core/service_config/** @markdroth
/src/core/xds/** @markdroth
/tools/dockerfile/** @drfloob @apolcyn @gnossen
/tools/run_tests/xds_k8s_test_driver/** @sergiitk @XuanWang-Amos @gnossen

65
BUILD

@ -242,11 +242,11 @@ config_setting(
python_config_settings()
# This should be updated along with build_handwritten.yaml
g_stands_for = "grateful" # @unused
g_stands_for = "gnarly" # @unused
core_version = "41.0.0" # @unused
version = "1.64.0-dev" # @unused
version = "1.65.0-dev" # @unused
GPR_PUBLIC_HDRS = [
"include/grpc/support/alloc.h",
@ -296,7 +296,6 @@ GRPC_PUBLIC_HDRS = [
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/passive_listener.h",
"include/grpc/slice.h",
"include/grpc/slice_buffer.h",
"include/grpc/status.h",
@ -458,7 +457,6 @@ GRPCXX_PUBLIC_HDRS = [
"include/grpcpp/impl/service_type.h",
"include/grpcpp/impl/status.h",
"include/grpcpp/impl/sync.h",
"include/grpcpp/passive_listener.h",
"include/grpcpp/resource_quota.h",
"include/grpcpp/security/audit_logging.h",
"include/grpcpp/security/tls_crl_provider.h",
@ -788,6 +786,7 @@ grpc_cc_library(
"absl/base:log_severity",
"absl/functional:any_invocable",
"absl/log",
"absl/log:check",
"absl/log:globals",
"absl/memory",
"absl/random",
@ -884,7 +883,7 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_public_hdrs",
hdrs = GRPC_PUBLIC_HDRS + GRPC_PUBLIC_EVENT_ENGINE_HDRS,
hdrs = GRPC_PUBLIC_HDRS,
external_deps = [
"absl/status:statusor",
"absl/strings",
@ -1134,6 +1133,7 @@ grpc_cc_library(
"absl/container:flat_hash_map",
"absl/functional:any_invocable",
"absl/hash",
"absl/log:check",
"absl/memory",
"absl/meta:type_traits",
"absl/status",
@ -2508,7 +2508,6 @@ grpc_cc_library(
"//src/core:grpc_backend_metric_provider",
"//src/core:grpc_crl_provider",
"//src/core:grpc_service_config",
"//src/core:grpc_transport_chttp2_server",
"//src/core:grpc_transport_inproc",
"//src/core:json",
"//src/core:json_reader",
@ -2567,7 +2566,6 @@ grpc_cc_library(
"grpc_security_base",
"grpc_service_config_impl",
"grpc_trace",
"grpc_transport_chttp2",
"grpc_unsecure",
"grpcpp_backend_metric_recorder",
"grpcpp_call_metric_recorder",
@ -2589,7 +2587,6 @@ grpc_cc_library(
"//src/core:grpc_backend_metric_provider",
"//src/core:grpc_insecure_credentials",
"//src/core:grpc_service_config",
"//src/core:grpc_transport_chttp2_server",
"//src/core:grpc_transport_inproc",
"//src/core:ref_counted",
"//src/core:resource_quota",
@ -2967,6 +2964,7 @@ grpc_cc_library(
external_deps = [
"absl/base:core_headers",
"absl/container:inlined_vector",
"absl/log:check",
],
language = "c++",
visibility = ["@grpc:client_channel"],
@ -3963,6 +3961,9 @@ grpc_cc_library(
hdrs = [
"//src/core:tsi/fake_transport_security.h",
],
external_deps = [
"absl/log:check",
],
language = "c++",
visibility = [
"@grpc:public",
@ -4080,6 +4081,7 @@ grpc_cc_library(
"//src/core:tsi/alts/handshaker/alts_tsi_utils.h",
],
external_deps = [
"absl/log:check",
"absl/strings",
"@com_google_protobuf//upb:base",
"@com_google_protobuf//upb:mem",
@ -4139,6 +4141,7 @@ grpc_cc_library(
"//src/core:tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h",
],
external_deps = [
"absl/log:check",
"absl/types:span",
"libcrypto",
"libssl",
@ -4169,6 +4172,7 @@ grpc_cc_library(
"//src/core:tsi/ssl/session_cache/ssl_session_cache.h",
],
external_deps = [
"absl/log:check",
"absl/memory",
"libssl",
],
@ -4313,21 +4317,21 @@ grpc_cc_library(
grpc_cc_library(
name = "xds_client",
srcs = [
"//src/core:ext/xds/xds_api.cc",
"//src/core:ext/xds/xds_bootstrap.cc",
"//src/core:ext/xds/xds_client.cc",
"//src/core:ext/xds/xds_client_stats.cc",
"//src/core:xds/xds_client/xds_api.cc",
"//src/core:xds/xds_client/xds_bootstrap.cc",
"//src/core:xds/xds_client/xds_client.cc",
"//src/core:xds/xds_client/xds_client_stats.cc",
],
hdrs = [
"//src/core:ext/xds/xds_api.h",
"//src/core:ext/xds/xds_bootstrap.h",
"//src/core:ext/xds/xds_channel_args.h",
"//src/core:ext/xds/xds_client.h",
"//src/core:ext/xds/xds_client_stats.h",
"//src/core:ext/xds/xds_metrics.h",
"//src/core:ext/xds/xds_resource_type.h",
"//src/core:ext/xds/xds_resource_type_impl.h",
"//src/core:ext/xds/xds_transport.h",
"//src/core:xds/xds_client/xds_api.h",
"//src/core:xds/xds_client/xds_bootstrap.h",
"//src/core:xds/xds_client/xds_channel_args.h",
"//src/core:xds/xds_client/xds_client.h",
"//src/core:xds/xds_client/xds_client_stats.h",
"//src/core:xds/xds_client/xds_metrics.h",
"//src/core:xds/xds_client/xds_resource_type.h",
"//src/core:xds/xds_client/xds_resource_type_impl.h",
"//src/core:xds/xds_client/xds_transport.h",
],
external_deps = [
"absl/base:core_headers",
@ -4452,6 +4456,7 @@ grpc_cc_library(
"//src/core:ext/transport/chttp2/transport/frame.h",
],
external_deps = [
"absl/log:check",
"absl/status",
"absl/status:statusor",
"absl/strings",
@ -4497,6 +4502,7 @@ grpc_cc_library(
],
external_deps = [
"absl/functional:function_ref",
"absl/log:check",
"absl/status",
"absl/strings",
],
@ -4523,6 +4529,7 @@ grpc_cc_library(
"//src/core:ext/transport/chttp2/transport/hpack_parse_result.h",
],
external_deps = [
"absl/log:check",
"absl/status",
"absl/strings",
"absl/strings:str_format",
@ -4551,6 +4558,7 @@ grpc_cc_library(
],
external_deps = [
"absl/base:core_headers",
"absl/log:check",
"absl/random:bit_gen_ref",
"absl/status",
"absl/strings",
@ -4591,7 +4599,10 @@ grpc_cc_library(
hdrs = [
"//src/core:ext/transport/chttp2/transport/hpack_encoder.h",
],
external_deps = ["absl/strings"],
external_deps = [
"absl/log:check",
"absl/strings",
],
deps = [
"chttp2_bin_encoder",
"chttp2_legacy_frame",
@ -4621,6 +4632,9 @@ grpc_cc_library(
hdrs = [
"//src/core:ext/transport/chttp2/transport/bin_encoder.h",
],
external_deps = [
"absl/log:check",
],
deps = [
"gpr",
"gpr_platform",
@ -4637,7 +4651,10 @@ grpc_cc_library(
hdrs = [
"//src/core:ext/transport/chttp2/transport/varint.h",
],
external_deps = ["absl/base:core_headers"],
external_deps = [
"absl/base:core_headers",
"absl/log:check",
],
deps = ["gpr"],
)
@ -4696,6 +4713,7 @@ grpc_cc_library(
"absl/base:core_headers",
"absl/container:flat_hash_map",
"absl/hash",
"absl/log:check",
"absl/meta:type_traits",
"absl/random",
"absl/random:bit_gen_ref",
@ -4821,6 +4839,7 @@ grpc_cc_library(
"//src/core:lib/gpr/subprocess.h",
],
external_deps = [
"absl/log:check",
"absl/strings",
"absl/types:span",
],

61
CMakeLists.txt generated

@ -25,11 +25,11 @@
cmake_minimum_required(VERSION 3.13)
set(PACKAGE_NAME "grpc")
set(PACKAGE_VERSION "1.64.0-dev")
set(PACKAGE_VERSION "1.65.0-dev")
set(gRPC_CORE_VERSION "41.0.0")
set(gRPC_CORE_SOVERSION "41")
set(gRPC_CPP_VERSION "1.64.0-dev")
set(gRPC_CPP_SOVERSION "1.64")
set(gRPC_CPP_VERSION "1.65.0-dev")
set(gRPC_CPP_SOVERSION "1.65")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
@ -2213,30 +2213,6 @@ add_library(grpc
src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.c
src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c
src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c
src/core/ext/xds/certificate_provider_store.cc
src/core/ext/xds/file_watcher_certificate_provider_factory.cc
src/core/ext/xds/xds_api.cc
src/core/ext/xds/xds_audit_logger_registry.cc
src/core/ext/xds/xds_bootstrap.cc
src/core/ext/xds/xds_bootstrap_grpc.cc
src/core/ext/xds/xds_certificate_provider.cc
src/core/ext/xds/xds_client.cc
src/core/ext/xds/xds_client_grpc.cc
src/core/ext/xds/xds_client_stats.cc
src/core/ext/xds/xds_cluster.cc
src/core/ext/xds/xds_cluster_specifier_plugin.cc
src/core/ext/xds/xds_common_types.cc
src/core/ext/xds/xds_endpoint.cc
src/core/ext/xds/xds_health_status.cc
src/core/ext/xds/xds_http_fault_filter.cc
src/core/ext/xds/xds_http_filters.cc
src/core/ext/xds/xds_http_rbac_filter.cc
src/core/ext/xds/xds_http_stateful_session_filter.cc
src/core/ext/xds/xds_lb_policy_registry.cc
src/core/ext/xds/xds_listener.cc
src/core/ext/xds/xds_route_config.cc
src/core/ext/xds/xds_routing.cc
src/core/ext/xds/xds_transport_grpc.cc
src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc
src/core/handshaker/handshaker.cc
src/core/handshaker/handshaker_registry.cc
@ -2622,6 +2598,30 @@ add_library(grpc
src/core/tsi/ssl_transport_security_utils.cc
src/core/tsi/transport_security.cc
src/core/tsi/transport_security_grpc.cc
src/core/xds/grpc/certificate_provider_store.cc
src/core/xds/grpc/file_watcher_certificate_provider_factory.cc
src/core/xds/grpc/xds_audit_logger_registry.cc
src/core/xds/grpc/xds_bootstrap_grpc.cc
src/core/xds/grpc/xds_certificate_provider.cc
src/core/xds/grpc/xds_client_grpc.cc
src/core/xds/grpc/xds_cluster.cc
src/core/xds/grpc/xds_cluster_specifier_plugin.cc
src/core/xds/grpc/xds_common_types.cc
src/core/xds/grpc/xds_endpoint.cc
src/core/xds/grpc/xds_health_status.cc
src/core/xds/grpc/xds_http_fault_filter.cc
src/core/xds/grpc/xds_http_filters.cc
src/core/xds/grpc/xds_http_rbac_filter.cc
src/core/xds/grpc/xds_http_stateful_session_filter.cc
src/core/xds/grpc/xds_lb_policy_registry.cc
src/core/xds/grpc/xds_listener.cc
src/core/xds/grpc/xds_route_config.cc
src/core/xds/grpc/xds_routing.cc
src/core/xds/grpc/xds_transport_grpc.cc
src/core/xds/xds_client/xds_api.cc
src/core/xds/xds_client/xds_bootstrap.cc
src/core/xds/xds_client/xds_client.cc
src/core/xds/xds_client/xds_client_stats.cc
)
target_compile_features(grpc PUBLIC cxx_std_14)
@ -2746,7 +2746,6 @@ foreach(_hdr
include/grpc/impl/propagation_bits.h
include/grpc/impl/slice_type.h
include/grpc/load_reporting.h
include/grpc/passive_listener.h
include/grpc/slice.h
include/grpc/slice_buffer.h
include/grpc/status.h
@ -3447,7 +3446,6 @@ foreach(_hdr
include/grpc/impl/propagation_bits.h
include/grpc/impl/slice_type.h
include/grpc/load_reporting.h
include/grpc/passive_listener.h
include/grpc/slice.h
include/grpc/slice_buffer.h
include/grpc/status.h
@ -4316,7 +4314,6 @@ foreach(_hdr
include/grpcpp/impl/service_type.h
include/grpcpp/impl/status.h
include/grpcpp/impl/sync.h
include/grpcpp/passive_listener.h
include/grpcpp/resource_quota.h
include/grpcpp/security/audit_logging.h
include/grpcpp/security/auth_context.h
@ -5057,7 +5054,6 @@ foreach(_hdr
include/grpcpp/impl/service_type.h
include/grpcpp/impl/status.h
include/grpcpp/impl/sync.h
include/grpcpp/passive_listener.h
include/grpcpp/resource_quota.h
include/grpcpp/security/audit_logging.h
include/grpcpp/security/auth_context.h
@ -5508,7 +5504,6 @@ foreach(_hdr
include/grpc/impl/propagation_bits.h
include/grpc/impl/slice_type.h
include/grpc/load_reporting.h
include/grpc/passive_listener.h
include/grpc/slice.h
include/grpc/slice_buffer.h
include/grpc/status.h
@ -26342,6 +26337,7 @@ add_executable(rls_end2end_test
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.grpc.pb.h
test/core/event_engine/event_engine_test_utils.cc
test/core/test_util/fake_stats_plugin.cc
test/core/test_util/test_lb_policies.cc
test/cpp/end2end/rls_end2end_test.cc
@ -26837,7 +26833,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.grpc.pb.h
test/core/event_engine/event_engine_test_utils.cc
test/core/test_util/cmdline.cc
test/core/test_util/fuzzer_util.cc
test/core/test_util/grpc_profiler.cc

51
Makefile generated

@ -368,7 +368,7 @@ Q = @
endif
CORE_VERSION = 41.0.0
CPP_VERSION = 1.64.0-dev
CPP_VERSION = 1.65.0-dev
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@ -1054,30 +1054,6 @@ LIBGRPC_SRC = \
src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.c \
src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c \
src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c \
src/core/ext/xds/certificate_provider_store.cc \
src/core/ext/xds/file_watcher_certificate_provider_factory.cc \
src/core/ext/xds/xds_api.cc \
src/core/ext/xds/xds_audit_logger_registry.cc \
src/core/ext/xds/xds_bootstrap.cc \
src/core/ext/xds/xds_bootstrap_grpc.cc \
src/core/ext/xds/xds_certificate_provider.cc \
src/core/ext/xds/xds_client.cc \
src/core/ext/xds/xds_client_grpc.cc \
src/core/ext/xds/xds_client_stats.cc \
src/core/ext/xds/xds_cluster.cc \
src/core/ext/xds/xds_cluster_specifier_plugin.cc \
src/core/ext/xds/xds_common_types.cc \
src/core/ext/xds/xds_endpoint.cc \
src/core/ext/xds/xds_health_status.cc \
src/core/ext/xds/xds_http_fault_filter.cc \
src/core/ext/xds/xds_http_filters.cc \
src/core/ext/xds/xds_http_rbac_filter.cc \
src/core/ext/xds/xds_http_stateful_session_filter.cc \
src/core/ext/xds/xds_lb_policy_registry.cc \
src/core/ext/xds/xds_listener.cc \
src/core/ext/xds/xds_route_config.cc \
src/core/ext/xds/xds_routing.cc \
src/core/ext/xds/xds_transport_grpc.cc \
src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc \
src/core/handshaker/handshaker.cc \
src/core/handshaker/handshaker_registry.cc \
@ -1508,6 +1484,30 @@ LIBGRPC_SRC = \
src/core/tsi/ssl_transport_security_utils.cc \
src/core/tsi/transport_security.cc \
src/core/tsi/transport_security_grpc.cc \
src/core/xds/grpc/certificate_provider_store.cc \
src/core/xds/grpc/file_watcher_certificate_provider_factory.cc \
src/core/xds/grpc/xds_audit_logger_registry.cc \
src/core/xds/grpc/xds_bootstrap_grpc.cc \
src/core/xds/grpc/xds_certificate_provider.cc \
src/core/xds/grpc/xds_client_grpc.cc \
src/core/xds/grpc/xds_cluster.cc \
src/core/xds/grpc/xds_cluster_specifier_plugin.cc \
src/core/xds/grpc/xds_common_types.cc \
src/core/xds/grpc/xds_endpoint.cc \
src/core/xds/grpc/xds_health_status.cc \
src/core/xds/grpc/xds_http_fault_filter.cc \
src/core/xds/grpc/xds_http_filters.cc \
src/core/xds/grpc/xds_http_rbac_filter.cc \
src/core/xds/grpc/xds_http_stateful_session_filter.cc \
src/core/xds/grpc/xds_lb_policy_registry.cc \
src/core/xds/grpc/xds_listener.cc \
src/core/xds/grpc/xds_route_config.cc \
src/core/xds/grpc/xds_routing.cc \
src/core/xds/grpc/xds_transport_grpc.cc \
src/core/xds/xds_client/xds_api.cc \
src/core/xds/xds_client/xds_bootstrap.cc \
src/core/xds/xds_client/xds_client.cc \
src/core/xds/xds_client/xds_client_stats.cc \
third_party/abseil-cpp/absl/base/internal/cycleclock.cc \
third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc \
third_party/abseil-cpp/absl/base/internal/raw_logging.cc \
@ -1775,7 +1775,6 @@ PUBLIC_HEADERS_C += \
include/grpc/impl/propagation_bits.h \
include/grpc/impl/slice_type.h \
include/grpc/load_reporting.h \
include/grpc/passive_listener.h \
include/grpc/slice.h \
include/grpc/slice_buffer.h \
include/grpc/status.h \

109
Package.swift generated

@ -93,7 +93,6 @@ let package = Package(
"include/grpc/impl/propagation_bits.h",
"include/grpc/impl/slice_type.h",
"include/grpc/load_reporting.h",
"include/grpc/passive_listener.h",
"include/grpc/slice.h",
"include/grpc/slice_buffer.h",
"include/grpc/status.h",
@ -1060,60 +1059,6 @@ let package = Package(
"src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h",
"src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c",
"src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h",
"src/core/ext/xds/certificate_provider_store.cc",
"src/core/ext/xds/certificate_provider_store.h",
"src/core/ext/xds/file_watcher_certificate_provider_factory.cc",
"src/core/ext/xds/file_watcher_certificate_provider_factory.h",
"src/core/ext/xds/upb_utils.h",
"src/core/ext/xds/xds_api.cc",
"src/core/ext/xds/xds_api.h",
"src/core/ext/xds/xds_audit_logger_registry.cc",
"src/core/ext/xds/xds_audit_logger_registry.h",
"src/core/ext/xds/xds_bootstrap.cc",
"src/core/ext/xds/xds_bootstrap.h",
"src/core/ext/xds/xds_bootstrap_grpc.cc",
"src/core/ext/xds/xds_bootstrap_grpc.h",
"src/core/ext/xds/xds_certificate_provider.cc",
"src/core/ext/xds/xds_certificate_provider.h",
"src/core/ext/xds/xds_channel_args.h",
"src/core/ext/xds/xds_client.cc",
"src/core/ext/xds/xds_client.h",
"src/core/ext/xds/xds_client_grpc.cc",
"src/core/ext/xds/xds_client_grpc.h",
"src/core/ext/xds/xds_client_stats.cc",
"src/core/ext/xds/xds_client_stats.h",
"src/core/ext/xds/xds_cluster.cc",
"src/core/ext/xds/xds_cluster.h",
"src/core/ext/xds/xds_cluster_specifier_plugin.cc",
"src/core/ext/xds/xds_cluster_specifier_plugin.h",
"src/core/ext/xds/xds_common_types.cc",
"src/core/ext/xds/xds_common_types.h",
"src/core/ext/xds/xds_endpoint.cc",
"src/core/ext/xds/xds_endpoint.h",
"src/core/ext/xds/xds_health_status.cc",
"src/core/ext/xds/xds_health_status.h",
"src/core/ext/xds/xds_http_fault_filter.cc",
"src/core/ext/xds/xds_http_fault_filter.h",
"src/core/ext/xds/xds_http_filters.cc",
"src/core/ext/xds/xds_http_filters.h",
"src/core/ext/xds/xds_http_rbac_filter.cc",
"src/core/ext/xds/xds_http_rbac_filter.h",
"src/core/ext/xds/xds_http_stateful_session_filter.cc",
"src/core/ext/xds/xds_http_stateful_session_filter.h",
"src/core/ext/xds/xds_lb_policy_registry.cc",
"src/core/ext/xds/xds_lb_policy_registry.h",
"src/core/ext/xds/xds_listener.cc",
"src/core/ext/xds/xds_listener.h",
"src/core/ext/xds/xds_metrics.h",
"src/core/ext/xds/xds_resource_type.h",
"src/core/ext/xds/xds_resource_type_impl.h",
"src/core/ext/xds/xds_route_config.cc",
"src/core/ext/xds/xds_route_config.h",
"src/core/ext/xds/xds_routing.cc",
"src/core/ext/xds/xds_routing.h",
"src/core/ext/xds/xds_transport.h",
"src/core/ext/xds/xds_transport_grpc.cc",
"src/core/ext/xds/xds_transport_grpc.h",
"src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc",
"src/core/handshaker/endpoint_info/endpoint_info_handshaker.h",
"src/core/handshaker/handshaker.cc",
@ -2007,6 +1952,60 @@ let package = Package(
"src/core/tsi/transport_security_grpc.cc",
"src/core/tsi/transport_security_grpc.h",
"src/core/tsi/transport_security_interface.h",
"src/core/xds/grpc/certificate_provider_store.cc",
"src/core/xds/grpc/certificate_provider_store.h",
"src/core/xds/grpc/file_watcher_certificate_provider_factory.cc",
"src/core/xds/grpc/file_watcher_certificate_provider_factory.h",
"src/core/xds/grpc/upb_utils.h",
"src/core/xds/grpc/xds_audit_logger_registry.cc",
"src/core/xds/grpc/xds_audit_logger_registry.h",
"src/core/xds/grpc/xds_bootstrap_grpc.cc",
"src/core/xds/grpc/xds_bootstrap_grpc.h",
"src/core/xds/grpc/xds_certificate_provider.cc",
"src/core/xds/grpc/xds_certificate_provider.h",
"src/core/xds/grpc/xds_client_grpc.cc",
"src/core/xds/grpc/xds_client_grpc.h",
"src/core/xds/grpc/xds_cluster.cc",
"src/core/xds/grpc/xds_cluster.h",
"src/core/xds/grpc/xds_cluster_specifier_plugin.cc",
"src/core/xds/grpc/xds_cluster_specifier_plugin.h",
"src/core/xds/grpc/xds_common_types.cc",
"src/core/xds/grpc/xds_common_types.h",
"src/core/xds/grpc/xds_endpoint.cc",
"src/core/xds/grpc/xds_endpoint.h",
"src/core/xds/grpc/xds_health_status.cc",
"src/core/xds/grpc/xds_health_status.h",
"src/core/xds/grpc/xds_http_fault_filter.cc",
"src/core/xds/grpc/xds_http_fault_filter.h",
"src/core/xds/grpc/xds_http_filters.cc",
"src/core/xds/grpc/xds_http_filters.h",
"src/core/xds/grpc/xds_http_rbac_filter.cc",
"src/core/xds/grpc/xds_http_rbac_filter.h",
"src/core/xds/grpc/xds_http_stateful_session_filter.cc",
"src/core/xds/grpc/xds_http_stateful_session_filter.h",
"src/core/xds/grpc/xds_lb_policy_registry.cc",
"src/core/xds/grpc/xds_lb_policy_registry.h",
"src/core/xds/grpc/xds_listener.cc",
"src/core/xds/grpc/xds_listener.h",
"src/core/xds/grpc/xds_route_config.cc",
"src/core/xds/grpc/xds_route_config.h",
"src/core/xds/grpc/xds_routing.cc",
"src/core/xds/grpc/xds_routing.h",
"src/core/xds/grpc/xds_transport_grpc.cc",
"src/core/xds/grpc/xds_transport_grpc.h",
"src/core/xds/xds_client/xds_api.cc",
"src/core/xds/xds_client/xds_api.h",
"src/core/xds/xds_client/xds_bootstrap.cc",
"src/core/xds/xds_client/xds_bootstrap.h",
"src/core/xds/xds_client/xds_channel_args.h",
"src/core/xds/xds_client/xds_client.cc",
"src/core/xds/xds_client/xds_client.h",
"src/core/xds/xds_client/xds_client_stats.cc",
"src/core/xds/xds_client/xds_client_stats.h",
"src/core/xds/xds_client/xds_metrics.h",
"src/core/xds/xds_client/xds_resource_type.h",
"src/core/xds/xds_client/xds_resource_type_impl.h",
"src/core/xds/xds_client/xds_transport.h",
"third_party/re2/re2/bitmap256.h",
"third_party/re2/re2/bitstate.cc",
"third_party/re2/re2/compile.cc",

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/_metadata.py.template`!!!
__version__ = """1.64.0.dev0"""
__version__ = """1.65.0.dev0"""

@ -198,7 +198,6 @@ libs:
- include/grpc/impl/propagation_bits.h
- include/grpc/impl/slice_type.h
- include/grpc/load_reporting.h
- include/grpc/passive_listener.h
- include/grpc/slice.h
- include/grpc/slice_buffer.h
- include/grpc/status.h
@ -777,36 +776,6 @@ libs:
- src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.h
- src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h
- src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h
- src/core/ext/xds/certificate_provider_store.h
- src/core/ext/xds/file_watcher_certificate_provider_factory.h
- src/core/ext/xds/upb_utils.h
- src/core/ext/xds/xds_api.h
- src/core/ext/xds/xds_audit_logger_registry.h
- src/core/ext/xds/xds_bootstrap.h
- src/core/ext/xds/xds_bootstrap_grpc.h
- src/core/ext/xds/xds_certificate_provider.h
- src/core/ext/xds/xds_channel_args.h
- src/core/ext/xds/xds_client.h
- src/core/ext/xds/xds_client_grpc.h
- src/core/ext/xds/xds_client_stats.h
- src/core/ext/xds/xds_cluster.h
- src/core/ext/xds/xds_cluster_specifier_plugin.h
- src/core/ext/xds/xds_common_types.h
- src/core/ext/xds/xds_endpoint.h
- src/core/ext/xds/xds_health_status.h
- src/core/ext/xds/xds_http_fault_filter.h
- src/core/ext/xds/xds_http_filters.h
- src/core/ext/xds/xds_http_rbac_filter.h
- src/core/ext/xds/xds_http_stateful_session_filter.h
- src/core/ext/xds/xds_lb_policy_registry.h
- src/core/ext/xds/xds_listener.h
- src/core/ext/xds/xds_metrics.h
- src/core/ext/xds/xds_resource_type.h
- src/core/ext/xds/xds_resource_type_impl.h
- src/core/ext/xds/xds_route_config.h
- src/core/ext/xds/xds_routing.h
- src/core/ext/xds/xds_transport.h
- src/core/ext/xds/xds_transport_grpc.h
- src/core/handshaker/endpoint_info/endpoint_info_handshaker.h
- src/core/handshaker/handshaker.h
- src/core/handshaker/handshaker_factory.h
@ -1242,6 +1211,36 @@ libs:
- src/core/tsi/transport_security.h
- src/core/tsi/transport_security_grpc.h
- src/core/tsi/transport_security_interface.h
- src/core/xds/grpc/certificate_provider_store.h
- src/core/xds/grpc/file_watcher_certificate_provider_factory.h
- src/core/xds/grpc/upb_utils.h
- src/core/xds/grpc/xds_audit_logger_registry.h
- src/core/xds/grpc/xds_bootstrap_grpc.h
- src/core/xds/grpc/xds_certificate_provider.h
- src/core/xds/grpc/xds_client_grpc.h
- src/core/xds/grpc/xds_cluster.h
- src/core/xds/grpc/xds_cluster_specifier_plugin.h
- src/core/xds/grpc/xds_common_types.h
- src/core/xds/grpc/xds_endpoint.h
- src/core/xds/grpc/xds_health_status.h
- src/core/xds/grpc/xds_http_fault_filter.h
- src/core/xds/grpc/xds_http_filters.h
- src/core/xds/grpc/xds_http_rbac_filter.h
- src/core/xds/grpc/xds_http_stateful_session_filter.h
- src/core/xds/grpc/xds_lb_policy_registry.h
- src/core/xds/grpc/xds_listener.h
- src/core/xds/grpc/xds_route_config.h
- src/core/xds/grpc/xds_routing.h
- src/core/xds/grpc/xds_transport_grpc.h
- src/core/xds/xds_client/xds_api.h
- src/core/xds/xds_client/xds_bootstrap.h
- src/core/xds/xds_client/xds_channel_args.h
- src/core/xds/xds_client/xds_client.h
- src/core/xds/xds_client/xds_client_stats.h
- src/core/xds/xds_client/xds_metrics.h
- src/core/xds/xds_client/xds_resource_type.h
- src/core/xds/xds_client/xds_resource_type_impl.h
- src/core/xds/xds_client/xds_transport.h
- third_party/upb/upb/generated_code_support.h
- third_party/xxhash/xxhash.h
src:
@ -1633,30 +1632,6 @@ libs:
- src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.c
- src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c
- src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c
- src/core/ext/xds/certificate_provider_store.cc
- src/core/ext/xds/file_watcher_certificate_provider_factory.cc
- src/core/ext/xds/xds_api.cc
- src/core/ext/xds/xds_audit_logger_registry.cc
- src/core/ext/xds/xds_bootstrap.cc
- src/core/ext/xds/xds_bootstrap_grpc.cc
- src/core/ext/xds/xds_certificate_provider.cc
- src/core/ext/xds/xds_client.cc
- src/core/ext/xds/xds_client_grpc.cc
- src/core/ext/xds/xds_client_stats.cc
- src/core/ext/xds/xds_cluster.cc
- src/core/ext/xds/xds_cluster_specifier_plugin.cc
- src/core/ext/xds/xds_common_types.cc
- src/core/ext/xds/xds_endpoint.cc
- src/core/ext/xds/xds_health_status.cc
- src/core/ext/xds/xds_http_fault_filter.cc
- src/core/ext/xds/xds_http_filters.cc
- src/core/ext/xds/xds_http_rbac_filter.cc
- src/core/ext/xds/xds_http_stateful_session_filter.cc
- src/core/ext/xds/xds_lb_policy_registry.cc
- src/core/ext/xds/xds_listener.cc
- src/core/ext/xds/xds_route_config.cc
- src/core/ext/xds/xds_routing.cc
- src/core/ext/xds/xds_transport_grpc.cc
- src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc
- src/core/handshaker/handshaker.cc
- src/core/handshaker/handshaker_registry.cc
@ -2042,6 +2017,30 @@ libs:
- src/core/tsi/ssl_transport_security_utils.cc
- src/core/tsi/transport_security.cc
- src/core/tsi/transport_security_grpc.cc
- src/core/xds/grpc/certificate_provider_store.cc
- src/core/xds/grpc/file_watcher_certificate_provider_factory.cc
- src/core/xds/grpc/xds_audit_logger_registry.cc
- src/core/xds/grpc/xds_bootstrap_grpc.cc
- src/core/xds/grpc/xds_certificate_provider.cc
- src/core/xds/grpc/xds_client_grpc.cc
- src/core/xds/grpc/xds_cluster.cc
- src/core/xds/grpc/xds_cluster_specifier_plugin.cc
- src/core/xds/grpc/xds_common_types.cc
- src/core/xds/grpc/xds_endpoint.cc
- src/core/xds/grpc/xds_health_status.cc
- src/core/xds/grpc/xds_http_fault_filter.cc
- src/core/xds/grpc/xds_http_filters.cc
- src/core/xds/grpc/xds_http_rbac_filter.cc
- src/core/xds/grpc/xds_http_stateful_session_filter.cc
- src/core/xds/grpc/xds_lb_policy_registry.cc
- src/core/xds/grpc/xds_listener.cc
- src/core/xds/grpc/xds_route_config.cc
- src/core/xds/grpc/xds_routing.cc
- src/core/xds/grpc/xds_transport_grpc.cc
- src/core/xds/xds_client/xds_api.cc
- src/core/xds/xds_client/xds_bootstrap.cc
- src/core/xds/xds_client/xds_client.cc
- src/core/xds/xds_client/xds_client_stats.cc
deps:
- upb_json_lib
- upb_textformat_lib
@ -2183,7 +2182,6 @@ libs:
- include/grpc/impl/propagation_bits.h
- include/grpc/impl/slice_type.h
- include/grpc/load_reporting.h
- include/grpc/passive_listener.h
- include/grpc/slice.h
- include/grpc/slice_buffer.h
- include/grpc/status.h
@ -3788,7 +3786,6 @@ libs:
- include/grpcpp/impl/service_type.h
- include/grpcpp/impl/status.h
- include/grpcpp/impl/sync.h
- include/grpcpp/passive_listener.h
- include/grpcpp/resource_quota.h
- include/grpcpp/security/audit_logging.h
- include/grpcpp/security/auth_context.h
@ -3853,7 +3850,7 @@ libs:
- src/core/ext/transport/binder/wire_format/wire_reader.h
- src/core/ext/transport/binder/wire_format/wire_reader_impl.h
- src/core/ext/transport/binder/wire_format/wire_writer.h
- src/core/ext/xds/xds_enabled_server.h
- src/core/xds/grpc/xds_enabled_server.h
- src/cpp/client/client_stats_interceptor.h
- src/cpp/client/create_channel_internal.h
- src/cpp/client/secure_credentials.h
@ -4216,7 +4213,6 @@ libs:
- include/grpcpp/impl/service_type.h
- include/grpcpp/impl/status.h
- include/grpcpp/impl/sync.h
- include/grpcpp/passive_listener.h
- include/grpcpp/resource_quota.h
- include/grpcpp/security/audit_logging.h
- include/grpcpp/security/auth_context.h
@ -4365,7 +4361,6 @@ libs:
- include/grpc/impl/propagation_bits.h
- include/grpc/impl/slice_type.h
- include/grpc/load_reporting.h
- include/grpc/passive_listener.h
- include/grpc/slice.h
- include/grpc/slice_buffer.h
- include/grpc/status.h
@ -17601,6 +17596,7 @@ targets:
run: false
language: c++
headers:
- test/core/event_engine/event_engine_test_utils.h
- test/core/test_util/fake_stats_plugin.h
- test/core/test_util/test_lb_policies.h
- test/cpp/end2end/counted_service.h
@ -17613,6 +17609,7 @@ targets:
- src/proto/grpc/testing/echo_messages.proto
- src/proto/grpc/testing/simple_messages.proto
- src/proto/grpc/testing/xds/v3/orca_load_report.proto
- test/core/event_engine/event_engine_test_utils.cc
- test/core/test_util/fake_stats_plugin.cc
- test/core/test_util/test_lb_policies.cc
- test/cpp/end2end/rls_end2end_test.cc
@ -17787,7 +17784,6 @@ targets:
build: test
language: c++
headers:
- test/core/event_engine/event_engine_test_utils.h
- test/core/test_util/cmdline.h
- test/core/test_util/evaluate_args_test_util.h
- test/core/test_util/fuzzer_util.h
@ -17803,7 +17799,6 @@ targets:
- src/proto/grpc/testing/echo_messages.proto
- src/proto/grpc/testing/simple_messages.proto
- src/proto/grpc/testing/xds/v3/orca_load_report.proto
- test/core/event_engine/event_engine_test_utils.cc
- test/core/test_util/cmdline.cc
- test/core/test_util/fuzzer_util.cc
- test/core/test_util/grpc_profiler.cc

@ -14,9 +14,9 @@ settings:
'#10': See the expand_version.py for all the quirks here
core_version: 41.0.0
csharp_major_version: 2
g_stands_for: grateful
g_stands_for: gnarly
protobuf_version: 3.26.1
version: 1.64.0-dev
version: 1.65.0-dev
configs:
asan:
CC: clang

53
config.m4 generated

@ -429,30 +429,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.c \
src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c \
src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c \
src/core/ext/xds/certificate_provider_store.cc \
src/core/ext/xds/file_watcher_certificate_provider_factory.cc \
src/core/ext/xds/xds_api.cc \
src/core/ext/xds/xds_audit_logger_registry.cc \
src/core/ext/xds/xds_bootstrap.cc \
src/core/ext/xds/xds_bootstrap_grpc.cc \
src/core/ext/xds/xds_certificate_provider.cc \
src/core/ext/xds/xds_client.cc \
src/core/ext/xds/xds_client_grpc.cc \
src/core/ext/xds/xds_client_stats.cc \
src/core/ext/xds/xds_cluster.cc \
src/core/ext/xds/xds_cluster_specifier_plugin.cc \
src/core/ext/xds/xds_common_types.cc \
src/core/ext/xds/xds_endpoint.cc \
src/core/ext/xds/xds_health_status.cc \
src/core/ext/xds/xds_http_fault_filter.cc \
src/core/ext/xds/xds_http_filters.cc \
src/core/ext/xds/xds_http_rbac_filter.cc \
src/core/ext/xds/xds_http_stateful_session_filter.cc \
src/core/ext/xds/xds_lb_policy_registry.cc \
src/core/ext/xds/xds_listener.cc \
src/core/ext/xds/xds_route_config.cc \
src/core/ext/xds/xds_routing.cc \
src/core/ext/xds/xds_transport_grpc.cc \
src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc \
src/core/handshaker/handshaker.cc \
src/core/handshaker/handshaker_registry.cc \
@ -883,6 +859,30 @@ if test "$PHP_GRPC" != "no"; then
src/core/tsi/ssl_transport_security_utils.cc \
src/core/tsi/transport_security.cc \
src/core/tsi/transport_security_grpc.cc \
src/core/xds/grpc/certificate_provider_store.cc \
src/core/xds/grpc/file_watcher_certificate_provider_factory.cc \
src/core/xds/grpc/xds_audit_logger_registry.cc \
src/core/xds/grpc/xds_bootstrap_grpc.cc \
src/core/xds/grpc/xds_certificate_provider.cc \
src/core/xds/grpc/xds_client_grpc.cc \
src/core/xds/grpc/xds_cluster.cc \
src/core/xds/grpc/xds_cluster_specifier_plugin.cc \
src/core/xds/grpc/xds_common_types.cc \
src/core/xds/grpc/xds_endpoint.cc \
src/core/xds/grpc/xds_health_status.cc \
src/core/xds/grpc/xds_http_fault_filter.cc \
src/core/xds/grpc/xds_http_filters.cc \
src/core/xds/grpc/xds_http_rbac_filter.cc \
src/core/xds/grpc/xds_http_stateful_session_filter.cc \
src/core/xds/grpc/xds_lb_policy_registry.cc \
src/core/xds/grpc/xds_listener.cc \
src/core/xds/grpc/xds_route_config.cc \
src/core/xds/grpc/xds_routing.cc \
src/core/xds/grpc/xds_transport_grpc.cc \
src/core/xds/xds_client/xds_api.cc \
src/core/xds/xds_client/xds_bootstrap.cc \
src/core/xds/xds_client/xds_client.cc \
src/core/xds/xds_client/xds_client_stats.cc \
src/php/ext/grpc/byte_buffer.c \
src/php/ext/grpc/call.c \
src/php/ext/grpc/call_credentials.c \
@ -1383,7 +1383,7 @@ if test "$PHP_GRPC" != "no"; then
-D_HAS_EXCEPTIONS=0 -DNOMINMAX -DGRPC_ARES=0 \
-DGRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK=1 \
-DGRPC_XDS_USER_AGENT_NAME_SUFFIX='"\"PHP\""' \
-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"\"1.64.0dev\""')
-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"\"1.65.0dev\""')
PHP_ADD_BUILD_DIR($ext_builddir/src/core/channelz)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_channel)
@ -1506,7 +1506,6 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-gen/xds/core/v3)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-gen/xds/type/matcher/v3)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-gen/xds/type/v3)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/xds)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/handshaker)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/handshaker/endpoint_info)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/handshaker/http_connect)
@ -1606,6 +1605,8 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/zero_copy_frame_protector)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/ssl/key_logging)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/ssl/session_cache)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/xds/grpc)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/xds/xds_client)
PHP_ADD_BUILD_DIR($ext_builddir/src/php/ext/grpc)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/base)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/base/internal)

52
config.w32 generated

@ -394,30 +394,6 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\upbdefs-gen\\xds\\type\\v3\\cel.upbdefs.c " +
"src\\core\\ext\\upbdefs-gen\\xds\\type\\v3\\range.upbdefs.c " +
"src\\core\\ext\\upbdefs-gen\\xds\\type\\v3\\typed_struct.upbdefs.c " +
"src\\core\\ext\\xds\\certificate_provider_store.cc " +
"src\\core\\ext\\xds\\file_watcher_certificate_provider_factory.cc " +
"src\\core\\ext\\xds\\xds_api.cc " +
"src\\core\\ext\\xds\\xds_audit_logger_registry.cc " +
"src\\core\\ext\\xds\\xds_bootstrap.cc " +
"src\\core\\ext\\xds\\xds_bootstrap_grpc.cc " +
"src\\core\\ext\\xds\\xds_certificate_provider.cc " +
"src\\core\\ext\\xds\\xds_client.cc " +
"src\\core\\ext\\xds\\xds_client_grpc.cc " +
"src\\core\\ext\\xds\\xds_client_stats.cc " +
"src\\core\\ext\\xds\\xds_cluster.cc " +
"src\\core\\ext\\xds\\xds_cluster_specifier_plugin.cc " +
"src\\core\\ext\\xds\\xds_common_types.cc " +
"src\\core\\ext\\xds\\xds_endpoint.cc " +
"src\\core\\ext\\xds\\xds_health_status.cc " +
"src\\core\\ext\\xds\\xds_http_fault_filter.cc " +
"src\\core\\ext\\xds\\xds_http_filters.cc " +
"src\\core\\ext\\xds\\xds_http_rbac_filter.cc " +
"src\\core\\ext\\xds\\xds_http_stateful_session_filter.cc " +
"src\\core\\ext\\xds\\xds_lb_policy_registry.cc " +
"src\\core\\ext\\xds\\xds_listener.cc " +
"src\\core\\ext\\xds\\xds_route_config.cc " +
"src\\core\\ext\\xds\\xds_routing.cc " +
"src\\core\\ext\\xds\\xds_transport_grpc.cc " +
"src\\core\\handshaker\\endpoint_info\\endpoint_info_handshaker.cc " +
"src\\core\\handshaker\\handshaker.cc " +
"src\\core\\handshaker\\handshaker_registry.cc " +
@ -848,6 +824,30 @@ if (PHP_GRPC != "no") {
"src\\core\\tsi\\ssl_transport_security_utils.cc " +
"src\\core\\tsi\\transport_security.cc " +
"src\\core\\tsi\\transport_security_grpc.cc " +
"src\\core\\xds\\grpc\\certificate_provider_store.cc " +
"src\\core\\xds\\grpc\\file_watcher_certificate_provider_factory.cc " +
"src\\core\\xds\\grpc\\xds_audit_logger_registry.cc " +
"src\\core\\xds\\grpc\\xds_bootstrap_grpc.cc " +
"src\\core\\xds\\grpc\\xds_certificate_provider.cc " +
"src\\core\\xds\\grpc\\xds_client_grpc.cc " +
"src\\core\\xds\\grpc\\xds_cluster.cc " +
"src\\core\\xds\\grpc\\xds_cluster_specifier_plugin.cc " +
"src\\core\\xds\\grpc\\xds_common_types.cc " +
"src\\core\\xds\\grpc\\xds_endpoint.cc " +
"src\\core\\xds\\grpc\\xds_health_status.cc " +
"src\\core\\xds\\grpc\\xds_http_fault_filter.cc " +
"src\\core\\xds\\grpc\\xds_http_filters.cc " +
"src\\core\\xds\\grpc\\xds_http_rbac_filter.cc " +
"src\\core\\xds\\grpc\\xds_http_stateful_session_filter.cc " +
"src\\core\\xds\\grpc\\xds_lb_policy_registry.cc " +
"src\\core\\xds\\grpc\\xds_listener.cc " +
"src\\core\\xds\\grpc\\xds_route_config.cc " +
"src\\core\\xds\\grpc\\xds_routing.cc " +
"src\\core\\xds\\grpc\\xds_transport_grpc.cc " +
"src\\core\\xds\\xds_client\\xds_api.cc " +
"src\\core\\xds\\xds_client\\xds_bootstrap.cc " +
"src\\core\\xds\\xds_client\\xds_client.cc " +
"src\\core\\xds\\xds_client\\xds_client_stats.cc " +
"src\\php\\ext\\grpc\\byte_buffer.c " +
"src\\php\\ext\\grpc\\call.c " +
"src\\php\\ext\\grpc\\call_credentials.c " +
@ -1642,7 +1642,6 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-gen\\xds\\type\\matcher");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-gen\\xds\\type\\matcher\\v3");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-gen\\xds\\type\\v3");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\xds");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\handshaker");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\handshaker\\endpoint_info");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\handshaker\\http_connect");
@ -1746,6 +1745,9 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\ssl");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\ssl\\key_logging");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\ssl\\session_cache");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\xds");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\xds\\grpc");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\xds\\xds_client");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php\\ext");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php\\ext\\grpc");

@ -63,4 +63,5 @@
- 1.61 'g' stands for ['grand'](https://github.com/grpc/grpc/tree/v1.61.x)
- 1.62 'g' stands for ['guardian'](https://github.com/grpc/grpc/tree/v1.62.x)
- 1.63 'g' stands for ['giggle'](https://github.com/grpc/grpc/tree/v1.63.x)
- 1.64 'g' stands for ['grateful'](https://github.com/grpc/grpc/tree/master)
- 1.64 'g' stands for ['grateful'](https://github.com/grpc/grpc/tree/v1.64.x)
- 1.65 'g' stands for ['gnarly'](https://github.com/grpc/grpc/tree/master)

127
gRPC-C++.podspec generated

@ -22,7 +22,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-C++'
# TODO (mxyan): use version that match gRPC version when pod is stabilized
version = '1.64.0-dev'
version = '1.65.0-dev'
s.version = version
s.summary = 'gRPC C++ library'
s.homepage = 'https://grpc.io'
@ -176,7 +176,6 @@ Pod::Spec.new do |s|
'include/grpcpp/impl/service_type.h',
'include/grpcpp/impl/status.h',
'include/grpcpp/impl/sync.h',
'include/grpcpp/passive_listener.h',
'include/grpcpp/resource_quota.h',
'include/grpcpp/security/audit_logging.h',
'include/grpcpp/security/auth_context.h',
@ -856,37 +855,6 @@ Pod::Spec.new do |s|
'src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.h',
'src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h',
'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h',
'src/core/ext/xds/certificate_provider_store.h',
'src/core/ext/xds/file_watcher_certificate_provider_factory.h',
'src/core/ext/xds/upb_utils.h',
'src/core/ext/xds/xds_api.h',
'src/core/ext/xds/xds_audit_logger_registry.h',
'src/core/ext/xds/xds_bootstrap.h',
'src/core/ext/xds/xds_bootstrap_grpc.h',
'src/core/ext/xds/xds_certificate_provider.h',
'src/core/ext/xds/xds_channel_args.h',
'src/core/ext/xds/xds_client.h',
'src/core/ext/xds/xds_client_grpc.h',
'src/core/ext/xds/xds_client_stats.h',
'src/core/ext/xds/xds_cluster.h',
'src/core/ext/xds/xds_cluster_specifier_plugin.h',
'src/core/ext/xds/xds_common_types.h',
'src/core/ext/xds/xds_enabled_server.h',
'src/core/ext/xds/xds_endpoint.h',
'src/core/ext/xds/xds_health_status.h',
'src/core/ext/xds/xds_http_fault_filter.h',
'src/core/ext/xds/xds_http_filters.h',
'src/core/ext/xds/xds_http_rbac_filter.h',
'src/core/ext/xds/xds_http_stateful_session_filter.h',
'src/core/ext/xds/xds_lb_policy_registry.h',
'src/core/ext/xds/xds_listener.h',
'src/core/ext/xds/xds_metrics.h',
'src/core/ext/xds/xds_resource_type.h',
'src/core/ext/xds/xds_resource_type_impl.h',
'src/core/ext/xds/xds_route_config.h',
'src/core/ext/xds/xds_routing.h',
'src/core/ext/xds/xds_transport.h',
'src/core/ext/xds/xds_transport_grpc.h',
'src/core/handshaker/endpoint_info/endpoint_info_handshaker.h',
'src/core/handshaker/handshaker.h',
'src/core/handshaker/handshaker_factory.h',
@ -1346,6 +1314,37 @@ Pod::Spec.new do |s|
'src/core/tsi/transport_security.h',
'src/core/tsi/transport_security_grpc.h',
'src/core/tsi/transport_security_interface.h',
'src/core/xds/grpc/certificate_provider_store.h',
'src/core/xds/grpc/file_watcher_certificate_provider_factory.h',
'src/core/xds/grpc/upb_utils.h',
'src/core/xds/grpc/xds_audit_logger_registry.h',
'src/core/xds/grpc/xds_bootstrap_grpc.h',
'src/core/xds/grpc/xds_certificate_provider.h',
'src/core/xds/grpc/xds_client_grpc.h',
'src/core/xds/grpc/xds_cluster.h',
'src/core/xds/grpc/xds_cluster_specifier_plugin.h',
'src/core/xds/grpc/xds_common_types.h',
'src/core/xds/grpc/xds_enabled_server.h',
'src/core/xds/grpc/xds_endpoint.h',
'src/core/xds/grpc/xds_health_status.h',
'src/core/xds/grpc/xds_http_fault_filter.h',
'src/core/xds/grpc/xds_http_filters.h',
'src/core/xds/grpc/xds_http_rbac_filter.h',
'src/core/xds/grpc/xds_http_stateful_session_filter.h',
'src/core/xds/grpc/xds_lb_policy_registry.h',
'src/core/xds/grpc/xds_listener.h',
'src/core/xds/grpc/xds_route_config.h',
'src/core/xds/grpc/xds_routing.h',
'src/core/xds/grpc/xds_transport_grpc.h',
'src/core/xds/xds_client/xds_api.h',
'src/core/xds/xds_client/xds_bootstrap.h',
'src/core/xds/xds_client/xds_channel_args.h',
'src/core/xds/xds_client/xds_client.h',
'src/core/xds/xds_client/xds_client_stats.h',
'src/core/xds/xds_client/xds_metrics.h',
'src/core/xds/xds_client/xds_resource_type.h',
'src/core/xds/xds_client/xds_resource_type_impl.h',
'src/core/xds/xds_client/xds_transport.h',
'src/cpp/client/call_credentials.cc',
'src/cpp/client/channel_cc.cc',
'src/cpp/client/channel_credentials.cc',
@ -2125,37 +2124,6 @@ Pod::Spec.new do |s|
'src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.h',
'src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h',
'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h',
'src/core/ext/xds/certificate_provider_store.h',
'src/core/ext/xds/file_watcher_certificate_provider_factory.h',
'src/core/ext/xds/upb_utils.h',
'src/core/ext/xds/xds_api.h',
'src/core/ext/xds/xds_audit_logger_registry.h',
'src/core/ext/xds/xds_bootstrap.h',
'src/core/ext/xds/xds_bootstrap_grpc.h',
'src/core/ext/xds/xds_certificate_provider.h',
'src/core/ext/xds/xds_channel_args.h',
'src/core/ext/xds/xds_client.h',
'src/core/ext/xds/xds_client_grpc.h',
'src/core/ext/xds/xds_client_stats.h',
'src/core/ext/xds/xds_cluster.h',
'src/core/ext/xds/xds_cluster_specifier_plugin.h',
'src/core/ext/xds/xds_common_types.h',
'src/core/ext/xds/xds_enabled_server.h',
'src/core/ext/xds/xds_endpoint.h',
'src/core/ext/xds/xds_health_status.h',
'src/core/ext/xds/xds_http_fault_filter.h',
'src/core/ext/xds/xds_http_filters.h',
'src/core/ext/xds/xds_http_rbac_filter.h',
'src/core/ext/xds/xds_http_stateful_session_filter.h',
'src/core/ext/xds/xds_lb_policy_registry.h',
'src/core/ext/xds/xds_listener.h',
'src/core/ext/xds/xds_metrics.h',
'src/core/ext/xds/xds_resource_type.h',
'src/core/ext/xds/xds_resource_type_impl.h',
'src/core/ext/xds/xds_route_config.h',
'src/core/ext/xds/xds_routing.h',
'src/core/ext/xds/xds_transport.h',
'src/core/ext/xds/xds_transport_grpc.h',
'src/core/handshaker/endpoint_info/endpoint_info_handshaker.h',
'src/core/handshaker/handshaker.h',
'src/core/handshaker/handshaker_factory.h',
@ -2615,6 +2583,37 @@ Pod::Spec.new do |s|
'src/core/tsi/transport_security.h',
'src/core/tsi/transport_security_grpc.h',
'src/core/tsi/transport_security_interface.h',
'src/core/xds/grpc/certificate_provider_store.h',
'src/core/xds/grpc/file_watcher_certificate_provider_factory.h',
'src/core/xds/grpc/upb_utils.h',
'src/core/xds/grpc/xds_audit_logger_registry.h',
'src/core/xds/grpc/xds_bootstrap_grpc.h',
'src/core/xds/grpc/xds_certificate_provider.h',
'src/core/xds/grpc/xds_client_grpc.h',
'src/core/xds/grpc/xds_cluster.h',
'src/core/xds/grpc/xds_cluster_specifier_plugin.h',
'src/core/xds/grpc/xds_common_types.h',
'src/core/xds/grpc/xds_enabled_server.h',
'src/core/xds/grpc/xds_endpoint.h',
'src/core/xds/grpc/xds_health_status.h',
'src/core/xds/grpc/xds_http_fault_filter.h',
'src/core/xds/grpc/xds_http_filters.h',
'src/core/xds/grpc/xds_http_rbac_filter.h',
'src/core/xds/grpc/xds_http_stateful_session_filter.h',
'src/core/xds/grpc/xds_lb_policy_registry.h',
'src/core/xds/grpc/xds_listener.h',
'src/core/xds/grpc/xds_route_config.h',
'src/core/xds/grpc/xds_routing.h',
'src/core/xds/grpc/xds_transport_grpc.h',
'src/core/xds/xds_client/xds_api.h',
'src/core/xds/xds_client/xds_bootstrap.h',
'src/core/xds/xds_client/xds_channel_args.h',
'src/core/xds/xds_client/xds_client.h',
'src/core/xds/xds_client/xds_client_stats.h',
'src/core/xds/xds_client/xds_metrics.h',
'src/core/xds/xds_client/xds_resource_type.h',
'src/core/xds/xds_client/xds_resource_type_impl.h',
'src/core/xds/xds_client/xds_transport.h',
'src/cpp/client/client_stats_interceptor.h',
'src/cpp/client/create_channel_internal.h',
'src/cpp/client/secure_credentials.h',

171
gRPC-Core.podspec generated

@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-Core'
version = '1.64.0-dev'
version = '1.65.0-dev'
s.version = version
s.summary = 'Core cross-platform gRPC library, written in C'
s.homepage = 'https://grpc.io'
@ -168,7 +168,6 @@ Pod::Spec.new do |s|
'include/grpc/impl/propagation_bits.h',
'include/grpc/impl/slice_type.h',
'include/grpc/load_reporting.h',
'include/grpc/passive_listener.h',
'include/grpc/slice.h',
'include/grpc/slice_buffer.h',
'include/grpc/status.h',
@ -1179,60 +1178,6 @@ Pod::Spec.new do |s|
'src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h',
'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c',
'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h',
'src/core/ext/xds/certificate_provider_store.cc',
'src/core/ext/xds/certificate_provider_store.h',
'src/core/ext/xds/file_watcher_certificate_provider_factory.cc',
'src/core/ext/xds/file_watcher_certificate_provider_factory.h',
'src/core/ext/xds/upb_utils.h',
'src/core/ext/xds/xds_api.cc',
'src/core/ext/xds/xds_api.h',
'src/core/ext/xds/xds_audit_logger_registry.cc',
'src/core/ext/xds/xds_audit_logger_registry.h',
'src/core/ext/xds/xds_bootstrap.cc',
'src/core/ext/xds/xds_bootstrap.h',
'src/core/ext/xds/xds_bootstrap_grpc.cc',
'src/core/ext/xds/xds_bootstrap_grpc.h',
'src/core/ext/xds/xds_certificate_provider.cc',
'src/core/ext/xds/xds_certificate_provider.h',
'src/core/ext/xds/xds_channel_args.h',
'src/core/ext/xds/xds_client.cc',
'src/core/ext/xds/xds_client.h',
'src/core/ext/xds/xds_client_grpc.cc',
'src/core/ext/xds/xds_client_grpc.h',
'src/core/ext/xds/xds_client_stats.cc',
'src/core/ext/xds/xds_client_stats.h',
'src/core/ext/xds/xds_cluster.cc',
'src/core/ext/xds/xds_cluster.h',
'src/core/ext/xds/xds_cluster_specifier_plugin.cc',
'src/core/ext/xds/xds_cluster_specifier_plugin.h',
'src/core/ext/xds/xds_common_types.cc',
'src/core/ext/xds/xds_common_types.h',
'src/core/ext/xds/xds_endpoint.cc',
'src/core/ext/xds/xds_endpoint.h',
'src/core/ext/xds/xds_health_status.cc',
'src/core/ext/xds/xds_health_status.h',
'src/core/ext/xds/xds_http_fault_filter.cc',
'src/core/ext/xds/xds_http_fault_filter.h',
'src/core/ext/xds/xds_http_filters.cc',
'src/core/ext/xds/xds_http_filters.h',
'src/core/ext/xds/xds_http_rbac_filter.cc',
'src/core/ext/xds/xds_http_rbac_filter.h',
'src/core/ext/xds/xds_http_stateful_session_filter.cc',
'src/core/ext/xds/xds_http_stateful_session_filter.h',
'src/core/ext/xds/xds_lb_policy_registry.cc',
'src/core/ext/xds/xds_lb_policy_registry.h',
'src/core/ext/xds/xds_listener.cc',
'src/core/ext/xds/xds_listener.h',
'src/core/ext/xds/xds_metrics.h',
'src/core/ext/xds/xds_resource_type.h',
'src/core/ext/xds/xds_resource_type_impl.h',
'src/core/ext/xds/xds_route_config.cc',
'src/core/ext/xds/xds_route_config.h',
'src/core/ext/xds/xds_routing.cc',
'src/core/ext/xds/xds_routing.h',
'src/core/ext/xds/xds_transport.h',
'src/core/ext/xds/xds_transport_grpc.cc',
'src/core/ext/xds/xds_transport_grpc.h',
'src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc',
'src/core/handshaker/endpoint_info/endpoint_info_handshaker.h',
'src/core/handshaker/handshaker.cc',
@ -2122,6 +2067,60 @@ Pod::Spec.new do |s|
'src/core/tsi/transport_security_grpc.cc',
'src/core/tsi/transport_security_grpc.h',
'src/core/tsi/transport_security_interface.h',
'src/core/xds/grpc/certificate_provider_store.cc',
'src/core/xds/grpc/certificate_provider_store.h',
'src/core/xds/grpc/file_watcher_certificate_provider_factory.cc',
'src/core/xds/grpc/file_watcher_certificate_provider_factory.h',
'src/core/xds/grpc/upb_utils.h',
'src/core/xds/grpc/xds_audit_logger_registry.cc',
'src/core/xds/grpc/xds_audit_logger_registry.h',
'src/core/xds/grpc/xds_bootstrap_grpc.cc',
'src/core/xds/grpc/xds_bootstrap_grpc.h',
'src/core/xds/grpc/xds_certificate_provider.cc',
'src/core/xds/grpc/xds_certificate_provider.h',
'src/core/xds/grpc/xds_client_grpc.cc',
'src/core/xds/grpc/xds_client_grpc.h',
'src/core/xds/grpc/xds_cluster.cc',
'src/core/xds/grpc/xds_cluster.h',
'src/core/xds/grpc/xds_cluster_specifier_plugin.cc',
'src/core/xds/grpc/xds_cluster_specifier_plugin.h',
'src/core/xds/grpc/xds_common_types.cc',
'src/core/xds/grpc/xds_common_types.h',
'src/core/xds/grpc/xds_endpoint.cc',
'src/core/xds/grpc/xds_endpoint.h',
'src/core/xds/grpc/xds_health_status.cc',
'src/core/xds/grpc/xds_health_status.h',
'src/core/xds/grpc/xds_http_fault_filter.cc',
'src/core/xds/grpc/xds_http_fault_filter.h',
'src/core/xds/grpc/xds_http_filters.cc',
'src/core/xds/grpc/xds_http_filters.h',
'src/core/xds/grpc/xds_http_rbac_filter.cc',
'src/core/xds/grpc/xds_http_rbac_filter.h',
'src/core/xds/grpc/xds_http_stateful_session_filter.cc',
'src/core/xds/grpc/xds_http_stateful_session_filter.h',
'src/core/xds/grpc/xds_lb_policy_registry.cc',
'src/core/xds/grpc/xds_lb_policy_registry.h',
'src/core/xds/grpc/xds_listener.cc',
'src/core/xds/grpc/xds_listener.h',
'src/core/xds/grpc/xds_route_config.cc',
'src/core/xds/grpc/xds_route_config.h',
'src/core/xds/grpc/xds_routing.cc',
'src/core/xds/grpc/xds_routing.h',
'src/core/xds/grpc/xds_transport_grpc.cc',
'src/core/xds/grpc/xds_transport_grpc.h',
'src/core/xds/xds_client/xds_api.cc',
'src/core/xds/xds_client/xds_api.h',
'src/core/xds/xds_client/xds_bootstrap.cc',
'src/core/xds/xds_client/xds_bootstrap.h',
'src/core/xds/xds_client/xds_channel_args.h',
'src/core/xds/xds_client/xds_client.cc',
'src/core/xds/xds_client/xds_client.h',
'src/core/xds/xds_client/xds_client_stats.cc',
'src/core/xds/xds_client/xds_client_stats.h',
'src/core/xds/xds_client/xds_metrics.h',
'src/core/xds/xds_client/xds_resource_type.h',
'src/core/xds/xds_client/xds_resource_type_impl.h',
'src/core/xds/xds_client/xds_transport.h',
'third_party/re2/re2/bitmap256.h',
'third_party/re2/re2/bitstate.cc',
'third_party/re2/re2/compile.cc',
@ -2904,36 +2903,6 @@ Pod::Spec.new do |s|
'src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.h',
'src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h',
'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h',
'src/core/ext/xds/certificate_provider_store.h',
'src/core/ext/xds/file_watcher_certificate_provider_factory.h',
'src/core/ext/xds/upb_utils.h',
'src/core/ext/xds/xds_api.h',
'src/core/ext/xds/xds_audit_logger_registry.h',
'src/core/ext/xds/xds_bootstrap.h',
'src/core/ext/xds/xds_bootstrap_grpc.h',
'src/core/ext/xds/xds_certificate_provider.h',
'src/core/ext/xds/xds_channel_args.h',
'src/core/ext/xds/xds_client.h',
'src/core/ext/xds/xds_client_grpc.h',
'src/core/ext/xds/xds_client_stats.h',
'src/core/ext/xds/xds_cluster.h',
'src/core/ext/xds/xds_cluster_specifier_plugin.h',
'src/core/ext/xds/xds_common_types.h',
'src/core/ext/xds/xds_endpoint.h',
'src/core/ext/xds/xds_health_status.h',
'src/core/ext/xds/xds_http_fault_filter.h',
'src/core/ext/xds/xds_http_filters.h',
'src/core/ext/xds/xds_http_rbac_filter.h',
'src/core/ext/xds/xds_http_stateful_session_filter.h',
'src/core/ext/xds/xds_lb_policy_registry.h',
'src/core/ext/xds/xds_listener.h',
'src/core/ext/xds/xds_metrics.h',
'src/core/ext/xds/xds_resource_type.h',
'src/core/ext/xds/xds_resource_type_impl.h',
'src/core/ext/xds/xds_route_config.h',
'src/core/ext/xds/xds_routing.h',
'src/core/ext/xds/xds_transport.h',
'src/core/ext/xds/xds_transport_grpc.h',
'src/core/handshaker/endpoint_info/endpoint_info_handshaker.h',
'src/core/handshaker/handshaker.h',
'src/core/handshaker/handshaker_factory.h',
@ -3393,6 +3362,36 @@ Pod::Spec.new do |s|
'src/core/tsi/transport_security.h',
'src/core/tsi/transport_security_grpc.h',
'src/core/tsi/transport_security_interface.h',
'src/core/xds/grpc/certificate_provider_store.h',
'src/core/xds/grpc/file_watcher_certificate_provider_factory.h',
'src/core/xds/grpc/upb_utils.h',
'src/core/xds/grpc/xds_audit_logger_registry.h',
'src/core/xds/grpc/xds_bootstrap_grpc.h',
'src/core/xds/grpc/xds_certificate_provider.h',
'src/core/xds/grpc/xds_client_grpc.h',
'src/core/xds/grpc/xds_cluster.h',
'src/core/xds/grpc/xds_cluster_specifier_plugin.h',
'src/core/xds/grpc/xds_common_types.h',
'src/core/xds/grpc/xds_endpoint.h',
'src/core/xds/grpc/xds_health_status.h',
'src/core/xds/grpc/xds_http_fault_filter.h',
'src/core/xds/grpc/xds_http_filters.h',
'src/core/xds/grpc/xds_http_rbac_filter.h',
'src/core/xds/grpc/xds_http_stateful_session_filter.h',
'src/core/xds/grpc/xds_lb_policy_registry.h',
'src/core/xds/grpc/xds_listener.h',
'src/core/xds/grpc/xds_route_config.h',
'src/core/xds/grpc/xds_routing.h',
'src/core/xds/grpc/xds_transport_grpc.h',
'src/core/xds/xds_client/xds_api.h',
'src/core/xds/xds_client/xds_bootstrap.h',
'src/core/xds/xds_client/xds_channel_args.h',
'src/core/xds/xds_client/xds_client.h',
'src/core/xds/xds_client/xds_client_stats.h',
'src/core/xds/xds_client/xds_metrics.h',
'src/core/xds/xds_client/xds_resource_type.h',
'src/core/xds/xds_client/xds_resource_type_impl.h',
'src/core/xds/xds_client/xds_transport.h',
'third_party/re2/re2/bitmap256.h',
'third_party/re2/re2/filtered_re2.h',
'third_party/re2/re2/pod_array.h',

@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-ProtoRPC'
version = '1.64.0-dev'
version = '1.65.0-dev'
s.version = version
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
s.homepage = 'https://grpc.io'

@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-RxLibrary'
version = '1.64.0-dev'
version = '1.65.0-dev'
s.version = version
s.summary = 'Reactive Extensions library for iOS/OSX.'
s.homepage = 'https://grpc.io'

2
gRPC.podspec generated

@ -20,7 +20,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC'
version = '1.64.0-dev'
version = '1.65.0-dev'
s.version = version
s.summary = 'gRPC client library for iOS/OSX'
s.homepage = 'https://grpc.io'

109
grpc.gemspec generated

@ -99,7 +99,6 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/impl/propagation_bits.h )
s.files += %w( include/grpc/impl/slice_type.h )
s.files += %w( include/grpc/load_reporting.h )
s.files += %w( include/grpc/passive_listener.h )
s.files += %w( include/grpc/slice.h )
s.files += %w( include/grpc/slice_buffer.h )
s.files += %w( include/grpc/status.h )
@ -1066,60 +1065,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h )
s.files += %w( src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c )
s.files += %w( src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h )
s.files += %w( src/core/ext/xds/certificate_provider_store.cc )
s.files += %w( src/core/ext/xds/certificate_provider_store.h )
s.files += %w( src/core/ext/xds/file_watcher_certificate_provider_factory.cc )
s.files += %w( src/core/ext/xds/file_watcher_certificate_provider_factory.h )
s.files += %w( src/core/ext/xds/upb_utils.h )
s.files += %w( src/core/ext/xds/xds_api.cc )
s.files += %w( src/core/ext/xds/xds_api.h )
s.files += %w( src/core/ext/xds/xds_audit_logger_registry.cc )
s.files += %w( src/core/ext/xds/xds_audit_logger_registry.h )
s.files += %w( src/core/ext/xds/xds_bootstrap.cc )
s.files += %w( src/core/ext/xds/xds_bootstrap.h )
s.files += %w( src/core/ext/xds/xds_bootstrap_grpc.cc )
s.files += %w( src/core/ext/xds/xds_bootstrap_grpc.h )
s.files += %w( src/core/ext/xds/xds_certificate_provider.cc )
s.files += %w( src/core/ext/xds/xds_certificate_provider.h )
s.files += %w( src/core/ext/xds/xds_channel_args.h )
s.files += %w( src/core/ext/xds/xds_client.cc )
s.files += %w( src/core/ext/xds/xds_client.h )
s.files += %w( src/core/ext/xds/xds_client_grpc.cc )
s.files += %w( src/core/ext/xds/xds_client_grpc.h )
s.files += %w( src/core/ext/xds/xds_client_stats.cc )
s.files += %w( src/core/ext/xds/xds_client_stats.h )
s.files += %w( src/core/ext/xds/xds_cluster.cc )
s.files += %w( src/core/ext/xds/xds_cluster.h )
s.files += %w( src/core/ext/xds/xds_cluster_specifier_plugin.cc )
s.files += %w( src/core/ext/xds/xds_cluster_specifier_plugin.h )
s.files += %w( src/core/ext/xds/xds_common_types.cc )
s.files += %w( src/core/ext/xds/xds_common_types.h )
s.files += %w( src/core/ext/xds/xds_endpoint.cc )
s.files += %w( src/core/ext/xds/xds_endpoint.h )
s.files += %w( src/core/ext/xds/xds_health_status.cc )
s.files += %w( src/core/ext/xds/xds_health_status.h )
s.files += %w( src/core/ext/xds/xds_http_fault_filter.cc )
s.files += %w( src/core/ext/xds/xds_http_fault_filter.h )
s.files += %w( src/core/ext/xds/xds_http_filters.cc )
s.files += %w( src/core/ext/xds/xds_http_filters.h )
s.files += %w( src/core/ext/xds/xds_http_rbac_filter.cc )
s.files += %w( src/core/ext/xds/xds_http_rbac_filter.h )
s.files += %w( src/core/ext/xds/xds_http_stateful_session_filter.cc )
s.files += %w( src/core/ext/xds/xds_http_stateful_session_filter.h )
s.files += %w( src/core/ext/xds/xds_lb_policy_registry.cc )
s.files += %w( src/core/ext/xds/xds_lb_policy_registry.h )
s.files += %w( src/core/ext/xds/xds_listener.cc )
s.files += %w( src/core/ext/xds/xds_listener.h )
s.files += %w( src/core/ext/xds/xds_metrics.h )
s.files += %w( src/core/ext/xds/xds_resource_type.h )
s.files += %w( src/core/ext/xds/xds_resource_type_impl.h )
s.files += %w( src/core/ext/xds/xds_route_config.cc )
s.files += %w( src/core/ext/xds/xds_route_config.h )
s.files += %w( src/core/ext/xds/xds_routing.cc )
s.files += %w( src/core/ext/xds/xds_routing.h )
s.files += %w( src/core/ext/xds/xds_transport.h )
s.files += %w( src/core/ext/xds/xds_transport_grpc.cc )
s.files += %w( src/core/ext/xds/xds_transport_grpc.h )
s.files += %w( src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc )
s.files += %w( src/core/handshaker/endpoint_info/endpoint_info_handshaker.h )
s.files += %w( src/core/handshaker/handshaker.cc )
@ -2009,6 +1954,60 @@ Gem::Specification.new do |s|
s.files += %w( src/core/tsi/transport_security_grpc.cc )
s.files += %w( src/core/tsi/transport_security_grpc.h )
s.files += %w( src/core/tsi/transport_security_interface.h )
s.files += %w( src/core/xds/grpc/certificate_provider_store.cc )
s.files += %w( src/core/xds/grpc/certificate_provider_store.h )
s.files += %w( src/core/xds/grpc/file_watcher_certificate_provider_factory.cc )
s.files += %w( src/core/xds/grpc/file_watcher_certificate_provider_factory.h )
s.files += %w( src/core/xds/grpc/upb_utils.h )
s.files += %w( src/core/xds/grpc/xds_audit_logger_registry.cc )
s.files += %w( src/core/xds/grpc/xds_audit_logger_registry.h )
s.files += %w( src/core/xds/grpc/xds_bootstrap_grpc.cc )
s.files += %w( src/core/xds/grpc/xds_bootstrap_grpc.h )
s.files += %w( src/core/xds/grpc/xds_certificate_provider.cc )
s.files += %w( src/core/xds/grpc/xds_certificate_provider.h )
s.files += %w( src/core/xds/grpc/xds_client_grpc.cc )
s.files += %w( src/core/xds/grpc/xds_client_grpc.h )
s.files += %w( src/core/xds/grpc/xds_cluster.cc )
s.files += %w( src/core/xds/grpc/xds_cluster.h )
s.files += %w( src/core/xds/grpc/xds_cluster_specifier_plugin.cc )
s.files += %w( src/core/xds/grpc/xds_cluster_specifier_plugin.h )
s.files += %w( src/core/xds/grpc/xds_common_types.cc )
s.files += %w( src/core/xds/grpc/xds_common_types.h )
s.files += %w( src/core/xds/grpc/xds_endpoint.cc )
s.files += %w( src/core/xds/grpc/xds_endpoint.h )
s.files += %w( src/core/xds/grpc/xds_health_status.cc )
s.files += %w( src/core/xds/grpc/xds_health_status.h )
s.files += %w( src/core/xds/grpc/xds_http_fault_filter.cc )
s.files += %w( src/core/xds/grpc/xds_http_fault_filter.h )
s.files += %w( src/core/xds/grpc/xds_http_filters.cc )
s.files += %w( src/core/xds/grpc/xds_http_filters.h )
s.files += %w( src/core/xds/grpc/xds_http_rbac_filter.cc )
s.files += %w( src/core/xds/grpc/xds_http_rbac_filter.h )
s.files += %w( src/core/xds/grpc/xds_http_stateful_session_filter.cc )
s.files += %w( src/core/xds/grpc/xds_http_stateful_session_filter.h )
s.files += %w( src/core/xds/grpc/xds_lb_policy_registry.cc )
s.files += %w( src/core/xds/grpc/xds_lb_policy_registry.h )
s.files += %w( src/core/xds/grpc/xds_listener.cc )
s.files += %w( src/core/xds/grpc/xds_listener.h )
s.files += %w( src/core/xds/grpc/xds_route_config.cc )
s.files += %w( src/core/xds/grpc/xds_route_config.h )
s.files += %w( src/core/xds/grpc/xds_routing.cc )
s.files += %w( src/core/xds/grpc/xds_routing.h )
s.files += %w( src/core/xds/grpc/xds_transport_grpc.cc )
s.files += %w( src/core/xds/grpc/xds_transport_grpc.h )
s.files += %w( src/core/xds/xds_client/xds_api.cc )
s.files += %w( src/core/xds/xds_client/xds_api.h )
s.files += %w( src/core/xds/xds_client/xds_bootstrap.cc )
s.files += %w( src/core/xds/xds_client/xds_bootstrap.h )
s.files += %w( src/core/xds/xds_client/xds_channel_args.h )
s.files += %w( src/core/xds/xds_client/xds_client.cc )
s.files += %w( src/core/xds/xds_client/xds_client.h )
s.files += %w( src/core/xds/xds_client/xds_client_stats.cc )
s.files += %w( src/core/xds/xds_client/xds_client_stats.h )
s.files += %w( src/core/xds/xds_client/xds_metrics.h )
s.files += %w( src/core/xds/xds_client/xds_resource_type.h )
s.files += %w( src/core/xds/xds_client/xds_resource_type_impl.h )
s.files += %w( src/core/xds/xds_client/xds_transport.h )
s.files += %w( third_party/abseil-cpp/absl/algorithm/algorithm.h )
s.files += %w( third_party/abseil-cpp/absl/algorithm/container.h )
s.files += %w( third_party/abseil-cpp/absl/base/attributes.h )

@ -38,7 +38,6 @@ header "byte_buffer.h"
header "impl/propagation_bits.h"
header "impl/slice_type.h"
header "load_reporting.h"
header "passive_listener.h"
header "slice.h"
header "slice_buffer.h"
header "status.h"

@ -1,62 +0,0 @@
// Copyright 2024 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef GRPC_PASSIVE_LISTENER_H
#define GRPC_PASSIVE_LISTENER_H
#include <memory>
#include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h>
// #include <grpc/support/port_platform.h>
namespace grpc_core {
class Server;
namespace experimental {
class PassiveListenerImpl;
/// -- EXPERIMENTAL API --
/// Interface for used for Server Endpoint injection.
class PassiveListener {
public:
virtual ~PassiveListener() = default;
/// -- EXPERIMENTAL API --
///
/// Takes an Endpoint for an established connection, and treats it as if the
/// connection had been accepted by the server.
///
/// The server must be started before endpoints can be accepted.
virtual absl::Status AcceptConnectedEndpoint(
std::unique_ptr<grpc_event_engine::experimental::EventEngine::Endpoint>
endpoint) = 0;
/// -- EXPERIMENTAL API --
///
/// Takes a connected file descriptor, and treats it as if the server had
/// accepted the connection itself.
///
/// Returns a failure status if the server's active EventEngine does not
/// support Endpoint creation from fds.
virtual absl::Status AcceptConnectedFd(int fd) = 0;
};
} // namespace experimental
} // namespace grpc_core
absl::Status grpc_server_add_passive_listener(
grpc_core::Server* server, grpc_server_credentials* credentials,
std::shared_ptr<grpc_core::experimental::PassiveListenerImpl>
passive_listener);
#endif /* GRPC_PASSIVE_LISTENER_H */

@ -1,27 +0,0 @@
// Copyright 2024 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef GRPCPP_PASSIVE_LISTENER_H
#define GRPCPP_PASSIVE_LISTENER_H
#include <grpc/passive_listener.h>
namespace grpc {
namespace experimental {
using grpc_core::experimental::PassiveListener;
} // namespace experimental
} // namespace grpc
#endif // GRPCPP_PASSIVE_LISTENER_H

@ -84,7 +84,6 @@ class ServerCredentials : private grpc::internal::GrpcLibrary {
// Needed for access to AddPortToServer.
friend class Server;
// Needed for access to c_creds_.
friend class ServerBuilder;
friend std::shared_ptr<ServerCredentials> grpc::XdsServerCredentials(
const std::shared_ptr<ServerCredentials>& fallback_credentials);

@ -25,17 +25,13 @@
#include <vector>
#include <grpc/compression.h>
#include <grpc/event_engine/event_engine.h>
#include <grpc/passive_listener.h>
#include <grpc/support/cpu.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/workaround_list.h>
#include <grpcpp/impl/channel_argument_option.h>
#include <grpcpp/impl/server_builder_option.h>
#include <grpcpp/impl/server_builder_plugin.h>
#include <grpcpp/passive_listener.h>
#include <grpcpp/security/authorization_policy_provider.h>
#include <grpcpp/security/server_credentials.h>
#include <grpcpp/server.h>
#include <grpcpp/support/config.h>
#include <grpcpp/support/server_interceptor.h>
@ -295,18 +291,6 @@ class ServerBuilder {
void EnableCallMetricRecording(
experimental::ServerMetricRecorder* server_metric_recorder = nullptr);
// Creates a passive listener for Server Endpoint injection.
///
/// \a PasiveListener lets applications provide pre-established connections
/// to gRPC Servers. The server will behave as if it accepted the connection
/// itself on its own listening addresses.
///
/// This can be called multiple times to create passive listeners with
/// different server credentials.
ServerBuilder& AddPassiveListener(
std::shared_ptr<grpc::ServerCredentials> creds,
std::unique_ptr<grpc::experimental::PassiveListener>& passive_listener);
private:
ServerBuilder* builder_;
};
@ -380,17 +364,6 @@ class ServerBuilder {
private:
friend class grpc::testing::ServerBuilderPluginTest;
struct UnstartedPassiveListener {
std::weak_ptr<grpc_core::experimental::PassiveListenerImpl>
passive_listener;
std::shared_ptr<grpc::ServerCredentials> credentials;
UnstartedPassiveListener(
std::weak_ptr<grpc_core::experimental::PassiveListenerImpl> listener,
std::shared_ptr<grpc::ServerCredentials> creds)
: passive_listener(std::move(listener)),
credentials(std::move(creds)) {}
};
struct SyncServerSettings {
SyncServerSettings()
: num_cqs(1), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {}
@ -415,7 +388,6 @@ class ServerBuilder {
std::vector<std::unique_ptr<grpc::ServerBuilderOption>> options_;
std::vector<std::unique_ptr<NamedService>> services_;
std::vector<Port> ports_;
std::vector<UnstartedPassiveListener> unstarted_passive_listeners_;
SyncServerSettings sync_server_settings_;

@ -19,9 +19,9 @@
#define GRPCPP_VERSION_INFO_H
#define GRPC_CPP_VERSION_MAJOR 1
#define GRPC_CPP_VERSION_MINOR 64
#define GRPC_CPP_VERSION_MINOR 65
#define GRPC_CPP_VERSION_PATCH 0
#define GRPC_CPP_VERSION_TAG "dev"
#define GRPC_CPP_VERSION_STRING "1.64.0-dev"
#define GRPC_CPP_VERSION_STRING "1.65.0-dev"
#endif // GRPCPP_VERSION_INFO_H

115
package.xml generated

@ -13,8 +13,8 @@
<date>2019-09-24</date>
<time>16:06:07</time>
<version>
<release>1.64.0dev</release>
<api>1.64.0dev</api>
<release>1.65.0dev</release>
<api>1.65.0dev</api>
</version>
<stability>
<release>beta</release>
@ -22,7 +22,7 @@
</stability>
<license>Apache 2.0</license>
<notes>
- gRPC Core 1.64.0 update
- gRPC Core 1.65.0 update
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@ -81,7 +81,6 @@
<file baseinstalldir="/" name="include/grpc/impl/propagation_bits.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/slice_type.h" role="src" />
<file baseinstalldir="/" name="include/grpc/load_reporting.h" role="src" />
<file baseinstalldir="/" name="include/grpc/passive_listener.h" role="src" />
<file baseinstalldir="/" name="include/grpc/slice.h" role="src" />
<file baseinstalldir="/" name="include/grpc/slice_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/status.h" role="src" />
@ -1048,60 +1047,6 @@
<file baseinstalldir="/" name="src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/certificate_provider_store.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/certificate_provider_store.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/file_watcher_certificate_provider_factory.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/file_watcher_certificate_provider_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/upb_utils.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_api.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_api.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_audit_logger_registry.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_audit_logger_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_bootstrap.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_bootstrap.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_bootstrap_grpc.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_bootstrap_grpc.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_certificate_provider.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_certificate_provider.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_channel_args.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_client.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_client.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_client_grpc.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_client_grpc.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_client_stats.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_client_stats.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_cluster.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_cluster.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_cluster_specifier_plugin.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_cluster_specifier_plugin.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_common_types.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_common_types.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_endpoint.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_endpoint.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_health_status.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_health_status.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_http_fault_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_http_fault_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_http_filters.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_http_filters.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_http_rbac_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_http_rbac_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_http_stateful_session_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_http_stateful_session_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_lb_policy_registry.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_lb_policy_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_listener.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_listener.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_metrics.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_resource_type.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_resource_type_impl.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_route_config.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_route_config.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_routing.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_routing.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_transport.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_transport_grpc.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_transport_grpc.h" role="src" />
<file baseinstalldir="/" name="src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc" role="src" />
<file baseinstalldir="/" name="src/core/handshaker/endpoint_info/endpoint_info_handshaker.h" role="src" />
<file baseinstalldir="/" name="src/core/handshaker/handshaker.cc" role="src" />
@ -1991,6 +1936,60 @@
<file baseinstalldir="/" name="src/core/tsi/transport_security_grpc.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/transport_security_grpc.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/transport_security_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/certificate_provider_store.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/certificate_provider_store.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/file_watcher_certificate_provider_factory.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/file_watcher_certificate_provider_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/upb_utils.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_audit_logger_registry.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_audit_logger_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_bootstrap_grpc.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_bootstrap_grpc.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_certificate_provider.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_certificate_provider.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_client_grpc.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_client_grpc.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_cluster.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_cluster.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_cluster_specifier_plugin.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_cluster_specifier_plugin.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_common_types.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_common_types.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_endpoint.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_endpoint.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_health_status.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_health_status.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_http_fault_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_http_fault_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_http_filters.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_http_filters.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_http_rbac_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_http_rbac_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_http_stateful_session_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_http_stateful_session_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_lb_policy_registry.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_lb_policy_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_listener.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_listener.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_route_config.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_route_config.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_routing.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_routing.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_transport_grpc.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/grpc/xds_transport_grpc.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_api.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_api.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_bootstrap.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_bootstrap.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_channel_args.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_client.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_client.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_client_stats.cc" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_client_stats.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_metrics.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_resource_type.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_resource_type_impl.h" role="src" />
<file baseinstalldir="/" name="src/core/xds/xds_client/xds_transport.h" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/byte_buffer.c" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/byte_buffer.h" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/call.c" role="src" />

@ -329,6 +329,9 @@ grpc_cc_library(
grpc_cc_library(
name = "chunked_vector",
hdrs = ["lib/gprpp/chunked_vector.h"],
external_deps = [
"absl/log:check",
],
deps = [
"arena",
"gpr_manual_constructor",
@ -352,6 +355,7 @@ grpc_cc_library(
"lib/gprpp/status_helper.h",
],
external_deps = [
"absl/log:check",
"absl/status",
"absl/strings",
"absl/strings:cord",
@ -395,7 +399,7 @@ grpc_cc_library(
"absl/strings",
],
language = "c++",
deps = ["//:gpr_platform"],
deps = ["//:gpr"],
)
grpc_cc_library(
@ -1648,6 +1652,7 @@ grpc_cc_library(
"lib/gprpp/time.h",
],
external_deps = [
"absl/log:check",
"absl/strings:str_format",
"absl/types:optional",
],
@ -3085,6 +3090,9 @@ grpc_cc_library(
hdrs = [
"lib/gprpp/single_set_ptr.h",
],
external_deps = [
"absl/log:check",
],
language = "c++",
deps = ["//:gpr"],
)
@ -4997,7 +5005,7 @@ grpc_cc_library(
grpc_cc_library(
name = "upb_utils",
hdrs = [
"ext/xds/upb_utils.h",
"xds/grpc/upb_utils.h",
],
external_deps = [
"absl/strings",
@ -5010,7 +5018,7 @@ grpc_cc_library(
grpc_cc_library(
name = "xds_enabled_server",
hdrs = [
"ext/xds/xds_enabled_server.h",
"xds/grpc/xds_enabled_server.h",
],
language = "c++",
)
@ -5018,50 +5026,50 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_xds_client",
srcs = [
"ext/xds/certificate_provider_store.cc",
"ext/xds/file_watcher_certificate_provider_factory.cc",
"ext/xds/xds_audit_logger_registry.cc",
"ext/xds/xds_bootstrap_grpc.cc",
"ext/xds/xds_certificate_provider.cc",
"ext/xds/xds_client_grpc.cc",
"ext/xds/xds_cluster.cc",
"ext/xds/xds_cluster_specifier_plugin.cc",
"ext/xds/xds_common_types.cc",
"ext/xds/xds_endpoint.cc",
"ext/xds/xds_health_status.cc",
"ext/xds/xds_http_fault_filter.cc",
"ext/xds/xds_http_filters.cc",
"ext/xds/xds_http_rbac_filter.cc",
"ext/xds/xds_http_stateful_session_filter.cc",
"ext/xds/xds_lb_policy_registry.cc",
"ext/xds/xds_listener.cc",
"ext/xds/xds_route_config.cc",
"ext/xds/xds_routing.cc",
"ext/xds/xds_transport_grpc.cc",
"lib/security/credentials/xds/xds_credentials.cc",
"xds/grpc/certificate_provider_store.cc",
"xds/grpc/file_watcher_certificate_provider_factory.cc",
"xds/grpc/xds_audit_logger_registry.cc",
"xds/grpc/xds_bootstrap_grpc.cc",
"xds/grpc/xds_certificate_provider.cc",
"xds/grpc/xds_client_grpc.cc",
"xds/grpc/xds_cluster.cc",
"xds/grpc/xds_cluster_specifier_plugin.cc",
"xds/grpc/xds_common_types.cc",
"xds/grpc/xds_endpoint.cc",
"xds/grpc/xds_health_status.cc",
"xds/grpc/xds_http_fault_filter.cc",
"xds/grpc/xds_http_filters.cc",
"xds/grpc/xds_http_rbac_filter.cc",
"xds/grpc/xds_http_stateful_session_filter.cc",
"xds/grpc/xds_lb_policy_registry.cc",
"xds/grpc/xds_listener.cc",
"xds/grpc/xds_route_config.cc",
"xds/grpc/xds_routing.cc",
"xds/grpc/xds_transport_grpc.cc",
],
hdrs = [
"ext/xds/certificate_provider_store.h",
"ext/xds/file_watcher_certificate_provider_factory.h",
"ext/xds/xds_audit_logger_registry.h",
"ext/xds/xds_bootstrap_grpc.h",
"ext/xds/xds_certificate_provider.h",
"ext/xds/xds_client_grpc.h",
"ext/xds/xds_cluster.h",
"ext/xds/xds_cluster_specifier_plugin.h",
"ext/xds/xds_common_types.h",
"ext/xds/xds_endpoint.h",
"ext/xds/xds_health_status.h",
"ext/xds/xds_http_fault_filter.h",
"ext/xds/xds_http_filters.h",
"ext/xds/xds_http_rbac_filter.h",
"ext/xds/xds_http_stateful_session_filter.h",
"ext/xds/xds_lb_policy_registry.h",
"ext/xds/xds_listener.h",
"ext/xds/xds_route_config.h",
"ext/xds/xds_routing.h",
"ext/xds/xds_transport_grpc.h",
"lib/security/credentials/xds/xds_credentials.h",
"xds/grpc/certificate_provider_store.h",
"xds/grpc/file_watcher_certificate_provider_factory.h",
"xds/grpc/xds_audit_logger_registry.h",
"xds/grpc/xds_bootstrap_grpc.h",
"xds/grpc/xds_certificate_provider.h",
"xds/grpc/xds_client_grpc.h",
"xds/grpc/xds_cluster.h",
"xds/grpc/xds_cluster_specifier_plugin.h",
"xds/grpc/xds_common_types.h",
"xds/grpc/xds_endpoint.h",
"xds/grpc/xds_health_status.h",
"xds/grpc/xds_http_fault_filter.h",
"xds/grpc/xds_http_filters.h",
"xds/grpc/xds_http_rbac_filter.h",
"xds/grpc/xds_http_stateful_session_filter.h",
"xds/grpc/xds_lb_policy_registry.h",
"xds/grpc/xds_listener.h",
"xds/grpc/xds_route_config.h",
"xds/grpc/xds_routing.h",
"xds/grpc/xds_transport_grpc.h",
],
external_deps = [
"absl/base:core_headers",
@ -6598,6 +6606,9 @@ grpc_cc_library(
hdrs = [
"ext/transport/chttp2/transport/hpack_encoder_table.h",
],
external_deps = [
"absl/log:check",
],
language = "c++",
deps = [
"hpack_constants",
@ -6615,6 +6626,7 @@ grpc_cc_library(
],
external_deps = [
"absl/functional:function_ref",
"absl/log:check",
"absl/status",
"absl/strings",
"absl/strings:str_format",
@ -6664,6 +6676,7 @@ grpc_cc_library(
"absl/container:flat_hash_map",
"absl/functional:any_invocable",
"absl/hash",
"absl/log:check",
"absl/meta:type_traits",
"absl/random:bit_gen_ref",
"absl/random:distributions",
@ -6686,6 +6699,9 @@ grpc_cc_library(
hdrs = [
"ext/transport/chttp2/transport/write_size_policy.h",
],
external_deps = [
"absl/log:check",
],
deps = [
"time",
"//:gpr",
@ -6724,6 +6740,9 @@ grpc_cc_library(
hdrs = [
"ext/transport/chttp2/transport/max_concurrent_streams_policy.h",
],
external_deps = [
"absl/log:check",
],
deps = [
"//:gpr",
"//:gpr_platform",
@ -6781,6 +6800,9 @@ grpc_cc_library(
hdrs = [
"ext/transport/chttp2/alpn/alpn.h",
],
external_deps = [
"absl/log:check",
],
language = "c++",
deps = [
"useful",
@ -6798,6 +6820,7 @@ grpc_cc_library(
],
external_deps = [
"absl/base:core_headers",
"absl/log:check",
"absl/status",
"absl/status:statusor",
"absl/strings:str_format",
@ -6854,6 +6877,7 @@ grpc_cc_library(
],
external_deps = [
"absl/base:core_headers",
"absl/log:check",
"absl/status",
"absl/status:statusor",
"absl/strings",
@ -6868,8 +6892,6 @@ grpc_cc_library(
"connection_quota",
"error",
"error_utils",
"event_engine_extensions",
"event_engine_query_extensions",
"grpc_insecure_credentials",
"handshaker_registry",
"iomgr_fwd",

@ -33,6 +33,8 @@
#include <functional>
#include <map>
#include "absl/log/check.h"
#include <grpcpp/security/binder_security_policy.h>
#include "src/core/client_channel/connector.h"
@ -60,21 +62,21 @@ class BinderConnector : public grpc_core::SubchannelConnector {
size_t id_length = args.address->len - sizeof(un->sun_family);
// The c-style string at least will have a null terminator, and the
// connection id itself should not be empty
GPR_ASSERT(id_length >= 2);
CHECK_GE(id_length, 2u);
// Make sure there is null terminator at the expected location before
// reading from it
GPR_ASSERT(un->sun_path[id_length - 1] == '\0');
CHECK_EQ(un->sun_path[id_length - 1], '\0');
conn_id_ = un->sun_path;
}
#else
GPR_ASSERT(0);
CHECK(0);
#endif
gpr_log(GPR_INFO, "BinderConnector %p conn_id_ = %s", this,
conn_id_.c_str());
args_ = args;
GPR_ASSERT(notify_ == nullptr);
GPR_ASSERT(notify != nullptr);
CHECK_EQ(notify_, nullptr);
CHECK_NE(notify, nullptr);
notify_ = notify;
result_ = result;
@ -86,15 +88,15 @@ class BinderConnector : public grpc_core::SubchannelConnector {
}
void OnConnected(std::unique_ptr<grpc_binder::Binder> endpoint_binder) {
GPR_ASSERT(endpoint_binder != nullptr);
CHECK(endpoint_binder != nullptr);
grpc_core::Transport* transport = grpc_create_binder_transport_client(
std::move(endpoint_binder),
grpc_binder::GetSecurityPolicySetting()->Get(conn_id_));
GPR_ASSERT(transport != nullptr);
CHECK_NE(transport, nullptr);
result_->channel_args = args_.channel_args;
result_->transport = transport;
GPR_ASSERT(notify_ != nullptr);
CHECK_NE(notify_, nullptr);
// ExecCtx is required here for running grpc_closure because this callback
// might be invoked from non-gRPC code
if (grpc_core::ExecCtx::Get() == nullptr) {

@ -34,6 +34,7 @@
#ifdef GPR_SUPPORT_BINDER_TRANSPORT
#include "absl/log/check.h"
#include "absl/memory/memory.h"
#include "absl/strings/substitute.h"
#include "absl/time/clock.h"
@ -102,8 +103,8 @@ std::shared_ptr<grpc::Channel> CreateCustomBinderChannel(
const ChannelArguments& args) {
grpc_init();
GPR_ASSERT(jni_env_void != nullptr);
GPR_ASSERT(security_policy != nullptr);
CHECK_NE(jni_env_void, nullptr);
CHECK_NE(security_policy, nullptr);
// Generate an unique connection ID that identifies this connection (Useful
// for mapping connection between Java and C++ code).
@ -163,7 +164,7 @@ std::shared_ptr<grpc::Channel> CreateBinderChannel(
"This APK is compiled with Android API level = %d, which is not "
"supported. See port_platform.h for supported versions.",
__ANDROID_API__);
GPR_ASSERT(0);
CHECK(0);
return {};
}
@ -175,7 +176,7 @@ std::shared_ptr<grpc::Channel> CreateCustomBinderChannel(
"This APK is compiled with Android API level = %d, which is not "
"supported. See port_platform.h for supported versions.",
__ANDROID_API__);
GPR_ASSERT(0);
CHECK(0);
return {};
}
@ -186,7 +187,7 @@ std::shared_ptr<grpc::Channel> CreateBinderChannel(
"This APK is compiled with Android API level = %d, which is not "
"supported. See port_platform.h for supported versions.",
__ANDROID_API__);
GPR_ASSERT(0);
CHECK(0);
return {};
}
@ -198,7 +199,7 @@ std::shared_ptr<grpc::Channel> CreateCustomBinderChannel(
"This APK is compiled with Android API level = %d, which is not "
"supported. See port_platform.h for supported versions.",
__ANDROID_API__);
GPR_ASSERT(0);
CHECK(0);
return {};
}
@ -207,7 +208,7 @@ bool InitializeBinderChannelJavaClass(void* jni_env_void) {
"This APK is compiled with Android API level = %d, which is not "
"supported. See port_platform.h for supported versions.",
__ANDROID_API__);
GPR_ASSERT(0);
CHECK(0);
return {};
}
@ -217,7 +218,7 @@ bool InitializeBinderChannelJavaClass(
"This APK is compiled with Android API level = %d, which is not "
"supported. See port_platform.h for supported versions.",
__ANDROID_API__);
GPR_ASSERT(0);
CHECK(0);
return {};
}

@ -21,6 +21,8 @@
#include <memory>
#include <utility>
#include "absl/log/check.h"
#include "src/core/ext/transport/binder/client/binder_connector.h"
#include "src/core/ext/transport/binder/transport/binder_transport.h"
#include "src/core/ext/transport/binder/wire_format/binder.h"
@ -50,7 +52,7 @@ grpc_channel* CreateDirectBinderChannelImplForTesting(
grpc_core::Transport* transport = grpc_create_binder_transport_client(
std::move(endpoint_binder), security_policy);
GPR_ASSERT(transport != nullptr);
CHECK_NE(transport, nullptr);
auto channel_args = grpc_core::CoreConfiguration::Get()
.channel_args_preconditioning()
@ -60,7 +62,7 @@ grpc_channel* CreateDirectBinderChannelImplForTesting(
grpc_core::ChannelCreate("binder_target_placeholder", channel_args,
GRPC_CLIENT_DIRECT_CHANNEL, transport);
// TODO(mingcl): Handle error properly
GPR_ASSERT(channel.ok());
CHECK(channel.ok());
grpc_channel_args_destroy(args);
return channel->release()->c_ptr();
}

@ -18,6 +18,7 @@
#ifndef GRPC_NO_BINDER
#include "absl/log/check.h"
#include "absl/strings/str_cat.h"
namespace {
@ -55,7 +56,7 @@ std::string ConnectionIdGenerator::Generate(absl::string_view uri) {
// Insert a hyphen before serial number
ret = absl::StrCat(s, "-", ++count_);
}
GPR_ASSERT(ret.length() < kPathLengthLimit);
CHECK_LT(ret.length(), kPathLengthLimit);
return ret;
}

@ -14,6 +14,8 @@
#include "src/core/ext/transport/binder/client/endpoint_binder_pool.h"
#include "absl/log/check.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
@ -35,12 +37,12 @@ Java_io_grpc_binder_cpp_GrpcBinderConnection_notifyConnected__Ljava_lang_String_
jboolean isCopy;
const char* conn_id = jni_env->GetStringUTFChars(conn_id_jstring, &isCopy);
gpr_log(GPR_INFO, "%s invoked with conn_id = %s", __func__, conn_id);
GPR_ASSERT(ibinder != nullptr);
CHECK_NE(ibinder, nullptr);
grpc_binder::ndk_util::SpAIBinder aibinder =
grpc_binder::FromJavaBinder(jni_env, ibinder);
gpr_log(GPR_INFO, "%s got aibinder = %p", __func__, aibinder.get());
auto b = std::make_unique<grpc_binder::BinderAndroid>(aibinder);
GPR_ASSERT(b != nullptr);
CHECK(b != nullptr);
grpc_binder::GetEndpointBinderPool()->AddEndpointBinder(conn_id,
std::move(b));
if (isCopy == JNI_TRUE) {
@ -63,7 +65,7 @@ void EndpointBinderPool::GetEndpointBinder(
if (binder_map_.count(conn_id)) {
b = std::move(binder_map_[conn_id]);
binder_map_.erase(conn_id);
GPR_ASSERT(b != nullptr);
CHECK(b != nullptr);
} else {
if (pending_requests_.count(conn_id) != 0) {
gpr_log(GPR_ERROR,
@ -75,14 +77,14 @@ void EndpointBinderPool::GetEndpointBinder(
return;
}
}
GPR_ASSERT(b != nullptr);
CHECK(b != nullptr);
cb(std::move(b));
}
void EndpointBinderPool::AddEndpointBinder(
std::string conn_id, std::unique_ptr<grpc_binder::Binder> b) {
gpr_log(GPR_INFO, "EndpointBinder added. conn_id = %s", conn_id.c_str());
GPR_ASSERT(b != nullptr);
CHECK(b != nullptr);
// cb will be set in the following block if there is a pending callback
std::function<void(std::unique_ptr<grpc_binder::Binder>)> cb = nullptr;
{

@ -14,6 +14,8 @@
#include "src/core/ext/transport/binder/client/jni_utils.h"
#include "absl/log/check.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
@ -41,7 +43,7 @@ jclass FindNativeConnectionHelper(
}
jclass global_cl = static_cast<jclass>(env->NewGlobalRef(cl));
env->DeleteLocalRef(cl);
GPR_ASSERT(global_cl != nullptr);
CHECK_NE(global_cl, nullptr);
return global_cl;
};
static jclass connection_helper_class = do_find();

@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "absl/log/check.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
@ -25,14 +27,14 @@ void SecurityPolicySetting::Set(
std::shared_ptr<grpc::experimental::binder::SecurityPolicy>
security_policy) {
grpc_core::MutexLock l(&m_);
GPR_ASSERT(security_policy_map_.count(std::string(connection_id)) == 0);
CHECK_EQ(security_policy_map_.count(std::string(connection_id)), 0u);
security_policy_map_[std::string(connection_id)] = security_policy;
}
std::shared_ptr<grpc::experimental::binder::SecurityPolicy>
SecurityPolicySetting::Get(absl::string_view connection_id) {
grpc_core::MutexLock l(&m_);
GPR_ASSERT(security_policy_map_.count(std::string(connection_id)) != 0);
CHECK_NE(security_policy_map_.count(std::string(connection_id)), 0u);
return security_policy_map_[std::string(connection_id)];
}

@ -23,6 +23,8 @@
#include <jni.h>
#include <unistd.h>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include "src/core/ext/transport/binder/client/jni_utils.h"
@ -61,8 +63,8 @@ JNIEnv* GetEnv(JavaVM* vm) {
JNIEnv* result = nullptr;
jint attach = vm->AttachCurrentThread(&result, nullptr);
GPR_ASSERT(JNI_OK == attach);
GPR_ASSERT(nullptr != result);
CHECK(JNI_OK == attach);
CHECK_NE(result, nullptr);
return result;
}
} // namespace
@ -70,14 +72,14 @@ JNIEnv* GetEnv(JavaVM* vm) {
SameSignatureSecurityPolicy::SameSignatureSecurityPolicy(JavaVM* jvm,
jobject context)
: jvm_(jvm) {
GPR_ASSERT(jvm != nullptr);
GPR_ASSERT(context != nullptr);
CHECK_NE(jvm, nullptr);
CHECK_NE(context, nullptr);
JNIEnv* env = GetEnv(jvm_);
// Make sure the context is still valid when IsAuthorized() is called
context_ = env->NewGlobalRef(context);
GPR_ASSERT(context_ != nullptr);
CHECK_NE(context_, nullptr);
}
SameSignatureSecurityPolicy::~SameSignatureSecurityPolicy() {

@ -22,6 +22,7 @@
#include <string>
#include <utility>
#include "absl/log/check.h"
#include "absl/memory/memory.h"
#include <grpc/grpc.h>
@ -159,7 +160,7 @@ class BinderServerListener : public Server::ListenerInterface {
on_destroy_done_ = on_destroy_done;
}
void Orphan() override { Unref(); }
void Orphan() override { delete this; }
~BinderServerListener() override {
ExecCtx::Get()->Flush();
@ -212,7 +213,7 @@ class BinderServerListener : public Server::ListenerInterface {
// grpc_create_binder_transport_server().
Transport* server_transport = grpc_create_binder_transport_server(
std::move(client_binder), security_policy_);
GPR_ASSERT(server_transport);
CHECK(server_transport);
grpc_error_handle error = server_->SetupTransport(
server_transport, nullptr, server_->channel_args(), nullptr);
return grpc_error_to_absl_status(error);
@ -239,8 +240,9 @@ bool AddBinderPort(const std::string& addr, grpc_server* server,
}
std::string conn_id = addr.substr(kBinderUriScheme.size());
Server* core_server = Server::FromC(server);
core_server->AddListener(MakeOrphanable<BinderServerListener>(
core_server, conn_id, std::move(factory), security_policy));
core_server->AddListener(
OrphanablePtr<Server::ListenerInterface>(new BinderServerListener(
core_server, conn_id, std::move(factory), security_policy)));
return true;
}

@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "absl/log/check.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
@ -59,7 +61,7 @@ class BinderServerCredentialsImpl final : public ServerCredentials {
std::shared_ptr<ServerCredentials> BinderServerCredentials(
std::shared_ptr<grpc::experimental::binder::SecurityPolicy>
security_policy) {
GPR_ASSERT(security_policy != nullptr);
CHECK_NE(security_policy, nullptr);
return std::shared_ptr<ServerCredentials>(
new BinderServerCredentialsImpl(security_policy));
}

@ -23,6 +23,7 @@
#include <string>
#include <utility>
#include "absl/log/check.h"
#include "absl/memory/memory.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/substitute.h"
@ -142,7 +143,7 @@ static void cancel_stream_locked(grpc_binder_transport* transport,
grpc_error_handle error) {
gpr_log(GPR_INFO, "cancel_stream_locked");
if (!stream->is_closed) {
GPR_ASSERT(stream->cancel_self_error.ok());
CHECK(stream->cancel_self_error.ok());
stream->is_closed = true;
stream->cancel_self_error = error;
transport->transport_stream_receiver->CancelStream(stream->tx_code);
@ -196,8 +197,8 @@ static void recv_initial_metadata_locked(void* arg,
if (!stream->is_closed) {
grpc_error_handle error = [&] {
GPR_ASSERT(stream->recv_initial_metadata);
GPR_ASSERT(stream->recv_initial_metadata_ready);
CHECK(stream->recv_initial_metadata);
CHECK(stream->recv_initial_metadata_ready);
if (!args->initial_metadata.ok()) {
gpr_log(GPR_ERROR, "Failed to parse initial metadata");
return absl_status_to_grpc_error(args->initial_metadata.status());
@ -233,8 +234,8 @@ static void recv_message_locked(void* arg, grpc_error_handle /*error*/) {
if (!stream->is_closed) {
grpc_error_handle error = [&] {
GPR_ASSERT(stream->recv_message);
GPR_ASSERT(stream->recv_message_ready);
CHECK(stream->recv_message);
CHECK(stream->recv_message_ready);
if (!args->message.ok()) {
gpr_log(GPR_ERROR, "Failed to receive message");
if (args->message.status().message() ==
@ -277,8 +278,8 @@ static void recv_trailing_metadata_locked(void* arg,
if (!stream->is_closed) {
grpc_error_handle error = [&] {
GPR_ASSERT(stream->recv_trailing_metadata);
GPR_ASSERT(stream->recv_trailing_metadata_finished);
CHECK(stream->recv_trailing_metadata);
CHECK(stream->recv_trailing_metadata_finished);
if (!args->trailing_metadata.ok()) {
gpr_log(GPR_ERROR, "Failed to receive trailing metadata");
return absl_status_to_grpc_error(args->trailing_metadata.status());
@ -339,11 +340,11 @@ class MetadataEncoder {
void Encode(grpc_core::HttpPathMetadata, const grpc_core::Slice& value) {
// TODO(b/192208403): Figure out if it is correct to simply drop '/'
// prefix and treat it as rpc method name
GPR_ASSERT(value[0] == '/');
CHECK(value[0] == '/');
std::string path = std::string(value.as_string_view().substr(1));
// Only client send method ref.
GPR_ASSERT(is_client_);
CHECK(is_client_);
tx_->SetMethodRef(path);
}
@ -390,9 +391,9 @@ static void perform_stream_op_locked(void* stream_op,
grpc_binder_transport* transport = stream->t;
if (op->cancel_stream) {
// TODO(waynetu): Is this true?
GPR_ASSERT(!op->send_initial_metadata && !op->send_message &&
!op->send_trailing_metadata && !op->recv_initial_metadata &&
!op->recv_message && !op->recv_trailing_metadata);
CHECK(!op->send_initial_metadata && !op->send_message &&
!op->send_trailing_metadata && !op->recv_initial_metadata &&
!op->recv_message && !op->recv_trailing_metadata);
gpr_log(GPR_INFO, "cancel_stream is_client = %d", stream->is_client);
if (!stream->is_client) {
// Send trailing metadata to inform the other end about the cancellation,
@ -741,8 +742,8 @@ grpc_core::Transport* grpc_create_binder_transport_client(
security_policy) {
gpr_log(GPR_INFO, __func__);
GPR_ASSERT(endpoint_binder != nullptr);
GPR_ASSERT(security_policy != nullptr);
CHECK(endpoint_binder != nullptr);
CHECK_NE(security_policy, nullptr);
grpc_binder_transport* t = new grpc_binder_transport(
std::move(endpoint_binder), /*is_client=*/true, security_policy);
@ -756,8 +757,8 @@ grpc_core::Transport* grpc_create_binder_transport_server(
security_policy) {
gpr_log(GPR_INFO, __func__);
GPR_ASSERT(client_binder != nullptr);
GPR_ASSERT(security_policy != nullptr);
CHECK(client_binder != nullptr);
CHECK_NE(security_policy, nullptr);
grpc_binder_transport* t = new grpc_binder_transport(
std::move(client_binder), /*is_client=*/false, security_policy);

@ -22,6 +22,7 @@
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -74,7 +75,7 @@ struct grpc_binder_transport final : public grpc_core::FilterStackTransport {
// TODO(mingcl): Wrap around when all tx codes are used. "If we do detect a
// collision however, we will fail the new call with UNAVAILABLE, and shut
// down the transport gracefully."
GPR_ASSERT(next_free_tx_code <= LAST_CALL_TRANSACTION);
CHECK(next_free_tx_code <= LAST_CALL_TRANSACTION);
return next_free_tx_code++;
}

@ -22,6 +22,8 @@
#include <dlfcn.h>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include "src/core/lib/gprpp/crash.h"
@ -36,7 +38,7 @@ void* GetNdkBinderHandle() {
gpr_log(
GPR_ERROR,
"Cannot open libbinder_ndk.so. Does this device support API level 29?");
GPR_ASSERT(0);
CHECK(0);
}
return handle;
}
@ -102,7 +104,7 @@ namespace ndk_util {
"dlsym failed. Cannot find %s in libbinder_ndk.so. " \
"BinderTransport requires API level >= 33", \
#name); \
GPR_ASSERT(0); \
CHECK(0); \
} \
return ptr

@ -22,6 +22,8 @@
#include <string>
#include <utility>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include "src/core/lib/gprpp/crash.h"
@ -38,7 +40,7 @@ void TransportStreamReceiverImpl::RegisterRecvInitialMetadata(
absl::StatusOr<Metadata> initial_metadata{};
{
grpc_core::MutexLock l(&m_);
GPR_ASSERT(initial_metadata_cbs_.count(id) == 0);
CHECK_EQ(initial_metadata_cbs_.count(id), 0u);
auto iter = pending_initial_metadata_.find(id);
if (iter == pending_initial_metadata_.end()) {
if (trailing_metadata_recvd_.count(id)) {
@ -66,7 +68,7 @@ void TransportStreamReceiverImpl::RegisterRecvMessage(
absl::StatusOr<std::string> message{};
{
grpc_core::MutexLock l(&m_);
GPR_ASSERT(message_cbs_.count(id) == 0);
CHECK_EQ(message_cbs_.count(id), 0u);
auto iter = pending_message_.find(id);
if (iter == pending_message_.end()) {
// If we'd already received trailing-metadata and there's no pending
@ -100,7 +102,7 @@ void TransportStreamReceiverImpl::RegisterRecvTrailingMetadata(
std::pair<absl::StatusOr<Metadata>, int> trailing_metadata{};
{
grpc_core::MutexLock l(&m_);
GPR_ASSERT(trailing_metadata_cbs_.count(id) == 0);
CHECK_EQ(trailing_metadata_cbs_.count(id), 0u);
auto iter = pending_trailing_metadata_.find(id);
if (iter == pending_trailing_metadata_.end()) {
trailing_metadata_cbs_[id] = std::move(cb);

@ -20,6 +20,7 @@
#include <map>
#include "absl/log/check.h"
#include "absl/memory/memory.h"
#include "absl/strings/str_cat.h"
@ -152,7 +153,7 @@ TransactionReceiverAndroid::TransactionReceiverAndroid(
args.wire_reader_ref = wire_reader_ref;
args.callback = &transact_cb_;
binder_ = ndk_util::AIBinder_new(aibinder_class, &args);
GPR_ASSERT(binder_);
CHECK(binder_);
gpr_log(GPR_INFO, "ndk_util::AIBinder_associateClass = %d",
static_cast<int>(
ndk_util::AIBinder_associateClass(binder_, aibinder_class)));

@ -18,6 +18,7 @@
#include <string>
#include <vector>
#include "absl/log/check.h"
#include "absl/strings/string_view.h"
#include <grpc/support/log.h>
@ -45,33 +46,33 @@ class Transaction {
// TODO(mingcl): Consider using string_view
void SetPrefix(Metadata prefix_metadata) {
prefix_metadata_ = prefix_metadata;
GPR_ASSERT((flags_ & kFlagPrefix) == 0);
CHECK_EQ((flags_ & kFlagPrefix), 0);
flags_ |= kFlagPrefix;
}
void SetMethodRef(std::string method_ref) {
GPR_ASSERT(is_client_);
CHECK(is_client_);
method_ref_ = method_ref;
}
void SetData(std::string message_data) {
message_data_ = message_data;
GPR_ASSERT((flags_ & kFlagMessageData) == 0);
CHECK_EQ((flags_ & kFlagMessageData), 0);
flags_ |= kFlagMessageData;
}
void SetSuffix(Metadata suffix_metadata) {
if (is_client_) GPR_ASSERT(suffix_metadata.empty());
if (is_client_) CHECK(suffix_metadata.empty());
suffix_metadata_ = suffix_metadata;
GPR_ASSERT((flags_ & kFlagSuffix) == 0);
CHECK_EQ((flags_ & kFlagSuffix), 0);
flags_ |= kFlagSuffix;
}
void SetStatusDescription(std::string status_desc) {
GPR_ASSERT(!is_client_);
GPR_ASSERT((flags_ & kFlagStatusDescription) == 0);
CHECK(!is_client_);
CHECK_EQ((flags_ & kFlagStatusDescription), 0);
status_desc_ = status_desc;
}
void SetStatus(int status) {
GPR_ASSERT(!is_client_);
GPR_ASSERT((flags_ >> 16) == 0);
GPR_ASSERT(status < (1 << 16));
CHECK(!is_client_);
CHECK_EQ((flags_ >> 16), 0);
CHECK(status < (1 << 16));
flags_ |= (status << 16);
}

@ -25,6 +25,7 @@
#include <vector>
#include "absl/functional/any_invocable.h"
#include "absl/log/check.h"
#include "absl/memory/memory.h"
#include "absl/status/statusor.h"
@ -305,7 +306,7 @@ absl::Status WireReaderImpl::ProcessStreamingTransaction(
absl::Seconds(5))) {
return absl::DeadlineExceededError("wire_writer_ is not ready in time!");
}
GPR_ASSERT(wire_writer_);
CHECK(wire_writer_);
// wire_writer_ should not be accessed while holding mu_!
// Otherwise, it is possible that
// 1. wire_writer_::mu_ is acquired before mu_ (NDK call back during
@ -323,7 +324,7 @@ absl::Status WireReaderImpl::ProcessStreamingTransaction(
absl::Status WireReaderImpl::ProcessStreamingTransactionImpl(
transaction_code_t code, ReadableParcel* parcel, int* cancellation_flags,
std::queue<absl::AnyInvocable<void() &&>>& deferred_func_queue) {
GPR_ASSERT(cancellation_flags);
CHECK(cancellation_flags);
num_incoming_bytes_ += parcel->GetDataSize();
gpr_log(GPR_INFO, "Total incoming bytes: %" PRId64, num_incoming_bytes_);
@ -360,8 +361,8 @@ absl::Status WireReaderImpl::ProcessStreamingTransactionImpl(
// TODO(waynetu): According to the protocol, "The sequence number will wrap
// around to 0 if more than 2^31 messages are sent." For now we'll just
// assert that it never reach such circumstances.
GPR_ASSERT(expectation < std::numeric_limits<int32_t>::max() &&
"Sequence number too large");
CHECK(expectation < std::numeric_limits<int32_t>::max())
<< "Sequence number too large";
expectation++;
gpr_log(GPR_DEBUG, "sequence number = %d", seq_num);
if (flags & kFlagPrefix) {

@ -21,6 +21,7 @@
#include <utility>
#include "absl/cleanup/cleanup.h"
#include "absl/log/check.h"
#include "absl/types/variant.h"
#include <grpc/support/log.h>
@ -122,7 +123,7 @@ absl::Status WireWriterImpl::MakeBinderTransaction(
gpr_log(GPR_INFO, "Total outgoing bytes: %" PRId64,
num_outgoing_bytes_.load());
}
GPR_ASSERT(!is_transacting_);
CHECK(!is_transacting_);
is_transacting_ = true;
absl::Status result = binder_->Transact(tx_code);
is_transacting_ = false;
@ -155,10 +156,10 @@ absl::Status WireWriterImpl::RunStreamTx(
bool* is_last_chunk) {
Transaction* tx = stream_tx->tx.get();
// Transaction without data flag should go to fast path.
GPR_ASSERT(tx->GetFlags() & kFlagMessageData);
CHECK(tx->GetFlags() & kFlagMessageData);
absl::string_view data = tx->GetMessageData();
GPR_ASSERT(stream_tx->bytes_sent <= static_cast<int64_t>(data.size()));
CHECK(stream_tx->bytes_sent <= static_cast<int64_t>(data.size()));
int flags = kFlagMessageData;
@ -206,7 +207,7 @@ absl::Status WireWriterImpl::RunStreamTx(
}
void WireWriterImpl::RunScheduledTxInternal(RunScheduledTxArgs* args) {
GPR_ASSERT(args->writer == this);
CHECK(args->writer == this);
if (absl::holds_alternative<RunScheduledTxArgs::AckTx>(args->tx)) {
int64_t num_bytes =
absl::get<RunScheduledTxArgs::AckTx>(args->tx).num_bytes;
@ -223,7 +224,7 @@ void WireWriterImpl::RunScheduledTxInternal(RunScheduledTxArgs* args) {
delete args;
return;
}
GPR_ASSERT(absl::holds_alternative<RunScheduledTxArgs::StreamTx>(args->tx));
CHECK(absl::holds_alternative<RunScheduledTxArgs::StreamTx>(args->tx));
RunScheduledTxArgs::StreamTx* stream_tx =
&absl::get<RunScheduledTxArgs::StreamTx>(args->tx);
// Be reservative. Decrease CombinerTxCount after the data size of this
@ -232,7 +233,7 @@ void WireWriterImpl::RunScheduledTxInternal(RunScheduledTxArgs* args) {
auto decrease_combiner_tx_count = absl::MakeCleanup([this]() {
{
grpc_core::MutexLock lock(&flow_control_mu_);
GPR_ASSERT(num_non_acked_tx_in_combiner_ > 0);
CHECK_GT(num_non_acked_tx_in_combiner_, 0);
num_non_acked_tx_in_combiner_--;
}
// New transaction might be ready to be scheduled.
@ -271,7 +272,7 @@ void WireWriterImpl::RunScheduledTxInternal(RunScheduledTxArgs* args) {
absl::Status WireWriterImpl::RpcCall(std::unique_ptr<Transaction> tx) {
// TODO(mingcl): check tx_code <= last call id
GPR_ASSERT(tx->GetTxCode() >= kFirstCallId);
CHECK(tx->GetTxCode() >= kFirstCallId);
auto args = new RunScheduledTxArgs();
args->writer = this;
args->tx = RunScheduledTxArgs::StreamTx();

@ -103,8 +103,8 @@ absl::StatusOr<int> ChaoticGoodServerListener::Bind(
str.ok() ? str->c_str() : str.status().ToString().c_str());
}
EventEngine::Listener::AcceptCallback accept_cb =
[self = RefAsSubclass<ChaoticGoodServerListener>()](
std::unique_ptr<EventEngine::Endpoint> ep, MemoryAllocator) {
[self = Ref()](std::unique_ptr<EventEngine::Endpoint> ep,
MemoryAllocator) {
ExecCtx exec_ctx;
MutexLock lock(&self->mu_);
if (self->shutdown_) return;
@ -149,8 +149,7 @@ absl::Status ChaoticGoodServerListener::StartListening() {
ChaoticGoodServerListener::ActiveConnection::ActiveConnection(
RefCountedPtr<ChaoticGoodServerListener> listener,
std::unique_ptr<EventEngine::Endpoint> endpoint)
: memory_allocator_(listener->memory_allocator_),
listener_(std::move(listener)) {
: memory_allocator_(listener->memory_allocator_), listener_(listener) {
handshaking_state_ = MakeRefCounted<HandshakingState>(Ref());
handshaking_state_->Start(std::move(endpoint));
}

@ -49,7 +49,9 @@
namespace grpc_core {
namespace chaotic_good {
class ChaoticGoodServerListener final : public Server::ListenerInterface {
class ChaoticGoodServerListener final
: public Server::ListenerInterface,
public RefCounted<ChaoticGoodServerListener> {
public:
static absl::AnyInvocable<std::string()> DefaultConnectionIDGenerator() {
return [bitgen = absl::BitGen()]() mutable {

@ -18,6 +18,8 @@
#include "src/core/ext/transport/chttp2/alpn/alpn.h"
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -42,6 +44,6 @@ size_t grpc_chttp2_num_alpn_versions(void) {
}
const char* grpc_chttp2_get_alpn_version_index(size_t i) {
GPR_ASSERT(i < GPR_ARRAY_SIZE(supported_versions));
CHECK_LT(i, GPR_ARRAY_SIZE(supported_versions));
return supported_versions[i];
}

@ -24,6 +24,7 @@
#include <type_traits>
#include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_format.h"
@ -104,11 +105,11 @@ void Chttp2Connector::Connect(const Args& args, Result* result,
grpc_closure* notify) {
{
MutexLock lock(&mu_);
GPR_ASSERT(notify_ == nullptr);
CHECK_EQ(notify_, nullptr);
args_ = args;
result_ = result;
notify_ = notify;
GPR_ASSERT(endpoint_ == nullptr);
CHECK_EQ(endpoint_, nullptr);
event_engine_ = args_.channel_args.GetObject<EventEngine>();
}
absl::StatusOr<std::string> address = grpc_sockaddr_to_uri(args.address);
@ -166,7 +167,7 @@ void Chttp2Connector::OnHandshakeDone(void* arg, grpc_error_handle error) {
} else if (args->endpoint != nullptr) {
self->result_->transport =
grpc_create_chttp2_transport(args->args, args->endpoint, true);
GPR_ASSERT(self->result_->transport != nullptr);
CHECK_NE(self->result_->transport, nullptr);
self->result_->socket_node =
grpc_chttp2_transport_get_socket_node(self->result_->transport);
self->result_->channel_args = args->args;
@ -188,7 +189,7 @@ void Chttp2Connector::OnHandshakeDone(void* arg, grpc_error_handle error) {
// If the handshaking succeeded but there is no endpoint, then the
// handshaker may have handed off the connection to some external
// code. Just verify that exit_early flag is set.
GPR_DEBUG_ASSERT(args->exit_early);
DCHECK(args->exit_early);
NullThenSchedClosure(DEBUG_LOCATION, &self->notify_, error);
}
self->handshake_mgr_.reset();
@ -396,14 +397,14 @@ grpc_channel* grpc_channel_create_from_fd(const char* target, int fd,
.SetObject(creds->Ref());
int flags = fcntl(fd, F_GETFL, 0);
GPR_ASSERT(fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0);
CHECK_EQ(fcntl(fd, F_SETFL, flags | O_NONBLOCK), 0);
grpc_endpoint* client = grpc_tcp_create_from_fd(
grpc_fd_create(fd, "client", true),
grpc_event_engine::experimental::ChannelArgsEndpointConfig(final_args),
"fd-client");
grpc_core::Transport* transport =
grpc_create_chttp2_transport(final_args, client, true);
GPR_ASSERT(transport);
CHECK(transport);
auto channel = grpc_core::ChannelCreate(
target, final_args, GRPC_CLIENT_DIRECT_CHANNEL, transport);
if (channel.ok()) {
@ -424,7 +425,7 @@ grpc_channel* grpc_channel_create_from_fd(const char* /* target */,
int /* fd */,
grpc_channel_credentials* /* creds*/,
const grpc_channel_args* /* args */) {
GPR_ASSERT(0);
CHECK(0);
return nullptr;
}

@ -29,6 +29,7 @@
#include <vector>
#include "absl/base/thread_annotations.h"
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
@ -41,7 +42,6 @@
#include <grpc/grpc.h>
#include <grpc/grpc_posix.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/passive_listener.h>
#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@ -58,8 +58,6 @@
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/event_engine/channel_args_endpoint_config.h"
#include "src/core/lib/event_engine/extensions/supports_fd.h"
#include "src/core/lib/event_engine/query_extensions.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
@ -69,7 +67,6 @@
#include "src/core/lib/gprpp/unique_type_name.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/event_engine_shims/endpoint.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/resolve_address.h"
@ -96,11 +93,9 @@
#endif // GPR_SUPPORT_CHANNELS_FROM_FD
namespace grpc_core {
namespace {
using grpc_event_engine::experimental::ChannelArgsEndpointConfig;
using grpc_event_engine::experimental::EventEngine;
using grpc_event_engine::experimental::EventEngineSupportsFdExtension;
using grpc_event_engine::experimental::QueryExtension;
using ::grpc_event_engine::experimental::EventEngine;
const char kUnixUriPrefix[] = "unix:";
const char kUnixAbstractUriPrefix[] = "unix-abstract:";
@ -117,23 +112,14 @@ class Chttp2ServerListener : public Server::ListenerInterface {
Server* server, const char* name, const ChannelArgs& args,
Chttp2ServerArgsModifier args_modifier);
static Chttp2ServerListener* CreateForPassiveListener(
Server* server, const ChannelArgs& args,
std::shared_ptr<experimental::PassiveListenerImpl> passive_listener);
// Do not instantiate directly. Use one of the factory methods above.
Chttp2ServerListener(Server* server, const ChannelArgs& args,
Chttp2ServerArgsModifier args_modifier,
grpc_server_config_fetcher* config_fetcher,
std::shared_ptr<experimental::PassiveListenerImpl>
passive_listener = nullptr);
Chttp2ServerArgsModifier args_modifier);
~Chttp2ServerListener() override;
void Start(Server* server,
const std::vector<grpc_pollset*>* pollsets) override;
void AcceptConnectedEndpoint(std::unique_ptr<EventEngine::Endpoint> endpoint);
channelz::ListenSocketNode* channelz_listen_socket_node() const override {
return channelz_listen_socket_.get();
}
@ -143,8 +129,6 @@ class Chttp2ServerListener : public Server::ListenerInterface {
void Orphan() override;
private:
friend class experimental::PassiveListenerImpl;
class ConfigFetcherWatcher
: public grpc_server_config_fetcher::WatcherInterface {
public:
@ -251,8 +235,34 @@ class Chttp2ServerListener : public Server::ListenerInterface {
static void DestroyListener(Server* /*server*/, void* arg,
grpc_closure* destroy_done);
Server* const server_ = nullptr;
grpc_tcp_server* tcp_server_ = nullptr;
// The interface required by RefCountedPtr<> has been manually implemented
// here to take a ref on tcp_server_ instead. Note that, the handshaker
// needs tcp_server_ to exist for the lifetime of the handshake since it's
// needed by acceptor. Sharing refs between the listener and tcp_server_ is
// just an optimization to avoid taking additional refs on the listener,
// since TcpServerShutdownComplete already holds a ref to the listener.
void IncrementRefCount() { grpc_tcp_server_ref(tcp_server_); }
void IncrementRefCount(const DebugLocation& /* location */,
const char* /* reason */) {
IncrementRefCount();
}
GRPC_MUST_USE_RESULT RefCountedPtr<Chttp2ServerListener> Ref() {
IncrementRefCount();
return RefCountedPtr<Chttp2ServerListener>(this);
}
GRPC_MUST_USE_RESULT RefCountedPtr<Chttp2ServerListener> Ref(
const DebugLocation& /* location */, const char* /* reason */) {
return Ref();
}
void Unref() { grpc_tcp_server_unref(tcp_server_); }
void Unref(const DebugLocation& /* location */, const char* /* reason */) {
Unref();
}
Server* const server_;
grpc_tcp_server* tcp_server_;
grpc_resolved_address resolved_address_;
Chttp2ServerArgsModifier const args_modifier_;
ConfigFetcherWatcher* config_fetcher_watcher_ = nullptr;
@ -275,10 +285,6 @@ class Chttp2ServerListener : public Server::ListenerInterface {
RefCountedPtr<channelz::ListenSocketNode> channelz_listen_socket_;
MemoryQuotaRefPtr memory_quota_;
ConnectionQuotaRefPtr connection_quota_;
grpc_server_config_fetcher* config_fetcher_ = nullptr;
// TODO(yashykt): consider using absl::variant<> to minimize memory usage for
// disjoint cases where different fields are used.
std::shared_ptr<experimental::PassiveListenerImpl> passive_listener_;
};
//
@ -303,7 +309,7 @@ void Chttp2ServerListener::ConfigFetcherWatcher::UpdateConnectionManager(
void set_connections(
std::map<ActiveConnection*, OrphanablePtr<ActiveConnection>>
connections) {
GPR_ASSERT(connections_.empty());
CHECK(connections_.empty());
connections_ = std::move(connections);
}
@ -329,7 +335,7 @@ void Chttp2ServerListener::ConfigFetcherWatcher::UpdateConnectionManager(
StatusToString(error).c_str());
// TODO(yashykt): We wouldn't need to assert here if we bound to the
// port earlier during AddPort.
GPR_ASSERT(0);
CHECK(0);
}
listener_->StartListening();
{
@ -375,17 +381,13 @@ Chttp2ServerListener::ActiveConnection::HandshakingState::HandshakingState(
handshake_mgr_(MakeRefCounted<HandshakeManager>()),
deadline_(GetConnectionDeadline(args)),
interested_parties_(grpc_pollset_set_create()) {
if (accepting_pollset != nullptr) {
grpc_pollset_set_add_pollset(interested_parties_, accepting_pollset_);
}
grpc_pollset_set_add_pollset(interested_parties_, accepting_pollset_);
CoreConfiguration::Get().handshaker_registry().AddHandshakers(
HANDSHAKER_SERVER, args, interested_parties_, handshake_mgr_.get());
}
Chttp2ServerListener::ActiveConnection::HandshakingState::~HandshakingState() {
if (accepting_pollset_ != nullptr) {
grpc_pollset_set_del_pollset(interested_parties_, accepting_pollset_);
}
grpc_pollset_set_del_pollset(interested_parties_, accepting_pollset_);
grpc_pollset_set_destroy(interested_parties_);
gpr_free(acceptor_);
}
@ -707,82 +709,83 @@ void Chttp2ServerListener::ActiveConnection::OnDrainGraceTimeExpiry() {
grpc_error_handle Chttp2ServerListener::Create(
Server* server, grpc_resolved_address* addr, const ChannelArgs& args,
Chttp2ServerArgsModifier args_modifier, int* port_num) {
// Create Chttp2ServerListener.
OrphanablePtr<Chttp2ServerListener> listener =
MakeOrphanable<Chttp2ServerListener>(server, args, args_modifier,
server->config_fetcher());
// The tcp_server will be unreffed when the listener is orphaned, which could
// be at the end of this function if the listener was not added to the
// server's set of listeners.
grpc_error_handle error = grpc_tcp_server_create(
&listener->tcp_server_shutdown_complete_, ChannelArgsEndpointConfig(args),
OnAccept, listener.get(), &listener->tcp_server_);
if (!error.ok()) return error;
if (listener->config_fetcher_ != nullptr) {
listener->resolved_address_ = *addr;
// TODO(yashykt): Consider binding so as to be able to return the port
// number.
} else {
error = grpc_tcp_server_add_port(listener->tcp_server_, addr, port_num);
Chttp2ServerListener* listener = nullptr;
// The bulk of this method is inside of a lambda to make cleanup
// easier without using goto.
grpc_error_handle error = [&]() {
grpc_error_handle error;
// Create Chttp2ServerListener.
listener = new Chttp2ServerListener(server, args, args_modifier);
error = grpc_tcp_server_create(
&listener->tcp_server_shutdown_complete_,
grpc_event_engine::experimental::ChannelArgsEndpointConfig(args),
OnAccept, listener, &listener->tcp_server_);
if (!error.ok()) return error;
}
// Create channelz node.
if (args.GetBool(GRPC_ARG_ENABLE_CHANNELZ)
.value_or(GRPC_ENABLE_CHANNELZ_DEFAULT)) {
auto string_address = grpc_sockaddr_to_uri(addr);
if (!string_address.ok()) {
return GRPC_ERROR_CREATE(string_address.status().ToString());
if (server->config_fetcher() != nullptr) {
listener->resolved_address_ = *addr;
// TODO(yashykt): Consider binding so as to be able to return the port
// number.
} else {
error = grpc_tcp_server_add_port(listener->tcp_server_, addr, port_num);
if (!error.ok()) return error;
}
// Create channelz node.
if (args.GetBool(GRPC_ARG_ENABLE_CHANNELZ)
.value_or(GRPC_ENABLE_CHANNELZ_DEFAULT)) {
auto string_address = grpc_sockaddr_to_uri(addr);
if (!string_address.ok()) {
return GRPC_ERROR_CREATE(string_address.status().ToString());
}
listener->channelz_listen_socket_ =
MakeRefCounted<channelz::ListenSocketNode>(
*string_address,
absl::StrCat("chttp2 listener ", *string_address));
}
// Register with the server only upon success
server->AddListener(OrphanablePtr<Server::ListenerInterface>(listener));
return absl::OkStatus();
}();
if (!error.ok()) {
if (listener != nullptr) {
if (listener->tcp_server_ != nullptr) {
// listener is deleted when tcp_server_ is shutdown.
grpc_tcp_server_unref(listener->tcp_server_);
} else {
delete listener;
}
}
listener->channelz_listen_socket_ =
MakeRefCounted<channelz::ListenSocketNode>(
*string_address, absl::StrCat("chttp2 listener ", *string_address));
}
// Register with the server only upon success
server->AddListener(std::move(listener));
return absl::OkStatus();
return error;
}
grpc_error_handle Chttp2ServerListener::CreateWithAcceptor(
Server* server, const char* name, const ChannelArgs& args,
Chttp2ServerArgsModifier args_modifier) {
auto listener = MakeOrphanable<Chttp2ServerListener>(
server, args, args_modifier, server->config_fetcher());
Chttp2ServerListener* listener =
new Chttp2ServerListener(server, args, args_modifier);
grpc_error_handle error = grpc_tcp_server_create(
&listener->tcp_server_shutdown_complete_, ChannelArgsEndpointConfig(args),
OnAccept, listener.get(), &listener->tcp_server_);
if (!error.ok()) return error;
&listener->tcp_server_shutdown_complete_,
grpc_event_engine::experimental::ChannelArgsEndpointConfig(args),
OnAccept, listener, &listener->tcp_server_);
if (!error.ok()) {
delete listener;
return error;
}
// TODO(yangg) channelz
TcpServerFdHandler** arg_val = args.GetPointer<TcpServerFdHandler*>(name);
*arg_val = grpc_tcp_server_create_fd_handler(listener->tcp_server_);
server->AddListener(std::move(listener));
server->AddListener(OrphanablePtr<Server::ListenerInterface>(listener));
return absl::OkStatus();
}
Chttp2ServerListener* Chttp2ServerListener::CreateForPassiveListener(
Server* server, const ChannelArgs& args,
std::shared_ptr<experimental::PassiveListenerImpl> passive_listener) {
// TODO(hork): figure out how to handle channelz in this case
auto listener = MakeOrphanable<Chttp2ServerListener>(
server, args, /*args_modifier=*/
[](const ChannelArgs& args, grpc_error_handle*) { return args; }, nullptr,
std::move(passive_listener));
auto listener_ptr = listener.get();
server->AddListener(std::move(listener));
return listener_ptr;
}
Chttp2ServerListener::Chttp2ServerListener(
Server* server, const ChannelArgs& args,
Chttp2ServerArgsModifier args_modifier,
grpc_server_config_fetcher* config_fetcher,
std::shared_ptr<experimental::PassiveListenerImpl> passive_listener)
Chttp2ServerArgsModifier args_modifier)
: server_(server),
args_modifier_(args_modifier),
args_(args),
memory_quota_(args.GetObject<ResourceQuota>()->memory_quota()),
connection_quota_(MakeRefCounted<ConnectionQuota>()),
config_fetcher_(config_fetcher),
passive_listener_(std::move(passive_listener)) {
connection_quota_(MakeRefCounted<ConnectionQuota>()) {
auto max_allowed_incoming_connections =
args.GetInt(GRPC_ARG_MAX_ALLOWED_INCOMING_CONNECTIONS);
if (max_allowed_incoming_connections.has_value()) {
@ -797,9 +800,6 @@ Chttp2ServerListener::~Chttp2ServerListener() {
// Flush queued work before destroying handshaker factory, since that
// may do a synchronous unref.
ExecCtx::Get()->Flush();
if (passive_listener_ != nullptr) {
passive_listener_->ListenerDestroyed();
}
if (on_destroy_done_ != nullptr) {
ExecCtx::Run(DEBUG_LOCATION, on_destroy_done_, absl::OkStatus());
ExecCtx::Get()->Flush();
@ -809,11 +809,10 @@ Chttp2ServerListener::~Chttp2ServerListener() {
// Server callback: start listening on our ports
void Chttp2ServerListener::Start(
Server* /*server*/, const std::vector<grpc_pollset*>* /* pollsets */) {
if (config_fetcher_ != nullptr) {
auto watcher = std::make_unique<ConfigFetcherWatcher>(
RefAsSubclass<Chttp2ServerListener>());
if (server_->config_fetcher() != nullptr) {
auto watcher = std::make_unique<ConfigFetcherWatcher>(Ref());
config_fetcher_watcher_ = watcher.get();
config_fetcher_->StartWatch(
server_->config_fetcher()->StartWatch(
grpc_sockaddr_to_string(&resolved_address_, false).value(),
std::move(watcher));
} else {
@ -827,9 +826,7 @@ void Chttp2ServerListener::Start(
}
void Chttp2ServerListener::StartListening() {
if (tcp_server_ != nullptr) {
grpc_tcp_server_start(tcp_server_, &server_->pollsets());
}
grpc_tcp_server_start(tcp_server_, &server_->pollsets());
}
void Chttp2ServerListener::SetOnDestroyDone(grpc_closure* on_destroy_done) {
@ -837,12 +834,6 @@ void Chttp2ServerListener::SetOnDestroyDone(grpc_closure* on_destroy_done) {
on_destroy_done_ = on_destroy_done;
}
void Chttp2ServerListener::AcceptConnectedEndpoint(
std::unique_ptr<EventEngine::Endpoint> endpoint) {
OnAccept(this, grpc_event_engine_endpoint_create(std::move(endpoint)),
/*accepting_pollset=*/nullptr, /*acceptor=*/nullptr);
}
void Chttp2ServerListener::OnAccept(void* arg, grpc_endpoint* tcp,
grpc_pollset* accepting_pollset,
grpc_tcp_server_acceptor* acceptor) {
@ -867,7 +858,7 @@ void Chttp2ServerListener::OnAccept(void* arg, grpc_endpoint* tcp,
endpoint_cleanup(error);
return;
}
if (self->config_fetcher_ != nullptr) {
if (self->server_->config_fetcher() != nullptr) {
if (connection_manager == nullptr) {
grpc_error_handle error = GRPC_ERROR_CREATE(
"No ConnectionManager configured. Closing connection.");
@ -908,7 +899,7 @@ void Chttp2ServerListener::OnAccept(void* arg, grpc_endpoint* tcp,
// heap-use-after-free issues where `Ref()` is invoked when the ref of
// tcp_server_ has already reached 0. (Ref() implementation of
// Chttp2ServerListener is grpc_tcp_server_ref().)
listener_ref = self->RefAsSubclass<Chttp2ServerListener>();
listener_ref = self->Ref();
self->connections_.emplace(connection.get(), std::move(connection));
}
}
@ -923,7 +914,7 @@ void Chttp2ServerListener::TcpServerShutdownComplete(
void* arg, grpc_error_handle /*error*/) {
Chttp2ServerListener* self = static_cast<Chttp2ServerListener*>(arg);
self->channelz_listen_socket_.reset();
self->Unref();
delete self;
}
// Server callback: destroy the tcp listener (so we don't generate further
@ -932,8 +923,7 @@ void Chttp2ServerListener::Orphan() {
// Cancel the watch before shutting down so as to avoid holding a ref to the
// listener in the watcher.
if (config_fetcher_watcher_ != nullptr) {
GPR_ASSERT(config_fetcher_ != nullptr);
config_fetcher_->CancelWatch(config_fetcher_watcher_);
server_->config_fetcher()->CancelWatch(config_fetcher_watcher_);
}
std::map<ActiveConnection*, OrphanablePtr<ActiveConnection>> connections;
grpc_tcp_server* tcp_server;
@ -951,14 +941,12 @@ void Chttp2ServerListener::Orphan() {
}
tcp_server = tcp_server_;
}
if (tcp_server != nullptr) {
grpc_tcp_server_shutdown_listeners(tcp_server);
grpc_tcp_server_unref(tcp_server);
} else {
Unref();
}
grpc_tcp_server_shutdown_listeners(tcp_server);
grpc_tcp_server_unref(tcp_server);
}
} // namespace
//
// Chttp2ServerAddPort()
//
@ -1013,7 +1001,7 @@ grpc_error_handle Chttp2ServerAddPort(Server* server, const char* addr,
if (*port_num == -1) {
*port_num = port_temp;
} else {
GPR_ASSERT(*port_num == port_temp);
CHECK(*port_num == port_temp);
}
}
}
@ -1059,50 +1047,6 @@ ChannelArgs ModifyArgsForConnection(const ChannelArgs& args,
}
} // namespace
namespace experimental {
absl::Status PassiveListenerImpl::AcceptConnectedEndpoint(
std::unique_ptr<EventEngine::Endpoint> endpoint) {
GPR_ASSERT(server_ != nullptr);
RefCountedPtr<Chttp2ServerListener> listener;
{
MutexLock lock(&mu_);
if (listener_ != nullptr) {
listener =
listener_->RefIfNonZero().TakeAsSubclass<Chttp2ServerListener>();
}
}
if (listener == nullptr) {
return absl::UnavailableError("passive listener already shut down");
}
ExecCtx exec_ctx;
listener->AcceptConnectedEndpoint(std::move(endpoint));
return absl::OkStatus();
}
absl::Status PassiveListenerImpl::AcceptConnectedFd(int fd) {
GPR_ASSERT(server_ != nullptr);
ExecCtx exec_ctx;
auto& args = server_->channel_args();
auto* supports_fd = QueryExtension<EventEngineSupportsFdExtension>(
/*engine=*/args.GetObjectRef<EventEngine>().get());
if (supports_fd == nullptr) {
return absl::UnimplementedError(
"The server's EventEngine does not support adding endpoints from "
"connected file descriptors.");
}
auto endpoint =
supports_fd->CreateEndpointFromFd(fd, ChannelArgsEndpointConfig(args));
return AcceptConnectedEndpoint(std::move(endpoint));
}
void PassiveListenerImpl::ListenerDestroyed() {
MutexLock lock(&mu_);
listener_ = nullptr;
}
} // namespace experimental
} // namespace grpc_core
int grpc_server_add_http2_port(grpc_server* server, const char* addr,
@ -1196,35 +1140,7 @@ void grpc_server_add_channel_from_fd(grpc_server* server, int fd,
void grpc_server_add_channel_from_fd(grpc_server* /* server */, int /* fd */,
grpc_server_credentials* /* creds */) {
GPR_ASSERT(0);
CHECK(0);
}
#endif // GPR_SUPPORT_CHANNELS_FROM_FD
absl::Status grpc_server_add_passive_listener(
grpc_core::Server* server, grpc_server_credentials* credentials,
std::shared_ptr<grpc_core::experimental::PassiveListenerImpl>
passive_listener) {
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_server_add_passive_listener(server=%p, credentials=%p)",
2, (server, credentials));
// Create security context.
if (credentials == nullptr) {
return absl::UnavailableError(
"No credentials specified for passive listener");
}
auto sc = credentials->create_security_connector(grpc_core::ChannelArgs());
if (sc == nullptr) {
return absl::UnavailableError(
absl::StrCat("Unable to create secure server with credentials of type ",
credentials->type().name()));
}
auto args = server->channel_args()
.SetObject(credentials->Ref())
.SetObject(std::move(sc));
passive_listener->listener_ =
grpc_core::Chttp2ServerListener::CreateForPassiveListener(
server, args, passive_listener);
passive_listener->server_ = server->Ref();
return absl::OkStatus();
}

@ -21,7 +21,6 @@
#include <functional>
#include <grpc/passive_listener.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channel_args.h"
@ -43,38 +42,6 @@ grpc_error_handle Chttp2ServerAddPort(
Server* server, const char* addr, const ChannelArgs& args,
Chttp2ServerArgsModifier connection_args_modifier, int* port_num);
class Chttp2ServerListener;
namespace experimental {
// An implementation of the public C++ passive listener interface.
// The server builder holds a weak_ptr to one of these objects, and the
// application owns the instance.
class PassiveListenerImpl final : public PassiveListener {
public:
absl::Status AcceptConnectedEndpoint(
std::unique_ptr<grpc_event_engine::experimental::EventEngine::Endpoint>
endpoint) override ABSL_LOCKS_EXCLUDED(mu_);
absl::Status AcceptConnectedFd(GRPC_UNUSED int fd) override
ABSL_LOCKS_EXCLUDED(mu_);
void ListenerDestroyed() ABSL_LOCKS_EXCLUDED(mu_);
private:
// note: the grpc_core::Server redundant namespace qualification is
// required for older gcc versions.
friend absl::Status(::grpc_server_add_passive_listener)(
grpc_core::Server* server, grpc_server_credentials* credentials,
std::shared_ptr<grpc_core::experimental::PassiveListenerImpl>
passive_listener);
Mutex mu_;
// Data members will be populated when initialized.
RefCountedPtr<Server> server_;
Chttp2ServerListener* listener_;
};
} // namespace experimental
} // namespace grpc_core
#endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H

@ -19,6 +19,7 @@
#include "src/core/ext/transport/chttp2/transport/bin_decoder.h"
#include "absl/base/attributes.h"
#include "absl/log/check.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@ -198,8 +199,8 @@ grpc_slice grpc_chttp2_base64_decode(const grpc_slice& input) {
grpc_core::CSliceUnref(output);
return grpc_empty_slice();
}
GPR_ASSERT(ctx.output_cur == GRPC_SLICE_END_PTR(output));
GPR_ASSERT(ctx.input_cur == GRPC_SLICE_END_PTR(input));
CHECK(ctx.output_cur == GRPC_SLICE_END_PTR(output));
CHECK(ctx.input_cur == GRPC_SLICE_END_PTR(input));
return output;
}
@ -245,7 +246,7 @@ grpc_slice grpc_chttp2_base64_decode_with_length(const grpc_slice& input,
grpc_core::CSliceUnref(output);
return grpc_empty_slice();
}
GPR_ASSERT(ctx.output_cur == GRPC_SLICE_END_PTR(output));
GPR_ASSERT(ctx.input_cur <= GRPC_SLICE_END_PTR(input));
CHECK(ctx.output_cur == GRPC_SLICE_END_PTR(output));
CHECK(ctx.input_cur <= GRPC_SLICE_END_PTR(input));
return output;
}

@ -21,6 +21,8 @@
#include <stdint.h>
#include <string.h>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -87,8 +89,8 @@ grpc_slice grpc_chttp2_base64_encode(const grpc_slice& input) {
break;
}
GPR_ASSERT(out == (char*)GRPC_SLICE_END_PTR(output));
GPR_ASSERT(in == GRPC_SLICE_END_PTR(input));
CHECK(out == (char*)GRPC_SLICE_END_PTR(output));
CHECK(in == GRPC_SLICE_END_PTR(input));
return output;
}
@ -131,7 +133,7 @@ grpc_slice grpc_chttp2_huffman_compress(const grpc_slice& input) {
static_cast<uint8_t>(0xffu >> temp_length));
}
GPR_ASSERT(out == GRPC_SLICE_END_PTR(output));
CHECK(out == GRPC_SLICE_END_PTR(output));
return output;
}
@ -227,9 +229,9 @@ grpc_slice grpc_chttp2_base64_encode_and_huffman_compress(
static_cast<uint8_t>(0xffu >> out.temp_length));
}
GPR_ASSERT(out.out <= GRPC_SLICE_END_PTR(output));
CHECK(out.out <= GRPC_SLICE_END_PTR(output));
GRPC_SLICE_SET_LENGTH(output, out.out - start_out);
GPR_ASSERT(in == GRPC_SLICE_END_PTR(input));
CHECK(in == GRPC_SLICE_END_PTR(input));
return output;
}

@ -34,6 +34,7 @@
#include "absl/base/attributes.h"
#include "absl/container/flat_hash_map.h"
#include "absl/hash/hash.h"
#include "absl/log/check.h"
#include "absl/meta/type_traits.h"
#include "absl/random/random.h"
#include "absl/status/status.h"
@ -398,11 +399,11 @@ grpc_chttp2_transport::~grpc_chttp2_transport() {
grpc_chttp2_goaway_parser_destroy(&goaway_parser);
for (i = 0; i < STREAM_LIST_COUNT; i++) {
GPR_ASSERT(lists[i].head == nullptr);
GPR_ASSERT(lists[i].tail == nullptr);
CHECK_EQ(lists[i].head, nullptr);
CHECK_EQ(lists[i].tail, nullptr);
}
GPR_ASSERT(stream_map.empty());
CHECK(stream_map.empty());
GRPC_COMBINER_UNREF(combiner, "chttp2_transport");
while (write_cb_pool) {
@ -573,7 +574,7 @@ static void read_channel_args(grpc_chttp2_transport* t,
static void init_keepalive_pings_if_enabled_locked(
grpc_core::RefCountedPtr<grpc_chttp2_transport> t,
GRPC_UNUSED grpc_error_handle error) {
GPR_DEBUG_ASSERT(error.ok());
DCHECK(error.ok());
if (t->keepalive_time != grpc_core::Duration::Infinity()) {
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_WAITING;
t->keepalive_ping_timer_handle =
@ -616,8 +617,8 @@ grpc_chttp2_transport::grpc_chttp2_transport(
deframe_state(is_client ? GRPC_DTS_FH_0 : GRPC_DTS_CLIENT_PREFIX_0),
is_client(is_client) {
cl = new grpc_core::ContextList();
GPR_ASSERT(strlen(GRPC_CHTTP2_CLIENT_CONNECT_STRING) ==
GRPC_CHTTP2_CLIENT_CONNECT_STRLEN);
CHECK(strlen(GRPC_CHTTP2_CLIENT_CONNECT_STRING) ==
GRPC_CHTTP2_CLIENT_CONNECT_STRLEN);
grpc_slice_buffer_init(&read_buffer);
if (is_client) {
@ -706,7 +707,7 @@ static void close_transport_locked(grpc_chttp2_transport* t,
grpc_error_add_child(t->close_transport_on_writes_finished, error);
return;
}
GPR_ASSERT(!error.ok());
CHECK(!error.ok());
t->closed_with_error = error;
connectivity_state_set(t, GRPC_CHANNEL_SHUTDOWN, absl::Status(),
"close_transport");
@ -750,7 +751,7 @@ static void close_transport_locked(grpc_chttp2_transport* t,
while (grpc_chttp2_list_pop_writable_stream(t, &s)) {
GRPC_CHTTP2_STREAM_UNREF(s, "chttp2_writing:close");
}
GPR_ASSERT(t->write_state == GRPC_CHTTP2_WRITE_STATE_IDLE);
CHECK(t->write_state == GRPC_CHTTP2_WRITE_STATE_IDLE);
grpc_endpoint_shutdown(t->ep, error);
}
if (t->notify_on_receive_settings != nullptr) {
@ -826,9 +827,9 @@ grpc_chttp2_stream::~grpc_chttp2_stream() {
}
}
GPR_ASSERT((write_closed && read_closed) || id == 0);
CHECK((write_closed && read_closed) || id == 0);
if (id != 0) {
GPR_ASSERT(t->stream_map.count(id) == 0);
CHECK_EQ(t->stream_map.count(id), 0u);
}
grpc_slice_buffer_destroy(&frame_storage);
@ -841,11 +842,11 @@ grpc_chttp2_stream::~grpc_chttp2_stream() {
}
}
GPR_ASSERT(send_initial_metadata_finished == nullptr);
GPR_ASSERT(send_trailing_metadata_finished == nullptr);
GPR_ASSERT(recv_initial_metadata_ready == nullptr);
GPR_ASSERT(recv_message_ready == nullptr);
GPR_ASSERT(recv_trailing_metadata_finished == nullptr);
CHECK_EQ(send_initial_metadata_finished, nullptr);
CHECK_EQ(send_trailing_metadata_finished, nullptr);
CHECK_EQ(recv_initial_metadata_ready, nullptr);
CHECK_EQ(recv_message_ready, nullptr);
CHECK_EQ(recv_trailing_metadata_finished, nullptr);
grpc_slice_buffer_destroy(&flow_controlled_buffer);
grpc_core::ExecCtx::Run(DEBUG_LOCATION, destroy_stream_arg, absl::OkStatus());
}
@ -878,7 +879,7 @@ grpc_chttp2_stream* grpc_chttp2_parsing_accept_stream(grpc_chttp2_transport* t,
return nullptr;
}
grpc_chttp2_stream* accepting = nullptr;
GPR_ASSERT(t->accepting_stream == nullptr);
CHECK_EQ(t->accepting_stream, nullptr);
t->accepting_stream = &accepting;
t->accept_stream_cb(t->accept_stream_cb_user_data, t,
reinterpret_cast<void*>(id));
@ -980,7 +981,7 @@ static const char* begin_writing_desc(bool partial) {
static void write_action_begin_locked(
grpc_core::RefCountedPtr<grpc_chttp2_transport> t,
grpc_error_handle /*error_ignored*/) {
GPR_ASSERT(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE);
CHECK(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE);
grpc_chttp2_begin_write_result r;
if (!t->closed_with_error.ok()) {
r.writing = false;
@ -994,7 +995,7 @@ static void write_action_begin_locked(
begin_writing_desc(r.partial));
write_action(t.get());
if (t->reading_paused_on_pending_induced_frames) {
GPR_ASSERT(t->num_pending_induced_frames == 0);
CHECK_EQ(t->num_pending_induced_frames, 0u);
// We had paused reading, because we had many induced frames (SETTINGS
// ACK, PINGS ACK and RST_STREAMS) pending in t->qbuf. Now that we have
// been able to flush qbuf, we can resume reading.
@ -1211,7 +1212,7 @@ static void maybe_start_some_streams(grpc_chttp2_transport* t) {
"HTTP:%s: Transport %p allocating new grpc_chttp2_stream %p to id %d",
t->is_client ? "CLI" : "SVR", t, s, t->next_stream_id));
GPR_ASSERT(s->id == 0);
CHECK_EQ(s->id, 0u);
s->id = t->next_stream_id;
t->next_stream_id += 2;
@ -1384,7 +1385,7 @@ static void perform_stream_op_locked(void* stream_op,
if (t->is_client && t->channelz_socket != nullptr) {
t->channelz_socket->RecordStreamStartedFromLocal();
}
GPR_ASSERT(s->send_initial_metadata_finished == nullptr);
CHECK_EQ(s->send_initial_metadata_finished, nullptr);
on_complete->next_data.scratch |= t->closure_barrier_may_cover_write;
s->send_initial_metadata_finished = add_closure_barrier(on_complete);
@ -1402,7 +1403,7 @@ static void perform_stream_op_locked(void* stream_op,
if (!s->write_closed) {
if (t->is_client) {
if (t->closed_with_error.ok()) {
GPR_ASSERT(s->id == 0);
CHECK_EQ(s->id, 0u);
grpc_chttp2_list_add_waiting_for_concurrency(t, s);
maybe_start_some_streams(t);
} else {
@ -1419,7 +1420,7 @@ static void perform_stream_op_locked(void* stream_op,
false);
}
} else {
GPR_ASSERT(s->id != 0);
CHECK_NE(s->id, 0u);
grpc_chttp2_mark_stream_writable(t, s);
if (!(op->send_message &&
(op->payload->send_message.flags & GRPC_WRITE_BUFFER_HINT))) {
@ -1520,7 +1521,7 @@ static void perform_stream_op_locked(void* stream_op,
}
if (op->send_trailing_metadata) {
GPR_ASSERT(s->send_trailing_metadata_finished == nullptr);
CHECK_EQ(s->send_trailing_metadata_finished, nullptr);
on_complete->next_data.scratch |= t->closure_barrier_may_cover_write;
s->send_trailing_metadata_finished = add_closure_barrier(on_complete);
s->send_trailing_metadata =
@ -1550,7 +1551,7 @@ static void perform_stream_op_locked(void* stream_op,
}
if (op->recv_initial_metadata) {
GPR_ASSERT(s->recv_initial_metadata_ready == nullptr);
CHECK_EQ(s->recv_initial_metadata_ready, nullptr);
s->recv_initial_metadata_ready =
op_payload->recv_initial_metadata.recv_initial_metadata_ready;
s->recv_initial_metadata =
@ -1564,7 +1565,7 @@ static void perform_stream_op_locked(void* stream_op,
}
if (op->recv_message) {
GPR_ASSERT(s->recv_message_ready == nullptr);
CHECK_EQ(s->recv_message_ready, nullptr);
s->recv_message_ready = op_payload->recv_message.recv_message_ready;
s->recv_message = op_payload->recv_message.recv_message;
s->recv_message->emplace();
@ -1575,9 +1576,9 @@ static void perform_stream_op_locked(void* stream_op,
}
if (op->recv_trailing_metadata) {
GPR_ASSERT(s->collecting_stats == nullptr);
CHECK_EQ(s->collecting_stats, nullptr);
s->collecting_stats = op_payload->recv_trailing_metadata.collect_stats;
GPR_ASSERT(s->recv_trailing_metadata_finished == nullptr);
CHECK_EQ(s->recv_trailing_metadata_finished, nullptr);
s->recv_trailing_metadata_finished =
op_payload->recv_trailing_metadata.recv_trailing_metadata_ready;
s->recv_trailing_metadata =
@ -1600,14 +1601,14 @@ void grpc_chttp2_transport::PerformStreamOp(
if (!is_client) {
if (op->send_initial_metadata) {
GPR_ASSERT(!op->payload->send_initial_metadata.send_initial_metadata
->get(grpc_core::GrpcTimeoutMetadata())
.has_value());
CHECK(!op->payload->send_initial_metadata.send_initial_metadata
->get(grpc_core::GrpcTimeoutMetadata())
.has_value());
}
if (op->send_trailing_metadata) {
GPR_ASSERT(!op->payload->send_trailing_metadata.send_trailing_metadata
->get(grpc_core::GrpcTimeoutMetadata())
.has_value());
CHECK(!op->payload->send_trailing_metadata.send_trailing_metadata
->get(grpc_core::GrpcTimeoutMetadata())
.has_value());
}
}
@ -1699,8 +1700,8 @@ void grpc_chttp2_retry_initiate_ping(
static void retry_initiate_ping_locked(
grpc_core::RefCountedPtr<grpc_chttp2_transport> t,
GRPC_UNUSED grpc_error_handle error) {
GPR_DEBUG_ASSERT(error.ok());
GPR_ASSERT(t->delayed_ping_timer_handle != TaskHandle::kInvalid);
DCHECK(error.ok());
CHECK(t->delayed_ping_timer_handle != TaskHandle::kInvalid);
t->delayed_ping_timer_handle = TaskHandle::kInvalid;
grpc_chttp2_initiate_write(t.get(),
GRPC_CHTTP2_INITIATE_WRITE_RETRY_SEND_PING);
@ -2020,7 +2021,7 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_chttp2_transport* t,
} else {
if (s->frame_storage.length != 0) {
while (true) {
GPR_ASSERT(s->frame_storage.length > 0);
CHECK_GT(s->frame_storage.length, 0u);
int64_t min_progress_size;
auto r = grpc_deframe_unprocessed_incoming_frames(
s, &min_progress_size, &**s->recv_message, s->recv_message_flags);
@ -2106,7 +2107,7 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_chttp2_transport* t,
static grpc_chttp2_transport::RemovedStreamHandle remove_stream(
grpc_chttp2_transport* t, uint32_t id, grpc_error_handle error) {
grpc_chttp2_stream* s = t->stream_map.extract(id).mapped();
GPR_DEBUG_ASSERT(s);
DCHECK(s);
if (t->incoming_stream == s) {
t->incoming_stream = nullptr;
grpc_chttp2_parsing_become_skip_parser(t);
@ -2358,7 +2359,8 @@ static void close_from_api(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
grpc_error_get_status(error, s->deadline, &grpc_status, &message, nullptr,
nullptr);
GPR_ASSERT(grpc_status >= 0 && (int)grpc_status < 100);
CHECK_GE(grpc_status, 0);
CHECK_LT((int)grpc_status, 100);
auto remove_stream_handle = grpc_chttp2_mark_stream_closed(t, s, 1, 1, error);
grpc_core::MaybeTarpit(
@ -2399,7 +2401,7 @@ static void close_from_api(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
*p++ = '2';
*p++ = '0';
*p++ = '0';
GPR_ASSERT(p == GRPC_SLICE_END_PTR(http_status_hdr));
CHECK(p == GRPC_SLICE_END_PTR(http_status_hdr));
len += static_cast<uint32_t> GRPC_SLICE_LENGTH(http_status_hdr);
content_type_hdr = GRPC_SLICE_MALLOC(31);
@ -2435,7 +2437,7 @@ static void close_from_api(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
*p++ = 'r';
*p++ = 'p';
*p++ = 'c';
GPR_ASSERT(p == GRPC_SLICE_END_PTR(content_type_hdr));
CHECK(p == GRPC_SLICE_END_PTR(content_type_hdr));
len += static_cast<uint32_t> GRPC_SLICE_LENGTH(content_type_hdr);
}
@ -2462,11 +2464,11 @@ static void close_from_api(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
*p++ = static_cast<uint8_t>('0' + (grpc_status / 10));
*p++ = static_cast<uint8_t>('0' + (grpc_status % 10));
}
GPR_ASSERT(p == GRPC_SLICE_END_PTR(status_hdr));
CHECK(p == GRPC_SLICE_END_PTR(status_hdr));
len += static_cast<uint32_t> GRPC_SLICE_LENGTH(status_hdr);
size_t msg_len = message.length();
GPR_ASSERT(msg_len <= UINT32_MAX);
CHECK(msg_len <= UINT32_MAX);
grpc_core::VarintWriter<1> msg_len_writer(
static_cast<uint32_t>(msg_len));
message_pfx = GRPC_SLICE_MALLOC(14 + msg_len_writer.length());
@ -2487,7 +2489,7 @@ static void close_from_api(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
*p++ = 'e';
msg_len_writer.Write(0, p);
p += msg_len_writer.length();
GPR_ASSERT(p == GRPC_SLICE_END_PTR(message_pfx));
CHECK(p == GRPC_SLICE_END_PTR(message_pfx));
len += static_cast<uint32_t> GRPC_SLICE_LENGTH(message_pfx);
len += static_cast<uint32_t>(msg_len);
@ -2503,7 +2505,7 @@ static void close_from_api(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
*p++ = static_cast<uint8_t>(id >> 16);
*p++ = static_cast<uint8_t>(id >> 8);
*p++ = static_cast<uint8_t>(id);
GPR_ASSERT(p == GRPC_SLICE_END_PTR(hdr));
CHECK(p == GRPC_SLICE_END_PTR(hdr));
grpc_slice_buffer_add(&t->qbuf, hdr);
if (!sent_initial_metadata) {
@ -2821,7 +2823,7 @@ static void finish_bdp_ping_locked(
t->flow_control.bdp_estimator()->CompletePing();
grpc_chttp2_act_on_flowctl_action(t->flow_control.PeriodicUpdate(), t.get(),
nullptr);
GPR_ASSERT(t->next_bdp_ping_timer_handle == TaskHandle::kInvalid);
CHECK(t->next_bdp_ping_timer_handle == TaskHandle::kInvalid);
t->next_bdp_ping_timer_handle =
t->event_engine->RunAfter(next_ping - grpc_core::Timestamp::Now(), [t] {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
@ -2840,7 +2842,7 @@ static void next_bdp_ping_timer_expired(grpc_chttp2_transport* t) {
static void next_bdp_ping_timer_expired_locked(
grpc_core::RefCountedPtr<grpc_chttp2_transport> t,
GRPC_UNUSED grpc_error_handle error) {
GPR_DEBUG_ASSERT(error.ok());
DCHECK(error.ok());
t->next_bdp_ping_timer_handle = TaskHandle::kInvalid;
if (t->flow_control.bdp_estimator()->accumulator() == 0) {
// Block the bdp ping till we receive more data.
@ -2908,9 +2910,9 @@ static void init_keepalive_ping(
static void init_keepalive_ping_locked(
grpc_core::RefCountedPtr<grpc_chttp2_transport> t,
GRPC_UNUSED grpc_error_handle error) {
GPR_DEBUG_ASSERT(error.ok());
GPR_ASSERT(t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_WAITING);
GPR_ASSERT(t->keepalive_ping_timer_handle != TaskHandle::kInvalid);
DCHECK(error.ok());
CHECK(t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_WAITING);
CHECK(t->keepalive_ping_timer_handle != TaskHandle::kInvalid);
t->keepalive_ping_timer_handle = TaskHandle::kInvalid;
if (t->destroying || !t->closed_with_error.ok()) {
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_DYING;
@ -2952,7 +2954,7 @@ static void finish_keepalive_ping_locked(
std::string(t->peer_string.as_string_view()).c_str());
}
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_WAITING;
GPR_ASSERT(t->keepalive_ping_timer_handle == TaskHandle::kInvalid);
CHECK(t->keepalive_ping_timer_handle == TaskHandle::kInvalid);
t->keepalive_ping_timer_handle =
t->event_engine->RunAfter(t->keepalive_time, [t] {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;

@ -27,6 +27,7 @@
#include <tuple>
#include <vector>
#include "absl/log/check.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
@ -336,7 +337,7 @@ void StreamFlowControl::SentUpdate(uint32_t announce) {
TransportFlowControl::IncomingUpdateContext tfc_upd(tfc_);
pending_size_ = absl::nullopt;
tfc_upd.UpdateAnnouncedWindowDelta(&announced_window_delta_, announce);
GPR_ASSERT(DesiredAnnounceSize() == 0);
CHECK_EQ(DesiredAnnounceSize(), 0u);
std::ignore = tfc_upd.MakeAction();
}
@ -386,7 +387,7 @@ FlowControlAction StreamFlowControl::UpdateAction(FlowControlAction action) {
void StreamFlowControl::IncomingUpdateContext::SetPendingSize(
int64_t pending_size) {
GPR_ASSERT(pending_size >= 0);
CHECK_GE(pending_size, 0);
sfc_->pending_size_ = pending_size;
}

@ -27,6 +27,7 @@
#include <utility>
#include "absl/functional/function_ref.h"
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
@ -132,7 +133,7 @@ class GRPC_MUST_USE_RESULT FlowControlAction {
static const char* UrgencyString(Urgency u);
std::string DebugString() const;
void AssertEmpty() { GPR_ASSERT(*this == FlowControlAction()); }
void AssertEmpty() { CHECK(*this == FlowControlAction()); }
bool operator==(const FlowControlAction& other) const {
return send_stream_update_ == other.send_stream_update_ &&
@ -195,7 +196,7 @@ class TransportFlowControl final {
class IncomingUpdateContext {
public:
explicit IncomingUpdateContext(TransportFlowControl* tfc) : tfc_(tfc) {}
~IncomingUpdateContext() { GPR_ASSERT(tfc_ == nullptr); }
~IncomingUpdateContext() { CHECK_EQ(tfc_, nullptr); }
IncomingUpdateContext(const IncomingUpdateContext&) = delete;
IncomingUpdateContext& operator=(const IncomingUpdateContext&) = delete;

@ -19,6 +19,7 @@
#include <cstdint>
#include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
@ -59,7 +60,7 @@ uint16_t Read2b(const uint8_t* input) {
}
void Write3b(uint32_t x, uint8_t* output) {
GPR_ASSERT(x < 16777216);
CHECK_LT(x, 16777216u);
output[0] = static_cast<uint8_t>(x >> 16);
output[1] = static_cast<uint8_t>(x >> 8);
output[2] = static_cast<uint8_t>(x);
@ -475,7 +476,7 @@ void Serialize(absl::Span<Http2Frame> frames, SliceBuffer& out) {
absl::StatusOr<Http2Frame> ParseFramePayload(const Http2FrameHeader& hdr,
SliceBuffer payload) {
GPR_ASSERT(payload.Length() == hdr.length);
CHECK(payload.Length() == hdr.length);
switch (hdr.type) {
case kFrameTypeData:
return ParseDataFrame(hdr, payload);

@ -20,6 +20,7 @@
#include <stdlib.h>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/str_format.h"
@ -62,7 +63,7 @@ void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer* inbuf,
hdr = GRPC_SLICE_MALLOC(header_size);
p = GRPC_SLICE_START_PTR(hdr);
GPR_ASSERT(write_bytes < (1 << 24));
CHECK(write_bytes < (1 << 24));
*p++ = static_cast<uint8_t>(write_bytes >> 16);
*p++ = static_cast<uint8_t>(write_bytes >> 8);
*p++ = static_cast<uint8_t>(write_bytes);

@ -21,6 +21,7 @@
#include <string.h>
#include "absl/base/attributes.h"
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
@ -136,7 +137,7 @@ grpc_error_handle grpc_chttp2_goaway_parser_parse(void* parser,
memcpy(p->debug_data + p->debug_pos, cur,
static_cast<size_t>(end - cur));
}
GPR_ASSERT((size_t)(end - cur) < UINT32_MAX - p->debug_pos);
CHECK((size_t)(end - cur) < UINT32_MAX - p->debug_pos);
p->debug_pos += static_cast<uint32_t>(end - cur);
p->state = GRPC_CHTTP2_GOAWAY_DEBUG;
if (is_last) {
@ -157,7 +158,7 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code,
grpc_slice header = GRPC_SLICE_MALLOC(9 + 4 + 4);
uint8_t* p = GRPC_SLICE_START_PTR(header);
uint32_t frame_length;
GPR_ASSERT(GRPC_SLICE_LENGTH(debug_data) < UINT32_MAX - 4 - 4);
CHECK(GRPC_SLICE_LENGTH(debug_data) < UINT32_MAX - 4 - 4);
frame_length = 4 + 4 + static_cast<uint32_t> GRPC_SLICE_LENGTH(debug_data);
// frame header: length
@ -183,7 +184,7 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code,
*p++ = static_cast<uint8_t>(error_code >> 16);
*p++ = static_cast<uint8_t>(error_code >> 8);
*p++ = static_cast<uint8_t>(error_code);
GPR_ASSERT(p == GRPC_SLICE_END_PTR(header));
CHECK(p == GRPC_SLICE_END_PTR(header));
grpc_slice_buffer_add(slice_buffer, header);
grpc_slice_buffer_add(slice_buffer, debug_data);
}

@ -24,6 +24,7 @@
#include <algorithm>
#include "absl/container/flat_hash_map.h"
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/str_format.h"
@ -93,7 +94,7 @@ grpc_error_handle grpc_chttp2_ping_parser_parse(void* parser,
}
if (p->byte == 8) {
GPR_ASSERT(is_last);
CHECK(is_last);
if (p->is_ack) {
if (grpc_ping_trace.enabled()) {
gpr_log(GPR_INFO, "%s[%p]: received ping ack %" PRIx64,

@ -20,6 +20,7 @@
#include <stddef.h>
#include "absl/log/check.h"
#include "absl/random/distributions.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
@ -105,7 +106,7 @@ grpc_error_handle grpc_chttp2_rst_stream_parser_parse(void* parser,
s->stats.incoming.framing_bytes += static_cast<uint64_t>(end - cur);
if (p->byte == 4) {
GPR_ASSERT(is_last);
CHECK(is_last);
uint32_t reason = ((static_cast<uint32_t>(p->reason_bytes[0])) << 24) |
((static_cast<uint32_t>(p->reason_bytes[1])) << 16) |
((static_cast<uint32_t>(p->reason_bytes[2])) << 8) |

@ -20,6 +20,7 @@
#include <stddef.h>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
@ -37,7 +38,7 @@ grpc_slice grpc_chttp2_window_update_create(
stats->framing_bytes += frame_size;
uint8_t* p = GRPC_SLICE_START_PTR(slice);
GPR_ASSERT(window_delta);
CHECK(window_delta);
*p++ = 0;
*p++ = 0;
@ -93,7 +94,7 @@ grpc_error_handle grpc_chttp2_window_update_parser_parse(
return GRPC_ERROR_CREATE(
absl::StrCat("invalid window update bytes: ", p->amount));
}
GPR_ASSERT(is_last);
CHECK(is_last);
if (t->incoming_stream_id != 0) {
if (s != nullptr) {

@ -21,6 +21,8 @@
#include <algorithm>
#include <cstdint>
#include "absl/log/check.h"
#include <grpc/slice.h>
#include <grpc/slice_buffer.h>
#include <grpc/support/log.h>
@ -61,7 +63,7 @@ static void FillHeader(uint8_t* p, uint8_t type, uint32_t id, size_t len,
// max_frame_size is derived from GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE,
// which has a max allowable value of 16777215 (see chttp_transport.cc).
// Thus, the following assert can be a debug assert.
GPR_DEBUG_ASSERT(len <= 16777216);
DCHECK_LE(len, 16777216u);
*p++ = static_cast<uint8_t>(len >> 16);
*p++ = static_cast<uint8_t>(len >> 8);
*p++ = static_cast<uint8_t>(len);

@ -16,16 +16,18 @@
#include <algorithm>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
namespace grpc_core {
uint32_t HPackEncoderTable::AllocateIndex(size_t element_size) {
GPR_DEBUG_ASSERT(element_size >= 32);
DCHECK_GE(element_size, 32u);
uint32_t new_index = tail_remote_index_ + table_elems_ + 1;
GPR_DEBUG_ASSERT(element_size <= MaxEntrySize());
DCHECK(element_size <= MaxEntrySize());
if (element_size > max_table_size_) {
while (table_size_ > 0) {
@ -40,7 +42,7 @@ uint32_t HPackEncoderTable::AllocateIndex(size_t element_size) {
while (table_size_ + element_size > max_table_size_) {
EvictOne();
}
GPR_ASSERT(table_elems_ < elem_size_.size());
CHECK(table_elems_ < elem_size_.size());
elem_size_[new_index % elem_size_.size()] =
static_cast<uint16_t>(element_size);
table_size_ += element_size;
@ -69,17 +71,17 @@ bool HPackEncoderTable::SetMaxSize(uint32_t max_table_size) {
void HPackEncoderTable::EvictOne() {
tail_remote_index_++;
GPR_ASSERT(tail_remote_index_ > 0);
GPR_ASSERT(table_elems_ > 0);
CHECK_GT(tail_remote_index_, 0u);
CHECK_GT(table_elems_, 0u);
auto removing_size = elem_size_[tail_remote_index_ % elem_size_.size()];
GPR_ASSERT(table_size_ >= removing_size);
CHECK(table_size_ >= removing_size);
table_size_ -= removing_size;
table_elems_--;
}
void HPackEncoderTable::Rebuild(uint32_t capacity) {
decltype(elem_size_) new_elem_size(capacity);
GPR_ASSERT(table_elems_ <= capacity);
CHECK_LE(table_elems_, capacity);
for (uint32_t i = 0; i < table_elems_; i++) {
uint32_t ofs = tail_remote_index_ + i + 1;
new_elem_size[ofs % capacity] = elem_size_[ofs % elem_size_.size()];

@ -16,6 +16,7 @@
#include <stddef.h>
#include "absl/log/check.h"
#include "absl/strings/str_format.h"
#include <grpc/support/port_platform.h>
@ -53,7 +54,7 @@ class MetadataSizeLimitExceededEncoder {
};
absl::Status MakeStreamError(absl::Status error) {
GPR_DEBUG_ASSERT(!error.ok());
DCHECK(!error.ok());
return grpc_error_set_int(std::move(error), StatusIntProperty::kStreamId, 0);
}
} // namespace

@ -21,6 +21,7 @@
#include <string>
#include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
@ -193,7 +194,7 @@ class HpackParseResult {
static HpackParseResult InvalidMetadataError(ValidateMetadataResult result,
absl::string_view key) {
GPR_DEBUG_ASSERT(result != ValidateMetadataResult::kOk);
DCHECK(result != ValidateMetadataResult::kOk);
HpackParseResult p{HpackParseStatus::kInvalidMetadata};
p.state_->key = std::string(key);
p.state_->validate_metadata_result = result;

@ -27,6 +27,7 @@
#include <utility>
#include "absl/base/attributes.h"
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
@ -194,7 +195,7 @@ class HPackParser::Input {
absl::optional<StringPrefix> ParseStringPrefix() {
auto cur = Next();
if (!cur.has_value()) {
GPR_DEBUG_ASSERT(eof_error());
DCHECK(eof_error());
return {};
}
// Huffman if the top bit is 1
@ -205,7 +206,7 @@ class HPackParser::Input {
// all ones ==> varint string length
auto v = ParseVarint(0x7f);
if (!v.has_value()) {
GPR_DEBUG_ASSERT(eof_error());
DCHECK(eof_error());
return {};
}
strlen = *v;
@ -228,7 +229,7 @@ class HPackParser::Input {
// Intended for errors that are specific to a stream and recoverable.
// Callers should ensure that any hpack table updates happen.
void SetErrorAndContinueParsing(HpackParseResult error) {
GPR_DEBUG_ASSERT(error.stream_error());
DCHECK(error.stream_error());
SetError(std::move(error));
}
@ -236,7 +237,7 @@ class HPackParser::Input {
// Intended for unrecoverable errors, with the expectation that they will
// close the connection on return to chttp2.
void SetErrorAndStopParsing(HpackParseResult error) {
GPR_DEBUG_ASSERT(error.connection_error());
DCHECK(error.connection_error());
SetError(std::move(error));
begin_ = end_;
}
@ -245,20 +246,20 @@ class HPackParser::Input {
// min_progress_size: how many bytes beyond the current frontier do we need to
// read prior to being able to get further in this parse.
void UnexpectedEOF(size_t min_progress_size) {
GPR_ASSERT(min_progress_size > 0);
CHECK_GT(min_progress_size, 0u);
if (min_progress_size_ != 0 || error_.connection_error()) {
GPR_DEBUG_ASSERT(eof_error());
DCHECK(eof_error());
return;
}
// Set min progress size, taking into account bytes parsed already but not
// consumed.
min_progress_size_ = min_progress_size + (begin_ - frontier_);
GPR_DEBUG_ASSERT(eof_error());
DCHECK(eof_error());
}
// Update the frontier - signifies we've successfully parsed another element
void UpdateFrontier() {
GPR_DEBUG_ASSERT(skip_bytes_ == 0);
DCHECK_EQ(skip_bytes_, 0u);
frontier_ = begin_;
}
@ -375,7 +376,7 @@ HPackParser::String::StringResult HPackParser::String::ParseUncompressed(
// Check there's enough bytes
if (input->remaining() < length) {
input->UnexpectedEOF(/*min_progress_size=*/length);
GPR_DEBUG_ASSERT(input->eof_error());
DCHECK(input->eof_error());
return StringResult{HpackParseStatus::kEof, wire_size, String{}};
}
auto* refcount = input->slice_refcount();
@ -595,7 +596,7 @@ class HPackParser::Parser {
private:
bool ParseTop() {
GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kTop);
DCHECK(state_.parse_state == ParseState::kTop);
auto cur = *input_->Next();
switch (cur >> 4) {
// Literal header not indexed - First byte format: 0000xxxx
@ -765,7 +766,7 @@ class HPackParser::Parser {
// Parse an index encoded key and a string encoded value
bool StartIdxKey(uint32_t index, bool add_to_table) {
GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kTop);
DCHECK(state_.parse_state == ParseState::kTop);
input_->UpdateFrontier();
const auto* elem = state_.hpack_table.Lookup(index);
if (GPR_UNLIKELY(elem == nullptr)) {
@ -781,14 +782,14 @@ class HPackParser::Parser {
// Parse a varint index encoded key and a string encoded value
bool StartVarIdxKey(uint32_t offset, bool add_to_table) {
GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kTop);
DCHECK(state_.parse_state == ParseState::kTop);
auto index = input_->ParseVarint(offset);
if (GPR_UNLIKELY(!index.has_value())) return false;
return StartIdxKey(*index, add_to_table);
}
bool StartParseLiteralKey(bool add_to_table) {
GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kTop);
DCHECK(state_.parse_state == ParseState::kTop);
state_.add_to_table = add_to_table;
state_.parse_state = ParseState::kParsingKeyLength;
input_->UpdateFrontier();
@ -823,7 +824,7 @@ class HPackParser::Parser {
}
bool ParseKeyLength() {
GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kParsingKeyLength);
DCHECK(state_.parse_state == ParseState::kParsingKeyLength);
auto pfx = input_->ParseStringPrefix();
if (!pfx.has_value()) return false;
state_.is_string_huff_compressed = pfx->huff;
@ -844,14 +845,14 @@ class HPackParser::Parser {
}
bool ParseKeyBody() {
GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kParsingKeyBody);
DCHECK(state_.parse_state == ParseState::kParsingKeyBody);
auto key = String::Parse(input_, state_.is_string_huff_compressed,
state_.string_length);
switch (key.status) {
case HpackParseStatus::kOk:
break;
case HpackParseStatus::kEof:
GPR_DEBUG_ASSERT(input_->eof_error());
DCHECK(input_->eof_error());
return false;
default:
input_->SetErrorAndStopParsing(
@ -891,7 +892,7 @@ class HPackParser::Parser {
}
bool SkipKeyBody() {
GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kSkippingKeyBody);
DCHECK(state_.parse_state == ParseState::kSkippingKeyBody);
if (!SkipStringBody()) return false;
input_->UpdateFrontier();
state_.parse_state = ParseState::kSkippingValueLength;
@ -899,7 +900,7 @@ class HPackParser::Parser {
}
bool SkipValueLength() {
GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kSkippingValueLength);
DCHECK(state_.parse_state == ParseState::kSkippingValueLength);
auto pfx = input_->ParseStringPrefix();
if (!pfx.has_value()) return false;
state_.string_length = pfx->length;
@ -909,7 +910,7 @@ class HPackParser::Parser {
}
bool SkipValueBody() {
GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kSkippingValueBody);
DCHECK(state_.parse_state == ParseState::kSkippingValueBody);
if (!SkipStringBody()) return false;
input_->UpdateFrontier();
state_.parse_state = ParseState::kTop;
@ -920,7 +921,7 @@ class HPackParser::Parser {
}
bool ParseValueLength() {
GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kParsingValueLength);
DCHECK(state_.parse_state == ParseState::kParsingValueLength);
auto pfx = input_->ParseStringPrefix();
if (!pfx.has_value()) return false;
state_.is_string_huff_compressed = pfx->huff;
@ -944,7 +945,7 @@ class HPackParser::Parser {
}
bool ParseValueBody() {
GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kParsingValueBody);
DCHECK(state_.parse_state == ParseState::kParsingValueBody);
auto value =
state_.is_binary_header
? String::ParseBinary(input_, state_.is_string_huff_compressed,
@ -973,7 +974,7 @@ class HPackParser::Parser {
case HpackParseStatus::kOk:
break;
case HpackParseStatus::kEof:
GPR_DEBUG_ASSERT(input_->eof_error());
DCHECK(input_->eof_error());
return false;
default: {
auto result =

@ -25,6 +25,7 @@
#include <cstring>
#include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
@ -41,7 +42,7 @@
namespace grpc_core {
void HPackTable::MementoRingBuffer::Put(Memento m) {
GPR_ASSERT(num_entries_ < max_entries_);
CHECK_LT(num_entries_, max_entries_);
if (entries_.size() < max_entries_) {
++num_entries_;
return entries_.push_back(std::move(m));
@ -52,7 +53,7 @@ void HPackTable::MementoRingBuffer::Put(Memento m) {
}
auto HPackTable::MementoRingBuffer::PopOne() -> Memento {
GPR_ASSERT(num_entries_ > 0);
CHECK_GT(num_entries_, 0u);
size_t index = first_entry_ % max_entries_;
++first_entry_;
--num_entries_;
@ -90,7 +91,7 @@ void HPackTable::MementoRingBuffer::ForEach(
// Evict one element from the table
void HPackTable::EvictOne() {
auto first_entry = entries_.PopOne();
GPR_ASSERT(first_entry.md.transport_size() <= mem_used_);
CHECK(first_entry.md.transport_size() <= mem_used_);
mem_used_ -= first_entry.md.transport_size();
}

@ -16,6 +16,8 @@
#include <utility>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -31,7 +33,7 @@ void Chttp2MaxConcurrentStreamsPolicy::FlushedSettings() {
}
void Chttp2MaxConcurrentStreamsPolicy::AckLastSend() {
GPR_ASSERT(unacked_demerits_ >= sent_demerits_);
CHECK(unacked_demerits_ >= sent_demerits_);
unacked_demerits_ -= std::exchange(sent_demerits_, 0);
}

@ -28,6 +28,7 @@
#include "absl/base/attributes.h"
#include "absl/container/flat_hash_map.h"
#include "absl/log/check.h"
#include "absl/random/bit_gen_ref.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
@ -267,7 +268,7 @@ absl::variant<size_t, absl::Status> grpc_chttp2_perform_read(
}
ABSL_FALLTHROUGH_INTENDED;
case GRPC_DTS_FH_0:
GPR_DEBUG_ASSERT(cur < end);
DCHECK_LT(cur, end);
t->incoming_frame_size = (static_cast<uint32_t>(*cur)) << 16;
if (++cur == end) {
t->deframe_state = GRPC_DTS_FH_1;
@ -275,7 +276,7 @@ absl::variant<size_t, absl::Status> grpc_chttp2_perform_read(
}
ABSL_FALLTHROUGH_INTENDED;
case GRPC_DTS_FH_1:
GPR_DEBUG_ASSERT(cur < end);
DCHECK_LT(cur, end);
t->incoming_frame_size |= (static_cast<uint32_t>(*cur)) << 8;
if (++cur == end) {
t->deframe_state = GRPC_DTS_FH_2;
@ -283,7 +284,7 @@ absl::variant<size_t, absl::Status> grpc_chttp2_perform_read(
}
ABSL_FALLTHROUGH_INTENDED;
case GRPC_DTS_FH_2:
GPR_DEBUG_ASSERT(cur < end);
DCHECK_LT(cur, end);
t->incoming_frame_size |= *cur;
if (++cur == end) {
t->deframe_state = GRPC_DTS_FH_3;
@ -291,7 +292,7 @@ absl::variant<size_t, absl::Status> grpc_chttp2_perform_read(
}
ABSL_FALLTHROUGH_INTENDED;
case GRPC_DTS_FH_3:
GPR_DEBUG_ASSERT(cur < end);
DCHECK_LT(cur, end);
t->incoming_frame_type = *cur;
if (++cur == end) {
t->deframe_state = GRPC_DTS_FH_4;
@ -299,7 +300,7 @@ absl::variant<size_t, absl::Status> grpc_chttp2_perform_read(
}
ABSL_FALLTHROUGH_INTENDED;
case GRPC_DTS_FH_4:
GPR_DEBUG_ASSERT(cur < end);
DCHECK_LT(cur, end);
t->incoming_frame_flags = *cur;
if (++cur == end) {
t->deframe_state = GRPC_DTS_FH_5;
@ -307,7 +308,7 @@ absl::variant<size_t, absl::Status> grpc_chttp2_perform_read(
}
ABSL_FALLTHROUGH_INTENDED;
case GRPC_DTS_FH_5:
GPR_DEBUG_ASSERT(cur < end);
DCHECK_LT(cur, end);
t->incoming_stream_id = ((static_cast<uint32_t>(*cur)) & 0x7f) << 24;
if (++cur == end) {
t->deframe_state = GRPC_DTS_FH_6;
@ -315,7 +316,7 @@ absl::variant<size_t, absl::Status> grpc_chttp2_perform_read(
}
ABSL_FALLTHROUGH_INTENDED;
case GRPC_DTS_FH_6:
GPR_DEBUG_ASSERT(cur < end);
DCHECK_LT(cur, end);
t->incoming_stream_id |= (static_cast<uint32_t>(*cur)) << 16;
if (++cur == end) {
t->deframe_state = GRPC_DTS_FH_7;
@ -323,7 +324,7 @@ absl::variant<size_t, absl::Status> grpc_chttp2_perform_read(
}
ABSL_FALLTHROUGH_INTENDED;
case GRPC_DTS_FH_7:
GPR_DEBUG_ASSERT(cur < end);
DCHECK_LT(cur, end);
t->incoming_stream_id |= (static_cast<uint32_t>(*cur)) << 8;
if (++cur == end) {
t->deframe_state = GRPC_DTS_FH_8;
@ -331,7 +332,7 @@ absl::variant<size_t, absl::Status> grpc_chttp2_perform_read(
}
ABSL_FALLTHROUGH_INTENDED;
case GRPC_DTS_FH_8:
GPR_DEBUG_ASSERT(cur < end);
DCHECK_LT(cur, end);
t->incoming_stream_id |= (static_cast<uint32_t>(*cur));
if (grpc_http_trace.enabled()) {
gpr_log(GPR_INFO, "INCOMING[%p]: %s len:%d id:0x%08x", t,
@ -366,7 +367,7 @@ absl::variant<size_t, absl::Status> grpc_chttp2_perform_read(
}
ABSL_FALLTHROUGH_INTENDED;
case GRPC_DTS_FRAME:
GPR_DEBUG_ASSERT(cur < end);
DCHECK_LT(cur, end);
if (static_cast<uint32_t>(end - cur) == t->incoming_frame_size) {
err = parse_frame_slice(
t,
@ -729,7 +730,7 @@ static grpc_error_handle init_header_frame_parser(grpc_chttp2_transport* t,
} else {
t->incoming_stream = s;
}
GPR_DEBUG_ASSERT(s != nullptr);
DCHECK_NE(s, nullptr);
s->stats.incoming.framing_bytes += 9;
if (GPR_UNLIKELY(s->read_closed)) {
GRPC_CHTTP2_IF_TRACING(gpr_log(

@ -16,6 +16,7 @@
#include <utility>
#include "absl/log/check.h"
#include "absl/meta/type_traits.h"
#include "absl/random/distributions.h"
@ -95,7 +96,7 @@ absl::optional<uint64_t> Chttp2PingCallbacks::OnPingTimeout(
Duration ping_timeout,
grpc_event_engine::experimental::EventEngine* event_engine,
Callback callback) {
GPR_ASSERT(started_new_ping_without_setting_timeout_);
CHECK(started_new_ping_without_setting_timeout_);
started_new_ping_without_setting_timeout_ = false;
auto it = inflight_.find(most_recent_inflight_);
if (it == inflight_.end()) return absl::nullopt;

@ -16,6 +16,8 @@
//
//
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -57,7 +59,7 @@ static bool stream_list_pop(grpc_chttp2_transport* t,
grpc_chttp2_stream* s = t->lists[id].head;
if (s) {
grpc_chttp2_stream* new_head = s->links[id].next;
GPR_ASSERT(s->included.is_set(id));
CHECK(s->included.is_set(id));
if (new_head) {
t->lists[id].head = new_head;
new_head->links[id].prev = nullptr;
@ -77,12 +79,12 @@ static bool stream_list_pop(grpc_chttp2_transport* t,
static void stream_list_remove(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
grpc_chttp2_stream_list_id id) {
GPR_ASSERT(s->included.is_set(id));
CHECK(s->included.is_set(id));
s->included.clear(id);
if (s->links[id].prev) {
s->links[id].prev->links[id].next = s->links[id].next;
} else {
GPR_ASSERT(t->lists[id].head == s);
CHECK(t->lists[id].head == s);
t->lists[id].head = s->links[id].next;
}
if (s->links[id].next) {
@ -111,7 +113,7 @@ static void stream_list_add_tail(grpc_chttp2_transport* t,
grpc_chttp2_stream* s,
grpc_chttp2_stream_list_id id) {
grpc_chttp2_stream* old_tail;
GPR_ASSERT(!s->included.is_set(id));
CHECK(!s->included.is_set(id));
old_tail = t->lists[id].tail;
s->links[id].next = nullptr;
s->links[id].prev = old_tail;
@ -141,7 +143,7 @@ static bool stream_list_add(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
bool grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport* t,
grpc_chttp2_stream* s) {
GPR_ASSERT(s->id != 0);
CHECK_NE(s->id, 0u);
return stream_list_add(t, s, GRPC_CHTTP2_LIST_WRITABLE);
}

@ -22,6 +22,8 @@
#include <stdint.h>
#include <stdlib.h>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -49,7 +51,7 @@ class VarintWriter {
explicit VarintWriter(size_t value)
: value_(value),
length_(value < kMaxInPrefix ? 1 : VarintLength(value - kMaxInPrefix)) {
GPR_ASSERT(value <= UINT32_MAX);
CHECK(value <= UINT32_MAX);
}
size_t value() const { return value_; }

@ -16,6 +16,8 @@
#include <algorithm>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -24,7 +26,7 @@ namespace grpc_core {
size_t Chttp2WriteSizePolicy::WriteTargetSize() { return current_target_; }
void Chttp2WriteSizePolicy::BeginWrite(size_t size) {
GPR_ASSERT(experiment_start_time_ == Timestamp::InfFuture());
CHECK(experiment_start_time_ == Timestamp::InfFuture());
if (size < current_target_ * 7 / 10) {
// If we were trending fast but stopped getting enough data to verify, then
// reset back to the default state.

@ -26,6 +26,7 @@
#include <utility>
#include "absl/container/flat_hash_map.h"
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/types/optional.h"
@ -268,7 +269,7 @@ class WriteContext {
grpc_core::Http2Frame frame(std::move(*update));
Serialize(absl::Span<grpc_core::Http2Frame>(&frame, 1), t_->outbuf);
if (t_->keepalive_timeout != grpc_core::Duration::Infinity()) {
GPR_ASSERT(
CHECK(
t_->settings_ack_watchdog ==
grpc_event_engine::experimental::EventEngine::TaskHandle::kInvalid);
// We base settings timeout on keepalive timeout, but double it to allow
@ -290,7 +291,7 @@ class WriteContext {
// simple writes are queued to qbuf, and flushed here
grpc_slice_buffer_move_into(&t_->qbuf, t_->outbuf.c_slice_buffer());
t_->num_pending_induced_frames = 0;
GPR_ASSERT(t_->qbuf.count == 0);
CHECK_EQ(t_->qbuf.count, 0u);
}
void FlushWindowUpdates() {

@ -112,13 +112,6 @@ class EventEngineSupportsFdExtension {
int fd, const EndpointConfig& config,
MemoryAllocator memory_allocator) = 0;
/// Creates an EventEngine::Endpoint from an fd which is already assumed to be
/// connected to a remote peer. See \a CreatePosixEndpointFromFd for details.
/// This has the same behavior, but the \a memory_allocator is taken from the
/// EndpointConfig's resource quota.
virtual std::unique_ptr<EventEngine::Endpoint> CreateEndpointFromFd(
int fd, const EndpointConfig& config) = 0;
/// Called when the posix listener has accepted a new client connection.
/// \a listener_fd - The listening socket fd that accepted the new client
/// connection.

@ -25,6 +25,7 @@
#include "absl/cleanup/cleanup.h"
#include "absl/functional/any_invocable.h"
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
@ -142,7 +143,7 @@ void AsyncConnect::OnWritable(absl::Status status)
absl::StatusOr<std::unique_ptr<EventEngine::Endpoint>> ep;
mu_.Lock();
GPR_ASSERT(fd_ != nullptr);
CHECK_NE(fd_, nullptr);
fd = std::exchange(fd_, nullptr);
bool connect_cancelled = connect_cancelled_;
if (fd->IsHandleShutdown() && status.ok()) {
@ -334,7 +335,7 @@ PosixEnginePollerManager::PosixEnginePollerManager(
poller_state_(PollerState::kExternal),
executor_(nullptr),
trigger_shutdown_called_(false) {
GPR_DEBUG_ASSERT(poller_ != nullptr);
DCHECK_NE(poller_, nullptr);
}
void PosixEnginePollerManager::Run(
@ -351,7 +352,7 @@ void PosixEnginePollerManager::Run(absl::AnyInvocable<void()> cb) {
}
void PosixEnginePollerManager::TriggerShutdown() {
GPR_DEBUG_ASSERT(trigger_shutdown_called_ == false);
DCHECK(trigger_shutdown_called_ == false);
trigger_shutdown_called_ = true;
// If the poller is external, dont try to shut it down. Otherwise
// set poller state to PollerState::kShuttingDown.
@ -467,7 +468,7 @@ PosixEventEngine::~PosixEventEngine() {
this, HandleToString(handle).c_str());
}
}
GPR_ASSERT(GPR_LIKELY(known_handles_.empty()));
CHECK(GPR_LIKELY(known_handles_.empty()));
}
timer_manager_->Shutdown();
#if GRPC_PLATFORM_SUPPORTS_POSIX_POLLING
@ -592,7 +593,7 @@ bool PosixEventEngine::CancelConnect(EventEngine::ConnectionHandle handle) {
auto it = shard->pending_connections.find(connection_handle);
if (it != shard->pending_connections.end()) {
ac = it->second;
GPR_ASSERT(ac != nullptr);
CHECK_NE(ac, nullptr);
// Trying to acquire ac->mu here would could cause a deadlock because
// the OnWritable method tries to acquire the two mutexes used
// here in the reverse order. But we dont need to acquire ac->mu before
@ -639,7 +640,7 @@ EventEngine::ConnectionHandle PosixEventEngine::Connect(
const EndpointConfig& args, MemoryAllocator memory_allocator,
Duration timeout) {
#if GRPC_PLATFORM_SUPPORTS_POSIX_POLLING
GPR_ASSERT(poller_manager_ != nullptr);
CHECK_NE(poller_manager_, nullptr);
PosixTcpOptions options = TcpOptionsFromEndpointConfig(args);
absl::StatusOr<PosixSocketWrapper::PosixSocketCreateResult> socket =
PosixSocketWrapper::CreateAndPrepareTcpClientSocket(options, addr);
@ -661,9 +662,9 @@ PosixEventEngine::CreatePosixEndpointFromFd(int fd,
const EndpointConfig& config,
MemoryAllocator memory_allocator) {
#if GRPC_PLATFORM_SUPPORTS_POSIX_POLLING
GPR_ASSERT(fd > 0);
DCHECK_GT(fd, 0);
PosixEventPoller* poller = poller_manager_->Poller();
GPR_DEBUG_ASSERT(poller != nullptr);
DCHECK_NE(poller, nullptr);
EventHandle* handle =
poller->CreateHandle(fd, "tcp-client", poller->CanTrackErrors());
return CreatePosixEndpoint(handle, nullptr, shared_from_this(),
@ -676,22 +677,6 @@ PosixEventEngine::CreatePosixEndpointFromFd(int fd,
#endif // GRPC_PLATFORM_SUPPORTS_POSIX_POLLING
}
std::unique_ptr<EventEngine::Endpoint> PosixEventEngine::CreateEndpointFromFd(
int fd, const EndpointConfig& config) {
auto options = TcpOptionsFromEndpointConfig(config);
MemoryAllocator allocator;
if (options.memory_allocator_factory != nullptr) {
return CreatePosixEndpointFromFd(
fd, config,
options.memory_allocator_factory->CreateMemoryAllocator(
absl::StrCat("allocator:", fd)));
}
return CreatePosixEndpointFromFd(
fd, config,
options.resource_quota->memory_quota()->CreateMemoryAllocator(
absl::StrCat("allocator:", fd)));
}
absl::StatusOr<std::unique_ptr<EventEngine::Listener>>
PosixEventEngine::CreateListener(
Listener::AcceptCallback on_accept,

@ -172,8 +172,6 @@ class PosixEventEngine final : public PosixEventEngineWithFdSupport,
std::unique_ptr<EventEngine::Endpoint> CreatePosixEndpointFromFd(
int fd, const EndpointConfig& config,
MemoryAllocator memory_allocator) override;
std::unique_ptr<EventEngine::Endpoint> CreateEndpointFromFd(
int fd, const EndpointConfig& config) override;
absl::StatusOr<std::unique_ptr<Listener>> CreateListener(
Listener::AcceptCallback on_accept,

@ -227,18 +227,19 @@ void WorkStealingThreadPool::PostforkChild() { pool_->Postfork(); }
WorkStealingThreadPool::WorkStealingThreadPoolImpl::WorkStealingThreadPoolImpl(
size_t reserve_threads)
: reserve_threads_(reserve_threads), queue_(this), lifeguard_(this) {}
: reserve_threads_(reserve_threads), queue_(this) {}
void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Start() {
for (size_t i = 0; i < reserve_threads_; i++) {
StartThread();
}
lifeguard_.Start();
grpc_core::MutexLock lock(&lifeguard_ptr_mu_);
lifeguard_ = std::make_unique<Lifeguard>(this);
}
void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Run(
EventEngine::Closure* closure) {
DCHECK(quiesced_.load(std::memory_order_relaxed) == false);
CHECK(!IsQuiesced());
if (g_local_queue != nullptr && g_local_queue->owner() == this) {
g_local_queue->Add(closure);
} else {
@ -283,7 +284,8 @@ void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Quiesce() {
}
CHECK(queue_.Empty());
quiesced_.store(true, std::memory_order_relaxed);
lifeguard_.BlockUntilShutdownAndReset();
grpc_core::MutexLock lock(&lifeguard_ptr_mu_);
lifeguard_.reset();
}
bool WorkStealingThreadPool::WorkStealingThreadPoolImpl::SetThrottled(
@ -325,7 +327,8 @@ void WorkStealingThreadPool::WorkStealingThreadPoolImpl::PrepareFork() {
if (!threads_were_shut_down.ok() && g_log_verbose_failures) {
DumpStacksAndCrash();
}
lifeguard_.BlockUntilShutdownAndReset();
grpc_core::MutexLock lock(&lifeguard_ptr_mu_);
lifeguard_.reset();
}
void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Postfork() {
@ -374,9 +377,7 @@ WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::Lifeguard(
.set_max_backoff(kLifeguardMaxSleepBetweenChecks)
.set_multiplier(1.3)),
lifeguard_should_shut_down_(std::make_unique<grpc_core::Notification>()),
lifeguard_is_shut_down_(std::make_unique<grpc_core::Notification>()) {}
void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::Start() {
lifeguard_is_shut_down_(std::make_unique<grpc_core::Notification>()) {
// lifeguard_running_ is set early to avoid a quiesce race while the
// lifeguard is still starting up.
lifeguard_running_.store(true);
@ -411,8 +412,7 @@ void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::
lifeguard_is_shut_down_->Notify();
}
void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::
BlockUntilShutdownAndReset() {
WorkStealingThreadPool::WorkStealingThreadPoolImpl::Lifeguard::~Lifeguard() {
lifeguard_should_shut_down_->Notify();
while (lifeguard_running_.load(std::memory_order_relaxed)) {
GRPC_LOG_EVERY_N_SEC_DELAYED(kBlockingQuiesceLogRateSeconds, GPR_DEBUG,

@ -155,11 +155,7 @@ class WorkStealingThreadPool final : public ThreadPool {
class Lifeguard {
public:
explicit Lifeguard(WorkStealingThreadPoolImpl* pool);
// Start the lifeguard thread.
void Start();
// Block until the lifeguard thread is shut down.
// Afterwards, reset the lifeguard state so it can start again cleanly.
void BlockUntilShutdownAndReset();
~Lifeguard();
private:
// The main body of the lifeguard thread.
@ -194,7 +190,8 @@ class WorkStealingThreadPool final : public ThreadPool {
// at a time.
std::atomic<bool> throttled_{false};
WorkSignal work_signal_;
Lifeguard lifeguard_;
grpc_core::Mutex lifeguard_ptr_mu_;
std::unique_ptr<Lifeguard> lifeguard_ ABSL_GUARDED_BY(lifeguard_ptr_mu_);
// Set of threads for verbose failure debugging
grpc_core::Mutex thd_set_mu_;
absl::flat_hash_set<gpr_thd_id> thds_ ABSL_GUARDED_BY(thd_set_mu_);

@ -21,6 +21,8 @@
#include <stdlib.h>
#include <string.h>
#include "absl/log/check.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@ -59,7 +61,7 @@ void* gpr_realloc(void* p, size_t size) {
}
void* gpr_malloc_aligned(size_t size, size_t alignment) {
GPR_ASSERT(((alignment - 1) & alignment) == 0); // Must be power of 2.
CHECK_EQ(((alignment - 1) & alignment), 0u); // Must be power of 2.
size_t extra = alignment - 1 + sizeof(void*);
void* p = gpr_malloc(size + extra);
void** ret = reinterpret_cast<void**>(

@ -23,7 +23,6 @@
#include <stdio.h>
#include <string.h>
#include "absl/log/globals.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
@ -39,7 +38,6 @@
#define GPR_DEFAULT_LOG_VERBOSITY_STRING "ERROR"
#endif // !GPR_DEFAULT_LOG_VERBOSITY_STRING
static constexpr int g_absl_vlog_level_for_gpr_verbosity_debug = 2;
static constexpr gpr_atm GPR_LOG_SEVERITY_UNSET = GPR_LOG_SEVERITY_ERROR + 10;
static constexpr gpr_atm GPR_LOG_SEVERITY_NONE = GPR_LOG_SEVERITY_ERROR + 11;
@ -85,9 +83,8 @@ void gpr_default_log(gpr_log_func_args* args) {
}
switch (args->severity) {
case GPR_LOG_SEVERITY_DEBUG:
VLOG(g_absl_vlog_level_for_gpr_verbosity_debug)
.AtLocation(args->file, args->line)
<< args->message;
// Log DEBUG messages as VLOG(2).
VLOG(2).AtLocation(args->file, args->line) << args->message;
return;
case GPR_LOG_SEVERITY_INFO:
LOG(INFO).AtLocation(args->file, args->line) << args->message;
@ -148,12 +145,6 @@ void gpr_log_verbosity_init() {
parse_log_severity(verbosity, min_severity_to_print);
}
gpr_atm_no_barrier_store(&g_min_severity_to_print, min_severity_to_print);
if (grpc_core::ConfigVars::Get().AbslLogging() &&
min_severity_to_print == GPR_LOG_SEVERITY_DEBUG) {
// Matches full file paths that include a `*grpc*` folder, including
// grpcpp.
absl::SetVLogLevel("*grpc*/*", g_absl_vlog_level_for_gpr_verbosity_debug);
}
}
// init stacktrace_minloglevel when it hasn't been set
if ((gpr_atm_no_barrier_load(&g_min_severity_to_print_stacktrace)) ==

@ -24,6 +24,8 @@
#include <errno.h>
#include <time.h>
#include "absl/log/check.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
@ -33,36 +35,36 @@
void gpr_mu_init(gpr_mu* mu) {
#ifdef GRPC_ASAN_ENABLED
GPR_ASSERT(pthread_mutex_init(&mu->mutex, nullptr) == 0);
CHECK_EQ(pthread_mutex_init(&mu->mutex, nullptr), 0);
mu->leak_checker = static_cast<int*>(malloc(sizeof(*mu->leak_checker)));
GPR_ASSERT(mu->leak_checker != nullptr);
CHECK_NE(mu->leak_checker, nullptr);
#else
GPR_ASSERT(pthread_mutex_init(mu, nullptr) == 0);
CHECK_EQ(pthread_mutex_init(mu, nullptr), 0);
#endif
}
void gpr_mu_destroy(gpr_mu* mu) {
#ifdef GRPC_ASAN_ENABLED
GPR_ASSERT(pthread_mutex_destroy(&mu->mutex) == 0);
CHECK_EQ(pthread_mutex_destroy(&mu->mutex), 0);
free(mu->leak_checker);
#else
GPR_ASSERT(pthread_mutex_destroy(mu) == 0);
CHECK_EQ(pthread_mutex_destroy(mu), 0);
#endif
}
void gpr_mu_lock(gpr_mu* mu) {
#ifdef GRPC_ASAN_ENABLED
GPR_ASSERT(pthread_mutex_lock(&mu->mutex) == 0);
CHECK_EQ(pthread_mutex_lock(&mu->mutex), 0);
#else
GPR_ASSERT(pthread_mutex_lock(mu) == 0);
CHECK_EQ(pthread_mutex_lock(mu), 0);
#endif
}
void gpr_mu_unlock(gpr_mu* mu) {
#ifdef GRPC_ASAN_ENABLED
GPR_ASSERT(pthread_mutex_unlock(&mu->mutex) == 0);
CHECK_EQ(pthread_mutex_unlock(&mu->mutex), 0);
#else
GPR_ASSERT(pthread_mutex_unlock(mu) == 0);
CHECK_EQ(pthread_mutex_unlock(mu), 0);
#endif
}
@ -73,7 +75,7 @@ int gpr_mu_trylock(gpr_mu* mu) {
#else
err = pthread_mutex_trylock(mu);
#endif
GPR_ASSERT(err == 0 || err == EBUSY);
CHECK(err == 0 || err == EBUSY);
return err == 0;
}
@ -81,26 +83,26 @@ int gpr_mu_trylock(gpr_mu* mu) {
void gpr_cv_init(gpr_cv* cv) {
pthread_condattr_t attr;
GPR_ASSERT(pthread_condattr_init(&attr) == 0);
CHECK_EQ(pthread_condattr_init(&attr), 0);
#if GPR_LINUX
GPR_ASSERT(pthread_condattr_setclock(&attr, CLOCK_MONOTONIC) == 0);
CHECK_EQ(pthread_condattr_setclock(&attr, CLOCK_MONOTONIC), 0);
#endif // GPR_LINUX
#ifdef GRPC_ASAN_ENABLED
GPR_ASSERT(pthread_cond_init(&cv->cond_var, &attr) == 0);
CHECK_EQ(pthread_cond_init(&cv->cond_var, &attr), 0);
cv->leak_checker = static_cast<int*>(malloc(sizeof(*cv->leak_checker)));
GPR_ASSERT(cv->leak_checker != nullptr);
CHECK_NE(cv->leak_checker, nullptr);
#else
GPR_ASSERT(pthread_cond_init(cv, &attr) == 0);
CHECK_EQ(pthread_cond_init(cv, &attr), 0);
#endif
}
void gpr_cv_destroy(gpr_cv* cv) {
#ifdef GRPC_ASAN_ENABLED
GPR_ASSERT(pthread_cond_destroy(&cv->cond_var) == 0);
CHECK_EQ(pthread_cond_destroy(&cv->cond_var), 0);
free(cv->leak_checker);
#else
GPR_ASSERT(pthread_cond_destroy(cv) == 0);
CHECK_EQ(pthread_cond_destroy(cv), 0);
#endif
}
@ -129,30 +131,30 @@ int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu, gpr_timespec abs_deadline) {
err = pthread_cond_timedwait(cv, mu, &abs_deadline_ts);
#endif
}
GPR_ASSERT(err == 0 || err == ETIMEDOUT || err == EAGAIN);
CHECK(err == 0 || err == ETIMEDOUT || err == EAGAIN);
return err == ETIMEDOUT;
}
void gpr_cv_signal(gpr_cv* cv) {
#ifdef GRPC_ASAN_ENABLED
GPR_ASSERT(pthread_cond_signal(&cv->cond_var) == 0);
CHECK_EQ(pthread_cond_signal(&cv->cond_var), 0);
#else
GPR_ASSERT(pthread_cond_signal(cv) == 0);
CHECK_EQ(pthread_cond_signal(cv), 0);
#endif
}
void gpr_cv_broadcast(gpr_cv* cv) {
#ifdef GRPC_ASAN_ENABLED
GPR_ASSERT(pthread_cond_broadcast(&cv->cond_var) == 0);
CHECK_EQ(pthread_cond_broadcast(&cv->cond_var), 0);
#else
GPR_ASSERT(pthread_cond_broadcast(cv) == 0);
CHECK_EQ(pthread_cond_broadcast(cv), 0);
#endif
}
//----------------------------------------
void gpr_once_init(gpr_once* once, void (*init_function)(void)) {
GPR_ASSERT(pthread_once(once, init_function) == 0);
CHECK_EQ(pthread_once(once, init_function), 0);
}
#endif // defined(GPR_POSIX_SYNC) && !defined(GPR_ABSEIL_SYNC) &&

@ -28,6 +28,8 @@
#ifdef __linux__
#include <sys/syscall.h>
#endif
#include "absl/log/check.h"
#include <grpc/support/atm.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
@ -38,7 +40,8 @@ static struct timespec timespec_from_gpr(gpr_timespec gts) {
struct timespec rv;
if (sizeof(time_t) < sizeof(int64_t)) {
// fine to assert, as this is only used in gpr_sleep_until
GPR_ASSERT(gts.tv_sec <= INT32_MAX && gts.tv_sec >= INT32_MIN);
CHECK(gts.tv_sec <= INT32_MAX);
CHECK(gts.tv_sec >= INT32_MIN);
}
rv.tv_sec = static_cast<time_t>(gts.tv_sec);
rv.tv_nsec = gts.tv_nsec;
@ -67,7 +70,7 @@ void gpr_time_init(void) { gpr_precise_clock_init(); }
static gpr_timespec now_impl(gpr_clock_type clock_type) {
struct timespec now;
GPR_ASSERT(clock_type != GPR_TIMESPAN);
CHECK(clock_type != GPR_TIMESPAN);
if (clock_type == GPR_CLOCK_PRECISE) {
gpr_timespec ret;
gpr_precise_clock_now(&ret);
@ -87,12 +90,12 @@ gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type) = now_impl;
gpr_timespec gpr_now(gpr_clock_type clock_type) {
// validate clock type
GPR_ASSERT(clock_type == GPR_CLOCK_MONOTONIC ||
clock_type == GPR_CLOCK_REALTIME ||
clock_type == GPR_CLOCK_PRECISE);
CHECK(clock_type == GPR_CLOCK_MONOTONIC || clock_type == GPR_CLOCK_REALTIME ||
clock_type == GPR_CLOCK_PRECISE);
gpr_timespec ts = gpr_now_impl(clock_type);
// tv_nsecs must be in the range [0, 1e9).
GPR_ASSERT(ts.tv_nsec >= 0 && ts.tv_nsec < 1e9);
CHECK(ts.tv_nsec >= 0);
CHECK(ts.tv_nsec < 1e9);
return ts;
}

@ -25,6 +25,8 @@
#include <string.h>
#include <unistd.h>
#include "absl/log/check.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
@ -42,7 +44,7 @@ FILE* gpr_tmpfile(const char* prefix, char** tmp_filename) {
if (tmp_filename != nullptr) *tmp_filename = nullptr;
gpr_asprintf(&filename_template, "/tmp/%s_XXXXXX", prefix);
GPR_ASSERT(filename_template != nullptr);
CHECK_NE(filename_template, nullptr);
fd = mkstemp(filename_template);
if (fd == -1) {

@ -28,6 +28,7 @@
#include <iostream>
#include "absl/log/check.h"
#include "absl/strings/substitute.h"
#include <grpc/support/alloc.h>
@ -81,8 +82,8 @@ gpr_subprocess* gpr_subprocess_create_with_envp(int argc, const char** argv,
int stdout_pipe[2];
int p0 = pipe(stdin_pipe);
int p1 = pipe(stdout_pipe);
GPR_ASSERT(p0 != -1);
GPR_ASSERT(p1 != -1);
CHECK_NE(p0, -1);
CHECK_NE(p1, -1);
pid = fork();
if (pid == -1) {
return nullptr;
@ -145,7 +146,7 @@ bool gpr_subprocess_communicate(gpr_subprocess* p, std::string& input_data,
continue;
} else {
std::cerr << "select: " << strerror(errno) << std::endl;
GPR_ASSERT(0);
CHECK(0);
}
}
@ -192,7 +193,7 @@ bool gpr_subprocess_communicate(gpr_subprocess* p, std::string& input_data,
while (waitpid(p->pid, &status, 0) == -1) {
if (errno != EINTR) {
std::cerr << "waitpid: " << strerror(errno) << std::endl;
GPR_ASSERT(0);
CHECK(0);
}
}

@ -22,6 +22,8 @@
#include <assert.h>
#include "absl/log/check.h"
#include <grpc/support/atm.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
@ -59,11 +61,11 @@ void gpr_event_init(gpr_event* ev) {
void gpr_event_set(gpr_event* ev, void* value) {
struct sync_array_s* s = hash(ev);
gpr_mu_lock(&s->mu);
GPR_ASSERT(gpr_atm_acq_load(&ev->state) == 0);
CHECK_EQ(gpr_atm_acq_load(&ev->state), 0);
gpr_atm_rel_store(&ev->state, (gpr_atm)value);
gpr_cv_broadcast(&s->cv);
gpr_mu_unlock(&s->mu);
GPR_ASSERT(value != nullptr);
CHECK_NE(value, nullptr);
}
void* gpr_event_get(gpr_event* ev) {
@ -102,7 +104,7 @@ void gpr_refn(gpr_refcount* r, int n) {
int gpr_unref(gpr_refcount* r) {
gpr_atm prior = gpr_atm_full_fetch_add(&r->count, -1);
GPR_ASSERT(prior > 0);
CHECK_GT(prior, 0);
return prior == 1;
}

@ -24,6 +24,8 @@
#include <stdio.h>
#include <string.h>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/time.h>
@ -31,7 +33,7 @@
int gpr_time_cmp(gpr_timespec a, gpr_timespec b) {
int cmp = (a.tv_sec > b.tv_sec) - (a.tv_sec < b.tv_sec);
GPR_ASSERT(a.clock_type == b.clock_type);
CHECK(a.clock_type == b.clock_type);
if (cmp == 0 && a.tv_sec != INT64_MAX && a.tv_sec != INT64_MIN) {
cmp = (a.tv_nsec > b.tv_nsec) - (a.tv_nsec < b.tv_nsec);
}
@ -79,7 +81,7 @@ static gpr_timespec to_seconds_from_sub_second_time(int64_t time_in_units,
} else if (time_in_units == INT64_MIN) {
out = gpr_inf_past(type);
} else {
GPR_DEBUG_ASSERT(GPR_NS_PER_SEC % units_per_sec == 0);
DCHECK_EQ(GPR_NS_PER_SEC % units_per_sec, 0);
out.tv_sec = time_in_units / units_per_sec;
out.tv_nsec =
@ -139,11 +141,11 @@ gpr_timespec gpr_time_from_hours(int64_t h, gpr_clock_type clock_type) {
gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b) {
gpr_timespec sum;
int64_t inc = 0;
GPR_ASSERT(b.clock_type == GPR_TIMESPAN);
CHECK(b.clock_type == GPR_TIMESPAN);
// tv_nsec in a timespan is always +ve. -ve timespan is represented as (-ve
// tv_sec, +ve tv_nsec). For example, timespan = -2.5 seconds is represented
// as {-3, 5e8, GPR_TIMESPAN}
GPR_ASSERT(b.tv_nsec >= 0);
CHECK_GE(b.tv_nsec, 0);
sum.clock_type = a.clock_type;
sum.tv_nsec = a.tv_nsec + b.tv_nsec;
if (sum.tv_nsec >= GPR_NS_PER_SEC) {
@ -177,9 +179,9 @@ gpr_timespec gpr_time_sub(gpr_timespec a, gpr_timespec b) {
// tv_nsec in a timespan is always +ve. -ve timespan is represented as (-ve
// tv_sec, +ve tv_nsec). For example, timespan = -2.5 seconds is represented
// as {-3, 5e8, GPR_TIMESPAN}
GPR_ASSERT(b.tv_nsec >= 0);
CHECK_GE(b.tv_nsec, 0);
} else {
GPR_ASSERT(a.clock_type == b.clock_type);
CHECK(a.clock_type == b.clock_type);
diff.clock_type = GPR_TIMESPAN;
}
diff.tv_nsec = a.tv_nsec - b.tv_nsec;
@ -210,8 +212,8 @@ gpr_timespec gpr_time_sub(gpr_timespec a, gpr_timespec b) {
int gpr_time_similar(gpr_timespec a, gpr_timespec b, gpr_timespec threshold) {
int cmp_ab;
GPR_ASSERT(a.clock_type == b.clock_type);
GPR_ASSERT(threshold.clock_type == GPR_TIMESPAN);
CHECK(a.clock_type == b.clock_type);
CHECK(threshold.clock_type == GPR_TIMESPAN);
cmp_ab = gpr_time_cmp(a, b);
if (cmp_ab == 0) return 1;

@ -23,6 +23,8 @@
#if defined(GPR_WINDOWS) && !defined(GPR_ABSEIL_SYNC) && \
!defined(GPR_CUSTOM_SYNC)
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/time.h>
@ -38,7 +40,7 @@ void gpr_mu_destroy(gpr_mu* mu) { DeleteCriticalSection(&mu->cs); }
void gpr_mu_lock(gpr_mu* mu) {
EnterCriticalSection(&mu->cs);
GPR_ASSERT(!mu->locked);
CHECK(!mu->locked);
mu->locked = 1;
}

@ -26,6 +26,8 @@
#include <process.h>
#include <sys/timeb.h>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/time.h>
@ -97,7 +99,8 @@ void gpr_sleep_until(gpr_timespec until) {
delta = gpr_time_sub(until, now);
sleep_millis =
delta.tv_sec * GPR_MS_PER_SEC + delta.tv_nsec / GPR_NS_PER_MS;
GPR_ASSERT((sleep_millis >= 0) && (sleep_millis <= INT_MAX));
CHECK_GE(sleep_millis, 0);
CHECK_LE(sleep_millis, INT_MAX);
Sleep((DWORD)sleep_millis);
}
}

@ -19,6 +19,8 @@
#include <iterator>
#include <utility>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -86,9 +88,9 @@ class ChunkedVector {
// Remove the last element and return it.
T PopBack() {
GPR_ASSERT(append_ != nullptr);
CHECK_NE(append_, nullptr);
if (append_->count == 0) {
GPR_ASSERT(first_ != append_);
CHECK(first_ != append_);
Chunk* chunk = first_;
while (chunk->next != append_) {
chunk = chunk->next;
@ -234,7 +236,7 @@ class ChunkedVector {
private:
ManualConstructor<T>* AppendSlot() {
if (append_ == nullptr) {
GPR_ASSERT(first_ == nullptr);
CHECK_EQ(first_, nullptr);
first_ = arena_->New<Chunk>();
append_ = first_;
} else if (append_->count == kChunkSize) {

@ -18,6 +18,7 @@
#include <type_traits>
#include "absl/base/config.h"
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -32,7 +33,7 @@ inline To DownCast(From* f) {
// If we have RTTI & we're in debug, assert that the cast is legal.
#if ABSL_INTERNAL_HAS_RTTI
#ifndef NDEBUG
if (f != nullptr) GPR_ASSERT(dynamic_cast<To>(f) != nullptr);
if (f != nullptr) CHECK_NE(dynamic_cast<To>(f), nullptr);
#endif
#endif
return static_cast<To>(f);

@ -20,6 +20,8 @@
#include <atomic>
#include <cstdint>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -92,7 +94,7 @@ class DualRefCounted {
gpr_log(GPR_INFO, "%s:%p unref %d -> %d, weak_ref %d -> %d", trace_, this,
strong_refs, strong_refs - 1, weak_refs, weak_refs + 1);
}
GPR_ASSERT(strong_refs > 0);
CHECK_GT(strong_refs, 0u);
#endif
if (GPR_UNLIKELY(strong_refs == 1)) {
Orphaned();
@ -111,7 +113,7 @@ class DualRefCounted {
trace_, this, location.file(), location.line(), strong_refs,
strong_refs - 1, weak_refs, weak_refs + 1, reason);
}
GPR_ASSERT(strong_refs > 0);
CHECK_GT(strong_refs, 0u);
#else
// Avoid unused-parameter warnings for debug-only parameters
(void)location;
@ -210,7 +212,7 @@ class DualRefCounted {
gpr_log(GPR_INFO, "%s:%p weak_unref %d -> %d (refs=%d)", trace, this,
weak_refs, weak_refs - 1, strong_refs);
}
GPR_ASSERT(weak_refs > 0);
CHECK_GT(weak_refs, 0u);
#endif
if (GPR_UNLIKELY(prev_ref_pair == MakeRefPair(0, 1))) {
delete static_cast<Child*>(this);
@ -233,7 +235,7 @@ class DualRefCounted {
this, location.file(), location.line(), weak_refs, weak_refs - 1,
strong_refs, reason);
}
GPR_ASSERT(weak_refs > 0);
CHECK_GT(weak_refs, 0u);
#else
// Avoid unused-parameter warnings for debug-only parameters
(void)location;
@ -289,7 +291,7 @@ class DualRefCounted {
refs_.fetch_add(MakeRefPair(1, 0), std::memory_order_relaxed);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
GPR_ASSERT(strong_refs != 0);
CHECK_NE(strong_refs, 0u);
if (trace_ != nullptr) {
gpr_log(GPR_INFO, "%s:%p ref %d -> %d; (weak_refs=%d)", trace_, this,
strong_refs, strong_refs + 1, weak_refs);
@ -304,7 +306,7 @@ class DualRefCounted {
refs_.fetch_add(MakeRefPair(1, 0), std::memory_order_relaxed);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
GPR_ASSERT(strong_refs != 0);
CHECK_NE(strong_refs, 0u);
if (trace_ != nullptr) {
gpr_log(GPR_INFO, "%s:%p %s:%d ref %d -> %d (weak_refs=%d) %s", trace_,
this, location.file(), location.line(), strong_refs,

@ -20,6 +20,7 @@
#include <stddef.h>
#include "absl/log/check.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
@ -92,8 +93,10 @@ bool SplitHostPort(absl::string_view name, absl::string_view* host,
bool SplitHostPort(absl::string_view name, std::string* host,
std::string* port) {
GPR_DEBUG_ASSERT(host != nullptr && host->empty());
GPR_DEBUG_ASSERT(port != nullptr && port->empty());
DCHECK(host != nullptr);
DCHECK(host->empty());
DCHECK(port != nullptr);
DCHECK(port->empty());
absl::string_view host_view;
absl::string_view port_view;
bool has_port;

@ -21,6 +21,8 @@
#include <atomic>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -40,8 +42,8 @@ class MultiProducerSingleConsumerQueue {
MultiProducerSingleConsumerQueue() : head_{&stub_}, tail_(&stub_) {}
~MultiProducerSingleConsumerQueue() {
GPR_ASSERT(head_.load(std::memory_order_relaxed) == &stub_);
GPR_ASSERT(tail_ == &stub_);
CHECK(head_.load(std::memory_order_relaxed) == &stub_);
CHECK(tail_ == &stub_);
}
// Push a node

@ -27,6 +27,8 @@
#include <errno.h>
#include <sys/stat.h>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include "src/core/lib/gprpp/stat.h"
@ -35,8 +37,8 @@
namespace grpc_core {
absl::Status GetFileModificationTime(const char* filename, time_t* timestamp) {
GPR_ASSERT(filename != nullptr);
GPR_ASSERT(timestamp != nullptr);
CHECK_NE(filename, nullptr);
CHECK_NE(timestamp, nullptr);
struct stat buf;
if (stat(filename, &buf) != 0) {
std::string error_msg = StrError(errno);

@ -32,6 +32,8 @@
#include <string.h>
#include <unistd.h>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/thd_id.h>
@ -88,7 +90,7 @@ class ThreadInternalsPosix : public internal::ThreadInternalsInterface {
// don't use gpr_malloc as we may cause an infinite recursion with
// the profiling code
thd_arg* info = static_cast<thd_arg*>(malloc(sizeof(*info)));
GPR_ASSERT(info != nullptr);
CHECK_NE(info, nullptr);
info->thread = this;
info->body = thd_body;
info->arg = arg;
@ -99,18 +101,16 @@ class ThreadInternalsPosix : public internal::ThreadInternalsInterface {
Fork::IncThreadCount();
}
GPR_ASSERT(pthread_attr_init(&attr) == 0);
CHECK_EQ(pthread_attr_init(&attr), 0);
if (options.joinable()) {
GPR_ASSERT(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE) ==
0);
CHECK(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE) == 0);
} else {
GPR_ASSERT(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) ==
0);
CHECK(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0);
}
if (options.stack_size() != 0) {
size_t stack_size = MinValidStackSize(options.stack_size());
GPR_ASSERT(pthread_attr_setstacksize(&attr, stack_size) == 0);
CHECK_EQ(pthread_attr_setstacksize(&attr, stack_size), 0);
}
int pthread_create_err = pthread_create(
@ -154,7 +154,7 @@ class ThreadInternalsPosix : public internal::ThreadInternalsInterface {
info);
*success = (pthread_create_err == 0);
GPR_ASSERT(pthread_attr_destroy(&attr) == 0);
CHECK_EQ(pthread_attr_destroy(&attr), 0);
if (!(*success)) {
gpr_log(GPR_ERROR, "pthread_create failed: %s",

@ -23,6 +23,8 @@
#include <cassert>
#include <cinttypes>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -164,7 +166,7 @@ class RefCount {
gpr_log(GPR_INFO, "%s:%p unref %" PRIdPTR " -> %" PRIdPTR, trace, this,
prior, prior - 1);
}
GPR_DEBUG_ASSERT(prior > 0);
DCHECK_GT(prior, 0);
#endif
return prior == 1;
}
@ -182,7 +184,7 @@ class RefCount {
trace, this, location.file(), location.line(), prior, prior - 1,
reason);
}
GPR_DEBUG_ASSERT(prior > 0);
DCHECK_GT(prior, 0);
#else
// Avoid unused-parameter warnings for debug-only parameters
(void)location;

@ -18,6 +18,8 @@
#include <atomic>
#include <memory>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -67,7 +69,7 @@ class SingleSetPtr {
T* operator->() const {
T* p = p_.load(std::memory_order_acquire);
GPR_DEBUG_ASSERT(p != nullptr);
DCHECK_NE(p, nullptr);
return p;
}

@ -22,6 +22,7 @@
#include <utility>
#include "absl/log/check.h"
#include "absl/strings/cord.h"
#include "absl/strings/escaping.h"
#include "absl/strings/match.h"
@ -153,7 +154,7 @@ std::vector<absl::Status> ParseChildren(absl::Cord children) {
while (buf.size() - cur >= sizeof(uint32_t)) {
size_t msg_size = DecodeUInt32FromBytes(buf.data() + cur);
cur += sizeof(uint32_t);
GPR_ASSERT(buf.size() - cur >= msg_size);
CHECK(buf.size() - cur >= msg_size);
google_rpc_Status* msg =
google_rpc_Status_parse(buf.data() + cur, msg_size, arena.ptr());
cur += msg_size;

@ -20,6 +20,7 @@
#define GRPC_SRC_CORE_LIB_GPRPP_SYNC_H
#include "absl/base/thread_annotations.h"
#include "absl/log/check.h"
#include "absl/synchronization/mutex.h"
#include <grpc/support/log.h>
@ -112,7 +113,7 @@ class ABSL_SCOPED_LOCKABLE ReleasableMutexLock {
ReleasableMutexLock& operator=(const ReleasableMutexLock&) = delete;
void Release() ABSL_UNLOCK_FUNCTION() {
GPR_DEBUG_ASSERT(!released_);
DCHECK(!released_);
released_ = true;
mu_->Unlock();
}
@ -178,13 +179,13 @@ class ABSL_SCOPED_LOCKABLE LockableAndReleasableMutexLock {
const LockableAndReleasableMutexLock&) = delete;
void Lock() ABSL_EXCLUSIVE_LOCK_FUNCTION() {
GPR_DEBUG_ASSERT(released_);
DCHECK(released_);
mu_->Lock();
released_ = false;
}
void Release() ABSL_UNLOCK_FUNCTION() {
GPR_DEBUG_ASSERT(!released_);
DCHECK(!released_);
released_ = true;
mu_->Unlock();
}

@ -27,6 +27,7 @@
#include <utility>
#include "absl/functional/any_invocable.h"
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
@ -124,7 +125,7 @@ class Thread {
Thread& operator=(Thread&& other) noexcept {
if (this != &other) {
// TODO(vjpai): if we can be sure that all Thread's are actually
// constructed, then we should assert GPR_ASSERT(impl_ == nullptr) here.
// constructed, then we should assert CHECK(impl_ == nullptr) here.
// However, as long as threads come in structures that are
// allocated via gpr_malloc, this will not be the case, so we cannot
// assert it for the time being.
@ -143,11 +144,11 @@ class Thread {
/// the Join function kills it, or it was detached (non-joinable) and it has
/// run to completion and is now killing itself. The destructor shouldn't have
/// to do anything.
~Thread() { GPR_ASSERT(!options_.joinable() || impl_ == nullptr); }
~Thread() { CHECK(!options_.joinable() || impl_ == nullptr); }
void Start() {
if (impl_ != nullptr) {
GPR_ASSERT(state_ == ALIVE);
CHECK(state_ == ALIVE);
state_ = STARTED;
impl_->Start();
// If the Thread is not joinable, then the impl_ will cause the deletion
@ -156,7 +157,7 @@ class Thread {
// no need to change the value of the impl_ or state_ . The next operation
// on this object will be the deletion, which will trigger the destructor.
} else {
GPR_ASSERT(state_ == FAILED);
CHECK(state_ == FAILED);
}
}
@ -168,7 +169,7 @@ class Thread {
state_ = DONE;
impl_ = nullptr;
} else {
GPR_ASSERT(state_ == FAILED);
CHECK(state_ == FAILED);
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save