grpc 1.71.0 → 1.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +78 -75
- data/include/grpc/event_engine/memory_request.h +3 -3
- data/include/grpc/impl/channel_arg_names.h +70 -50
- data/include/grpc/support/workaround_list.h +1 -4
- data/src/core/{lib/transport → call}/call_arena_allocator.cc +1 -1
- data/src/core/{lib/transport → call}/call_arena_allocator.h +3 -3
- data/src/core/{lib/transport → call}/call_destination.h +4 -4
- data/src/core/{lib/transport → call}/call_filters.cc +2 -2
- data/src/core/{lib/transport → call}/call_filters.h +25 -6
- data/src/core/{lib/channel → call}/call_finalization.h +3 -3
- data/src/core/{lib/transport → call}/call_spine.cc +1 -1
- data/src/core/{lib/transport → call}/call_spine.h +68 -26
- data/src/core/{lib/transport → call}/call_state.cc +1 -1
- data/src/core/{lib/transport → call}/call_state.h +3 -3
- data/src/core/{lib/surface → call}/client_call.cc +9 -7
- data/src/core/{lib/surface → call}/client_call.h +4 -4
- data/src/core/{lib/transport → call}/custom_metadata.h +3 -3
- data/src/core/{lib/transport → call}/interception_chain.cc +5 -5
- data/src/core/{lib/transport → call}/interception_chain.h +7 -7
- data/src/core/{lib/transport → call}/message.cc +1 -1
- data/src/core/{lib/transport → call}/message.h +7 -3
- data/src/core/{lib/transport → call}/metadata.cc +2 -2
- data/src/core/{lib/transport → call}/metadata.h +4 -4
- data/src/core/{lib/transport → call}/metadata_batch.cc +1 -1
- data/src/core/{lib/transport → call}/metadata_batch.h +7 -7
- data/src/core/{lib/transport → call}/metadata_compression_traits.h +3 -3
- data/src/core/{lib/transport → call}/metadata_info.cc +27 -9
- data/src/core/{lib/transport → call}/metadata_info.h +4 -4
- data/src/core/{lib/transport → call}/parsed_metadata.cc +1 -1
- data/src/core/{lib/transport → call}/parsed_metadata.h +3 -3
- data/src/core/call/request_buffer.h +3 -3
- data/src/core/call/security_context.cc +125 -0
- data/src/core/call/security_context.h +114 -0
- data/src/core/{lib/surface → call}/server_call.cc +3 -3
- data/src/core/{lib/surface → call}/server_call.h +5 -5
- data/src/core/{lib/transport → call}/simple_slice_based_metadata.h +4 -4
- data/src/core/{lib/channel → call}/status_util.cc +1 -1
- data/src/core/{lib/channel → call}/status_util.h +3 -3
- data/src/core/client_channel/client_channel.cc +24 -16
- data/src/core/client_channel/client_channel.h +4 -3
- data/src/core/client_channel/client_channel_filter.cc +10 -20
- data/src/core/client_channel/client_channel_filter.h +1 -1
- data/src/core/client_channel/client_channel_internal.h +1 -1
- data/src/core/client_channel/config_selector.h +2 -2
- data/src/core/client_channel/direct_channel.cc +2 -2
- data/src/core/client_channel/dynamic_filters.cc +0 -1
- data/src/core/client_channel/dynamic_filters.h +0 -1
- data/src/core/client_channel/lb_metadata.h +1 -1
- data/src/core/client_channel/load_balanced_call_destination.cc +1 -1
- data/src/core/client_channel/load_balanced_call_destination.h +1 -1
- data/src/core/client_channel/retry_filter_legacy_call_data.cc +43 -41
- data/src/core/client_channel/retry_filter_legacy_call_data.h +6 -6
- data/src/core/client_channel/retry_interceptor.h +1 -1
- data/src/core/client_channel/retry_service_config.cc +1 -1
- data/src/core/client_channel/retry_service_config.h +1 -1
- data/src/core/client_channel/retry_throttle.cc +30 -34
- data/src/core/client_channel/retry_throttle.h +10 -2
- data/src/core/client_channel/subchannel.cc +7 -8
- data/src/core/client_channel/subchannel.h +1 -2
- data/src/core/client_channel/subchannel_stream_client.cc +14 -11
- data/src/core/client_channel/subchannel_stream_client.h +2 -2
- data/src/core/config/core_configuration.h +2 -2
- data/src/core/credentials/call/call_credentials.h +157 -0
- data/src/core/{lib/security/credentials → credentials/call}/call_creds_util.cc +4 -4
- data/src/core/{lib/security/credentials → credentials/call}/call_creds_util.h +4 -4
- data/src/core/{lib/security/credentials/composite/composite_credentials.cc → credentials/call/composite/composite_call_credentials.cc} +4 -57
- data/src/core/credentials/call/composite/composite_call_credentials.h +82 -0
- data/src/core/{lib/security/credentials → credentials/call}/external/aws_external_account_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/call}/external/aws_external_account_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/call}/external/aws_request_signer.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/call}/external/aws_request_signer.h +3 -3
- data/src/core/{lib/security/credentials → credentials/call}/external/external_account_credentials.cc +6 -6
- data/src/core/{lib/security/credentials → credentials/call}/external/external_account_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/call}/external/file_external_account_credentials.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/call}/external/file_external_account_credentials.h +4 -4
- data/src/core/{lib/security/credentials → credentials/call}/external/url_external_account_credentials.cc +3 -2
- data/src/core/{lib/security/credentials → credentials/call}/external/url_external_account_credentials.h +4 -4
- data/src/core/{lib/security/credentials → credentials/call}/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +3 -2
- data/src/core/{lib/security/credentials → credentials/call}/gcp_service_account_identity/gcp_service_account_identity_credentials.h +6 -6
- data/src/core/{lib/security/credentials → credentials/call}/iam/iam_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/call}/iam/iam_credentials.h +4 -4
- data/src/core/{lib/security/util → credentials/call}/json_util.cc +1 -1
- data/src/core/{lib/security/util → credentials/call}/json_util.h +3 -3
- data/src/core/{lib/security/credentials → credentials/call}/jwt/json_token.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/call}/jwt/json_token.h +3 -3
- data/src/core/{lib/security/credentials → credentials/call}/jwt/jwt_credentials.cc +3 -3
- data/src/core/{lib/security/credentials → credentials/call}/jwt/jwt_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/call}/jwt/jwt_verifier.cc +3 -2
- data/src/core/{lib/security/credentials → credentials/call}/jwt/jwt_verifier.h +3 -3
- data/src/core/{lib/security/credentials → credentials/call}/oauth2/oauth2_credentials.cc +4 -3
- data/src/core/{lib/security/credentials → credentials/call}/oauth2/oauth2_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/call}/plugin/plugin_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/call}/plugin/plugin_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/call}/token_fetcher/token_fetcher_credentials.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/call}/token_fetcher/token_fetcher_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/transport}/alts/alts_credentials.cc +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/alts/alts_credentials.h +5 -5
- data/src/core/{lib/security/security_connector → credentials/transport}/alts/alts_security_connector.cc +4 -4
- data/src/core/{lib/security/security_connector → credentials/transport}/alts/alts_security_connector.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/alts/check_gcp_environment.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/check_gcp_environment.h +3 -3
- data/src/core/{lib/security/credentials → credentials/transport}/alts/check_gcp_environment_linux.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/check_gcp_environment_no_op.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/check_gcp_environment_windows.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/grpc_alts_credentials_client_options.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/grpc_alts_credentials_options.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/grpc_alts_credentials_options.h +3 -3
- data/src/core/{lib/security/credentials → credentials/transport}/alts/grpc_alts_credentials_server_options.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/channel_creds_registry.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/channel_creds_registry_init.cc +21 -17
- data/src/core/credentials/transport/composite/composite_channel_credentials.cc +68 -0
- data/src/core/{lib/security/credentials/composite/composite_credentials.h → credentials/transport/composite/composite_channel_credentials.h} +6 -51
- data/src/core/{lib/security/credentials → credentials/transport}/fake/fake_credentials.cc +4 -26
- data/src/core/{lib/security/credentials → credentials/transport}/fake/fake_credentials.h +5 -37
- data/src/core/{lib/security/security_connector → credentials/transport}/fake/fake_security_connector.cc +4 -4
- data/src/core/{lib/security/security_connector → credentials/transport}/fake/fake_security_connector.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/google_default/credentials_generic.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/google_default/google_default_credentials.cc +31 -19
- data/src/core/{lib/security/credentials → credentials/transport}/google_default/google_default_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/transport}/insecure/insecure_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/insecure/insecure_credentials.h +5 -5
- data/src/core/{lib/security/security_connector → credentials/transport}/insecure/insecure_security_connector.cc +2 -2
- data/src/core/{lib/security/security_connector → credentials/transport}/insecure/insecure_security_connector.h +5 -5
- data/src/core/{lib/security/credentials → credentials/transport}/local/local_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/local/local_credentials.h +5 -5
- data/src/core/{lib/security/security_connector → credentials/transport}/local/local_security_connector.cc +4 -4
- data/src/core/{lib/security/security_connector → credentials/transport}/local/local_security_connector.h +4 -4
- data/src/core/{lib/security/security_connector → credentials/transport}/security_connector.cc +2 -2
- data/src/core/{lib/security/security_connector → credentials/transport}/security_connector.h +3 -3
- data/src/core/{lib/security/credentials → credentials/transport}/ssl/ssl_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/ssl/ssl_credentials.h +6 -6
- data/src/core/{lib/security/security_connector → credentials/transport}/ssl/ssl_security_connector.cc +5 -5
- data/src/core/{lib/security/security_connector → credentials/transport}/ssl/ssl_security_connector.h +4 -4
- data/src/core/{lib/security/certificate_provider → credentials/transport/tls}/certificate_provider_factory.h +3 -3
- data/src/core/{lib/security/certificate_provider → credentials/transport/tls}/certificate_provider_registry.cc +1 -1
- data/src/core/{lib/security/certificate_provider → credentials/transport/tls}/certificate_provider_registry.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_distributor.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_distributor.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_match.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_provider.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_provider.h +5 -5
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_verifier.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_verifier.h +3 -3
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_credentials_options.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_credentials_options.h +7 -7
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_crl_provider.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_crl_provider.h +3 -3
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/load_system_roots.h +3 -3
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/load_system_roots_fallback.cc +1 -1
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/load_system_roots_supported.cc +2 -2
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/load_system_roots_supported.h +3 -3
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/load_system_roots_windows.cc +1 -1
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/ssl_utils.cc +3 -3
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/ssl_utils.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/tls/tls_credentials.cc +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/tls/tls_credentials.h +5 -5
- data/src/core/{lib/security/security_connector → credentials/transport}/tls/tls_security_connector.cc +6 -6
- data/src/core/{lib/security/security_connector → credentials/transport}/tls/tls_security_connector.h +6 -6
- data/src/core/{lib/security/credentials → credentials/transport}/tls/tls_utils.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/tls/tls_utils.h +3 -3
- data/src/core/{lib/security/credentials/credentials.cc → credentials/transport/transport_credentials.cc} +1 -3
- data/src/core/{lib/security/credentials/credentials.h → credentials/transport/transport_credentials.h} +5 -121
- data/src/core/{lib/security/credentials → credentials/transport}/xds/xds_credentials.cc +5 -5
- data/src/core/{lib/security/credentials → credentials/transport}/xds/xds_credentials.h +6 -6
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +1 -1
- data/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +8 -5
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +2 -2
- data/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc +1 -1
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +2 -2
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +1 -1
- data/src/core/ext/filters/http/client/http_client_filter.h +1 -1
- data/src/core/ext/filters/http/client_authority_filter.cc +2 -2
- data/src/core/ext/filters/http/message_compress/compression_filter.cc +1 -1
- data/src/core/ext/filters/http/message_compress/compression_filter.h +1 -1
- data/src/core/ext/filters/http/server/http_server_filter.cc +1 -1
- data/src/core/ext/filters/message_size/message_size_filter.cc +1 -1
- data/src/core/ext/filters/rbac/rbac_filter.cc +2 -2
- data/src/core/ext/filters/stateful_session/stateful_session_filter.cc +1 -1
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +3 -3
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +8 -5
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +5 -1
- data/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h +1 -3
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +58 -57
- data/src/core/ext/transport/chttp2/transport/context_list_entry.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame.cc +89 -68
- data/src/core/ext/transport/chttp2/transport/frame.h +37 -1
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +6 -3
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +4 -2
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +2 -2
- data/src/core/ext/transport/chttp2/transport/hpack_parse_result.h +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +2 -2
- data/src/core/ext/transport/chttp2/transport/http2_settings.cc +10 -8
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +2 -2
- data/src/core/ext/transport/chttp2/transport/http2_status.h +52 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +11 -14
- data/src/core/ext/transport/chttp2/transport/parsing.cc +36 -23
- data/src/core/ext/transport/chttp2/transport/writing.cc +15 -14
- data/src/core/ext/transport/inproc/inproc_transport.cc +1 -1
- data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +1 -1
- data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb.h +65 -65
- data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb_minitable.c +28 -28
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump_shared.upb.h +14 -14
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump_shared.upb_minitable.c +6 -6
- data/src/core/ext/upb-gen/envoy/admin/v3/metrics.upb.h +6 -6
- data/src/core/ext/upb-gen/envoy/admin/v3/metrics.upb_minitable.c +4 -4
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb.h +133 -133
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb_minitable.c +71 -71
- data/src/core/ext/upb-gen/envoy/config/accesslog/v3/accesslog.upb.h +26 -26
- data/src/core/ext/upb-gen/envoy/config/accesslog/v3/accesslog.upb_minitable.c +7 -7
- data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb.h +216 -218
- data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.c +66 -66
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb.h +27 -27
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb_minitable.c +9 -9
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb.h +326 -328
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.c +103 -103
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb.h +58 -58
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb_minitable.c +14 -14
- data/src/core/ext/upb-gen/envoy/config/common/matcher/v3/matcher.upb.h +22 -24
- data/src/core/ext/upb-gen/envoy/config/common/matcher/v3/matcher.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb.h +29 -29
- data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb_minitable.c +16 -16
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb.h +186 -192
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.c +54 -54
- data/src/core/ext/upb-gen/envoy/config/core/v3/config_source.upb.h +54 -54
- data/src/core/ext/upb-gen/envoy/config/core/v3/config_source.upb_minitable.c +21 -21
- data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_service.upb.h +59 -61
- data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_service.upb_minitable.c +15 -15
- data/src/core/ext/upb-gen/envoy/config/core/v3/health_check.upb.h +100 -100
- data/src/core/ext/upb-gen/envoy/config/core/v3/health_check.upb_minitable.c +34 -34
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_uri.upb.h +12 -12
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_uri.upb_minitable.c +5 -5
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb.h +118 -118
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c +39 -39
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb.h +19 -19
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.c +9 -9
- data/src/core/ext/upb-gen/envoy/config/core/v3/substitution_format_string.upb.h +27 -27
- data/src/core/ext/upb-gen/envoy/config/core/v3/substitution_format_string.upb_minitable.c +10 -10
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint.upb.h +12 -14
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb.h +41 -41
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb_minitable.c +16 -16
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/load_report.upb.h +24 -24
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/load_report.upb_minitable.c +9 -9
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb.h +139 -139
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.c +46 -46
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb.h +61 -61
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb_minitable.c +20 -20
- data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb.h +3 -3
- data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb_minitable.c +1 -1
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/metrics_service.upb.h +6 -6
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/metrics_service.upb_minitable.c +4 -4
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb.h +33 -33
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb_minitable.c +14 -14
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb.h +12 -14
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/config/route/v3/route.upb.h +52 -54
- data/src/core/ext/upb-gen/envoy/config/route/v3/route.upb_minitable.c +10 -10
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb.h +620 -626
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c +215 -215
- data/src/core/ext/upb-gen/envoy/config/route/v3/scoped_route.upb.h +13 -13
- data/src/core/ext/upb-gen/envoy/config/route/v3/scoped_route.upb_minitable.c +4 -4
- data/src/core/ext/upb-gen/envoy/config/tap/v3/common.upb.h +3 -3
- data/src/core/ext/upb-gen/envoy/config/tap/v3/common.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb.h +7 -7
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/envoy/config/trace/v3/skywalking.upb.h +15 -15
- data/src/core/ext/upb-gen/envoy/config/trace/v3/skywalking.upb_minitable.c +7 -7
- data/src/core/ext/upb-gen/envoy/config/trace/v3/xray.upb.h +7 -7
- data/src/core/ext/upb-gen/envoy/config/trace/v3/xray.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb.h +16 -16
- data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb_minitable.c +10 -10
- data/src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb.h +306 -312
- data/src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb_minitable.c +96 -96
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb.h +61 -61
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb_minitable.c +27 -27
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb.h +19 -19
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb_minitable.c +6 -6
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/rbac/v3/rbac.upb.h +25 -25
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/rbac/v3/rbac.upb_minitable.c +9 -9
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb.h +34 -34
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb_minitable.c +9 -9
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h +3 -3
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +294 -294
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.c +105 -105
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb.h +3 -3
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.c +1 -1
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.h +23 -23
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb_minitable.c +8 -8
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb.h +84 -84
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb_minitable.c +28 -28
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +87 -87
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb_minitable.c +31 -31
- data/src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb.h +24 -24
- data/src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb_minitable.c +5 -5
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb.h +130 -132
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb_minitable.c +43 -43
- data/src/core/ext/upb-gen/envoy/service/load_stats/v3/lrs.upb.h +6 -6
- data/src/core/ext/upb-gen/envoy/service/load_stats/v3/lrs.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/service/status/v3/csds.upb.h +60 -60
- data/src/core/ext/upb-gen/envoy/service/status/v3/csds.upb_minitable.c +26 -26
- data/src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb.h +7 -7
- data/src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/metadata.upb.h +6 -6
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/metadata.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/regex.upb.h +7 -7
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/regex.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/envoy/type/tracing/v3/custom_tag.upb.h +11 -11
- data/src/core/ext/upb-gen/envoy/type/tracing/v3/custom_tag.upb_minitable.c +4 -4
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/checked.upb.h +85 -89
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/checked.upb_minitable.c +20 -20
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/syntax.upb.h +80 -83
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/syntax.upb_minitable.c +27 -27
- data/src/core/ext/upb-gen/google/api/http.upb.h +51 -51
- data/src/core/ext/upb-gen/google/api/http.upb_minitable.c +22 -22
- data/src/core/ext/upb-gen/google/protobuf/descriptor.upb.h +327 -301
- data/src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.c +97 -85
- data/src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.h +1 -0
- data/src/core/ext/upb-gen/google/protobuf/struct.upb.h +9 -11
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb.h +9 -10
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb.h +110 -113
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c +25 -25
- data/src/core/ext/upb-gen/src/proto/grpc/lb/v1/load_balancer.upb.h +6 -6
- data/src/core/ext/upb-gen/src/proto/grpc/lb/v1/load_balancer.upb_minitable.c +4 -4
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls.upb.h +21 -22
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls_config.upb.h +70 -72
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls_config.upb_minitable.c +17 -17
- data/src/core/ext/upb-gen/validate/validate.upb.h +368 -368
- data/src/core/ext/upb-gen/validate/validate.upb_minitable.c +117 -117
- data/src/core/ext/upb-gen/xds/core/v3/context_params.upb.h +9 -10
- data/src/core/ext/upb-gen/xds/core/v3/resource.upb.h +7 -7
- data/src/core/ext/upb-gen/xds/core/v3/resource.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/xds/core/v3/resource_locator.upb.h +12 -12
- data/src/core/ext/upb-gen/xds/core/v3/resource_locator.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb.h +27 -30
- data/src/core/ext/upb-gen/xds/type/matcher/v3/cel.upb.h +7 -7
- data/src/core/ext/upb-gen/xds/type/matcher/v3/cel.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/xds/type/matcher/v3/ip.upb.h +3 -3
- data/src/core/ext/upb-gen/xds/type/matcher/v3/ip.upb_minitable.c +1 -1
- data/src/core/ext/upb-gen/xds/type/matcher/v3/matcher.upb.h +22 -24
- data/src/core/ext/upb-gen/xds/type/matcher/v3/matcher.upb_minitable.c +3 -3
- data/src/core/ext/upbdefs-gen/google/protobuf/descriptor.upbdefs.c +98 -87
- data/src/core/{lib/security/transport → filter/auth}/auth_filters.h +8 -7
- data/src/core/{lib/security/transport → filter/auth}/client_auth_filter.cc +7 -6
- data/src/core/{lib/security/transport → filter/auth}/server_auth_filter.cc +5 -4
- data/src/core/handshaker/handshaker.cc +0 -8
- data/src/core/handshaker/security/security_handshaker.cc +1 -1
- data/src/core/handshaker/security/security_handshaker.h +1 -1
- data/src/core/lib/channel/channel_args.h +49 -30
- data/src/core/lib/channel/channel_stack.h +1 -2
- data/src/core/lib/channel/channel_stack_builder_impl.cc +1 -1
- data/src/core/lib/channel/connected_channel.cc +2 -2
- data/src/core/lib/channel/promise_based_filter.h +3 -3
- data/src/core/lib/debug/trace_flags.cc +2 -4
- data/src/core/lib/debug/trace_flags.h +1 -2
- data/src/core/lib/event_engine/default_event_engine_factory.cc +6 -6
- data/src/core/lib/event_engine/default_event_engine_factory.h +1 -1
- data/src/core/lib/event_engine/extensions/iomgr_compatible.h +39 -0
- data/src/core/lib/event_engine/extensions/supports_win_sockets.h +48 -0
- data/src/core/lib/event_engine/extensions/tcp_trace.h +1 -1
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +0 -2
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +1 -3
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +26 -0
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +4 -0
- data/src/core/lib/event_engine/posix_engine/set_socket_dualstack.cc +64 -0
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +0 -11
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc +10 -2
- data/src/core/lib/event_engine/shim.cc +9 -16
- data/src/core/lib/event_engine/shim.h +11 -0
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +15 -7
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h +2 -1
- data/src/core/lib/event_engine/windows/win_socket.cc +11 -0
- data/src/core/lib/event_engine/windows/win_socket.h +3 -0
- data/src/core/lib/event_engine/windows/windows_endpoint.cc +5 -10
- data/src/core/lib/event_engine/windows/windows_engine.cc +42 -0
- data/src/core/lib/event_engine/windows/windows_engine.h +8 -2
- data/src/core/lib/event_engine/windows/windows_listener.cc +5 -6
- data/src/core/lib/event_engine/windows/windows_listener.h +9 -4
- data/src/core/lib/experiments/experiments.cc +174 -21
- data/src/core/lib/experiments/experiments.h +70 -13
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +43 -16
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +43 -8
- data/src/core/lib/iomgr/error.cc +27 -43
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +13 -1
- data/src/core/lib/iomgr/ev_poll_posix.cc +13 -0
- data/src/core/lib/iomgr/polling_entity.cc +2 -7
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +1 -0
- data/src/core/lib/iomgr/socket_utils_posix.cc +22 -11
- data/src/core/lib/iomgr/socket_utils_posix.h +12 -2
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +8 -9
- data/src/core/lib/iomgr/tcp_client_posix.cc +11 -15
- data/src/core/lib/iomgr/tcp_client_posix.h +1 -1
- data/src/core/lib/iomgr/tcp_posix.cc +58 -31
- data/src/core/lib/iomgr/tcp_posix.h +10 -2
- data/src/core/lib/iomgr/tcp_server_posix.cc +9 -1
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +1 -4
- data/src/core/lib/iomgr/tcp_server_windows.cc +27 -16
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +10 -2
- data/src/core/lib/promise/all_ok.h +31 -0
- data/src/core/lib/promise/loop.h +8 -5
- data/src/core/lib/promise/map.h +65 -2
- data/src/core/lib/promise/party.h +5 -1
- data/src/core/lib/promise/poll.h +22 -20
- data/src/core/lib/promise/promise.h +2 -2
- data/src/core/lib/promise/status_flag.h +23 -11
- data/src/core/lib/security/authorization/evaluate_args.cc +1 -1
- data/src/core/lib/security/authorization/evaluate_args.h +1 -1
- data/src/core/lib/security/authorization/grpc_server_authz_filter.cc +1 -1
- data/src/core/lib/security/authorization/grpc_server_authz_filter.h +1 -1
- data/src/core/lib/slice/slice.h +6 -0
- data/src/core/lib/surface/call.cc +20 -18
- data/src/core/lib/surface/call_utils.cc +3 -3
- data/src/core/lib/surface/call_utils.h +3 -3
- data/src/core/lib/surface/channel.h +2 -2
- data/src/core/lib/surface/channel_init.h +2 -2
- data/src/core/lib/surface/completion_queue.cc +77 -17
- data/src/core/lib/surface/filter_stack_call.cc +40 -27
- data/src/core/lib/surface/filter_stack_call.h +1 -1
- data/src/core/lib/surface/init.cc +2 -3
- data/src/core/lib/surface/lame_client.cc +1 -1
- data/src/core/lib/surface/legacy_channel.cc +27 -23
- data/src/core/lib/surface/legacy_channel.h +1 -1
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/error_utils.cc +65 -11
- data/src/core/lib/transport/error_utils.h +2 -2
- data/src/core/lib/transport/status_conversion.cc +16 -14
- data/src/core/lib/transport/status_conversion.h +5 -4
- data/src/core/lib/transport/transport.h +5 -5
- data/src/core/lib/transport/transport_op_string.cc +1 -1
- data/src/core/load_balancing/delegating_helper.h +1 -1
- data/src/core/load_balancing/grpclb/client_load_reporting_filter.cc +1 -1
- data/src/core/load_balancing/grpclb/grpclb.cc +1 -2
- data/src/core/load_balancing/pick_first/pick_first.cc +0 -955
- data/src/core/load_balancing/rls/rls.cc +31 -37
- data/src/core/load_balancing/weighted_target/weighted_target.cc +1 -1
- data/src/core/load_balancing/xds/cds.cc +3 -10
- data/src/core/load_balancing/xds/xds_cluster_impl.cc +1 -1
- data/src/core/plugin_registry/grpc_plugin_registry.cc +2 -0
- data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +0 -2
- data/src/core/resolver/dns/c_ares/dns_resolver_ares.cc +1 -3
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h +4 -0
- data/src/core/resolver/google_c2p/google_c2p_resolver.cc +1 -1
- data/src/core/resolver/xds/xds_dependency_manager.cc +8 -3
- data/src/core/resolver/xds/xds_resolver.cc +2 -2
- data/src/core/server/server.cc +7 -4
- data/src/core/server/server.h +1 -1
- data/src/core/server/server_call_tracer_filter.cc +1 -1
- data/src/core/server/server_config_selector.h +1 -1
- data/src/core/server/server_config_selector_filter.cc +1 -1
- data/src/core/server/xds_server_config_fetcher.cc +5 -5
- data/src/core/service_config/service_config_channel_arg_filter.cc +1 -1
- data/src/core/telemetry/call_tracer.cc +2 -4
- data/src/core/telemetry/call_tracer.h +3 -3
- data/src/core/telemetry/metrics.cc +30 -12
- data/src/core/telemetry/metrics.h +15 -3
- data/src/core/telemetry/stats_data.cc +75 -2
- data/src/core/telemetry/stats_data.h +46 -4
- data/src/core/telemetry/tcp_tracer.h +90 -84
- data/src/core/{lib/security/context/security_context.cc → transport/auth_context.cc} +1 -96
- data/src/core/{lib/security/context/security_context.h → transport/auth_context.h} +6 -76
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +1 -1
- data/src/core/tsi/ssl_transport_security.cc +1 -1
- data/src/core/util/check_class_size.h +48 -0
- data/src/core/util/gcp_metadata_query.cc +1 -1
- data/src/core/util/http_client/httpcli.cc +3 -3
- data/src/core/util/http_client/httpcli_security_connector.cc +3 -3
- data/src/core/util/load_file.cc +26 -14
- data/src/core/util/status_helper.cc +86 -63
- data/src/core/util/status_helper.h +9 -26
- data/src/core/xds/grpc/certificate_provider_store.cc +1 -1
- data/src/core/xds/grpc/certificate_provider_store.h +3 -3
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +3 -3
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.h +1 -1
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +10 -7
- data/src/core/xds/grpc/xds_certificate_provider.cc +1 -1
- data/src/core/xds/grpc/xds_certificate_provider.h +2 -2
- data/src/core/xds/grpc/xds_client_grpc.cc +7 -6
- data/src/core/xds/grpc/xds_client_grpc.h +4 -2
- data/src/core/xds/grpc/xds_cluster.h +3 -3
- data/src/core/xds/grpc/xds_cluster_parser.cc +3 -2
- data/src/core/xds/grpc/xds_http_fault_filter.cc +1 -1
- data/src/core/xds/grpc/xds_http_filter.h +1 -1
- data/src/core/xds/grpc/xds_http_filter_registry.h +1 -1
- data/src/core/xds/grpc/xds_route_config.h +1 -1
- data/src/core/xds/grpc/xds_route_config_parser.cc +1 -1
- data/src/core/xds/grpc/xds_route_config_parser.h +1 -1
- data/src/core/xds/grpc/xds_routing.h +1 -1
- data/src/core/xds/grpc/xds_server_grpc.cc +60 -48
- data/src/core/xds/grpc/xds_server_grpc.h +23 -13
- data/src/core/xds/grpc/xds_server_grpc_interface.h +2 -2
- data/src/core/xds/grpc/xds_transport_grpc.cc +5 -5
- data/src/core/xds/grpc/xds_transport_grpc.h +5 -3
- data/src/core/xds/xds_client/lrs_client.cc +6 -5
- data/src/core/xds/xds_client/lrs_client.h +7 -7
- data/src/core/xds/xds_client/xds_bootstrap.h +16 -1
- data/src/core/xds/xds_client/xds_client.cc +25 -23
- data/src/core/xds/xds_client/xds_client.h +3 -1
- data/src/core/xds/xds_client/xds_resource_type.h +1 -2
- data/src/core/xds/xds_client/xds_transport.h +1 -1
- data/src/ruby/ext/grpc/extconf.rb +1 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_apple.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_fuchsia.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_linux.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_openbsd.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_sysreg.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_win.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_arm_freebsd.cc +0 -1
- data/third_party/boringssl-with-bazel/src/crypto/cpu_arm_linux.cc +0 -1
- data/third_party/boringssl-with-bazel/src/crypto/crypto.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +20 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +3 -25
- data/third_party/boringssl-with-bazel/src/ssl/extensions.cc +3 -7
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +1 -1
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +1 -1
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +13 -6
- data/third_party/boringssl-with-bazel/src/ssl/ssl_credential.cc +2 -1
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +1 -1
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +1 -1
- data/third_party/upb/upb/base/internal/log2.h +3 -1
- data/third_party/upb/upb/base/string_view.h +10 -0
- data/third_party/upb/upb/hash/common.c +5 -1
- data/third_party/upb/upb/json/decode.c +2 -2
- data/third_party/upb/upb/json/decode.h +0 -1
- data/third_party/upb/upb/mem/alloc.h +5 -0
- data/third_party/upb/upb/mem/arena.c +296 -142
- data/third_party/upb/upb/mem/arena.h +47 -11
- data/third_party/upb/upb/mem/arena.hpp +4 -20
- data/third_party/upb/upb/mem/internal/arena.h +4 -6
- data/third_party/upb/upb/message/accessors.h +41 -0
- data/third_party/upb/upb/message/compat.c +11 -14
- data/third_party/upb/upb/message/compat.h +4 -3
- data/third_party/upb/upb/message/copy.c +35 -30
- data/third_party/upb/upb/message/internal/accessors.h +139 -10
- data/third_party/upb/upb/message/internal/extension.c +28 -25
- data/third_party/upb/upb/message/internal/extension.h +21 -5
- data/third_party/upb/upb/message/internal/iterator.c +58 -0
- data/third_party/upb/upb/message/internal/iterator.h +29 -0
- data/third_party/upb/upb/message/internal/map.h +2 -3
- data/third_party/upb/upb/message/internal/map_sorter.h +3 -2
- data/third_party/upb/upb/message/internal/message.c +48 -29
- data/third_party/upb/upb/message/internal/message.h +154 -24
- data/third_party/upb/upb/message/map_sorter.c +20 -8
- data/third_party/upb/upb/message/message.c +90 -38
- data/third_party/upb/upb/message/message.h +58 -2
- data/third_party/upb/upb/message/value.h +9 -0
- data/third_party/upb/upb/mini_descriptor/build_enum.c +1 -1
- data/third_party/upb/upb/mini_descriptor/decode.c +97 -136
- data/third_party/upb/upb/mini_descriptor/decode.h +4 -3
- data/third_party/upb/upb/mini_descriptor/internal/encode.hpp +1 -1
- data/third_party/upb/upb/mini_table/extension_registry.c +24 -12
- data/third_party/upb/upb/mini_table/extension_registry.h +13 -6
- data/third_party/upb/upb/mini_table/message.c +21 -13
- data/third_party/upb/upb/port/atomic.h +134 -7
- data/third_party/upb/upb/port/def.inc +140 -38
- data/third_party/upb/upb/port/undef.inc +11 -1
- data/third_party/upb/upb/reflection/def.hpp +5 -1
- data/third_party/upb/upb/reflection/def_pool.c +10 -3
- data/third_party/upb/upb/reflection/descriptor_bootstrap.h +1 -1
- data/third_party/upb/upb/reflection/file_def.c +12 -5
- data/third_party/upb/upb/reflection/internal/def_builder.c +1 -1
- data/third_party/upb/upb/reflection/internal/upb_edition_defaults.h +1 -1
- data/third_party/upb/upb/reflection/message.c +19 -16
- data/third_party/upb/upb/reflection/message.h +3 -1
- data/third_party/upb/upb/text/encode.c +1 -13
- data/third_party/upb/upb/text/internal/encode.c +25 -6
- data/third_party/upb/upb/text/internal/encode.h +4 -0
- data/third_party/upb/upb/wire/decode.c +60 -45
- data/third_party/upb/upb/wire/decode.h +4 -2
- data/third_party/upb/upb/wire/encode.c +77 -42
- data/third_party/upb/upb/wire/encode.h +2 -0
- data/third_party/upb/upb/wire/eps_copy_input_stream.h +18 -20
- data/third_party/upb/upb/wire/internal/decoder.h +4 -11
- data/third_party/utf8_range/utf8_range.c +15 -275
- data/third_party/utf8_range/utf8_range_neon.inc +117 -0
- data/third_party/utf8_range/utf8_range_sse.inc +272 -0
- data/third_party/zlib/deflate.c +40 -15
- data/third_party/zlib/deflate.h +33 -2
- data/third_party/zlib/gzguts.h +2 -6
- data/third_party/zlib/inflate.c +1 -1
- data/third_party/zlib/inftrees.c +3 -3
- data/third_party/zlib/inftrees.h +2 -2
- data/third_party/zlib/trees.c +18 -4
- data/third_party/zlib/zconf.h +1 -9
- data/third_party/zlib/zlib.h +12 -12
- data/third_party/zlib/zutil.h +4 -25
- metadata +155 -145
- data/include/grpc/grpc_cronet.h +0 -37
- data/src/core/lib/transport/http2_errors.h +0 -43
- data/third_party/upb/upb/message/internal/compare_unknown.c +0 -289
- data/third_party/upb/upb/message/internal/compare_unknown.h +0 -49
@@ -9,12 +9,14 @@
|
|
9
9
|
|
10
10
|
#undef UPB_SIZE
|
11
11
|
#undef UPB_PTR_AT
|
12
|
+
#undef UPB_SIZEOF_FLEX
|
12
13
|
#undef UPB_MAPTYPE_STRING
|
13
14
|
#undef UPB_EXPORT
|
14
15
|
#undef UPB_INLINE
|
15
16
|
#undef UPB_API
|
16
17
|
#undef UPBC_API
|
17
18
|
#undef UPB_API_INLINE
|
19
|
+
#undef UPB_API_INLINE_IF_NOT_GCC
|
18
20
|
#undef UPB_ALIGN_UP
|
19
21
|
#undef UPB_ALIGN_DOWN
|
20
22
|
#undef UPB_ALIGN_MALLOC
|
@@ -23,6 +25,7 @@
|
|
23
25
|
#undef UPB_MALLOC_ALIGN
|
24
26
|
#undef UPB_LIKELY
|
25
27
|
#undef UPB_UNLIKELY
|
28
|
+
#undef UPB_UNPREDICTABLE
|
26
29
|
#undef UPB_FORCEINLINE
|
27
30
|
#undef UPB_NOINLINE
|
28
31
|
#undef UPB_NORETURN
|
@@ -33,6 +36,7 @@
|
|
33
36
|
#undef UPB_ASSUME
|
34
37
|
#undef UPB_ASSERT
|
35
38
|
#undef UPB_UNREACHABLE
|
39
|
+
#undef UPB_DEFAULT_MAX_BLOCK_SIZE
|
36
40
|
#undef UPB_SETJMP
|
37
41
|
#undef UPB_LONGJMP
|
38
42
|
#undef UPB_PTRADD
|
@@ -46,6 +50,12 @@
|
|
46
50
|
#undef UPB_ASAN
|
47
51
|
#undef UPB_ASAN_GUARD_SIZE
|
48
52
|
#undef UPB_CLANG_ASAN
|
53
|
+
#undef UPB_TSAN_PUBLISHED_MEMBER
|
54
|
+
#undef UPB_TSAN_INIT_PUBLISHED
|
55
|
+
#undef UPB_TSAN_CHECK_PUBLISHED
|
56
|
+
#undef UPB_TSAN_PUBLISH
|
57
|
+
#undef UPB_TSAN_CHECK_READ
|
58
|
+
#undef UPB_TSAN_CHECK_WRITE
|
49
59
|
#undef UPB_TREAT_CLOSED_ENUMS_LIKE_OPEN
|
50
60
|
#undef UPB_DEPRECATED
|
51
61
|
#undef UPB_GNUC_MIN
|
@@ -55,6 +65,7 @@
|
|
55
65
|
#undef UPB_IS_GOOGLE3
|
56
66
|
#undef UPB_ATOMIC
|
57
67
|
#undef UPB_USE_C11_ATOMICS
|
68
|
+
#undef UPB_USE_MSC_ATOMICS
|
58
69
|
#undef UPB_PRIVATE
|
59
70
|
#undef UPB_ONLYBITS
|
60
71
|
#undef UPB_LINKARR_DECLARE
|
@@ -62,4 +73,3 @@
|
|
62
73
|
#undef UPB_LINKARR_START
|
63
74
|
#undef UPB_LINKARR_STOP
|
64
75
|
#undef UPB_FUTURE_BREAKING_CHANGES
|
65
|
-
#undef UPB_FUTURE_PYTHON_CLOSED_ENUM_ENFORCEMENT
|
@@ -93,9 +93,13 @@ class FieldDefPtr {
|
|
93
93
|
// whatever message this field belongs to. Guaranteed to be less than
|
94
94
|
// f->containing_type()->field_count(). May only be accessed once the def has
|
95
95
|
// been finalized.
|
96
|
+
// The index ordering here is *dependent* on the order of the fields in the
|
97
|
+
// .proto file.
|
96
98
|
uint32_t index() const { return upb_FieldDef_Index(ptr_); }
|
97
99
|
|
98
|
-
// Index into msgdef->layout->fields or file->exts
|
100
|
+
// Index into msgdef->layout->fields or file->exts.
|
101
|
+
// This is the index that the MiniTable uses, and is independent of the order
|
102
|
+
// of the fields in the .proto file.
|
99
103
|
uint32_t layout_index() const { return upb_FieldDef_LayoutIndex(ptr_); }
|
100
104
|
|
101
105
|
// The MessageDef to which this field belongs (for extensions, the extended
|
@@ -12,6 +12,7 @@
|
|
12
12
|
#include "upb/hash/str_table.h"
|
13
13
|
#include "upb/mem/alloc.h"
|
14
14
|
#include "upb/mem/arena.h"
|
15
|
+
#include "upb/reflection/def.h"
|
15
16
|
#include "upb/reflection/def_type.h"
|
16
17
|
#include "upb/reflection/file_def.h"
|
17
18
|
#include "upb/reflection/internal/def_builder.h"
|
@@ -236,9 +237,15 @@ const upb_FieldDef* upb_DefPool_FindExtensionByNameWithSize(
|
|
236
237
|
return _upb_DefType_Unpack(v, UPB_DEFTYPE_FIELD);
|
237
238
|
case UPB_DEFTYPE_MSG: {
|
238
239
|
const upb_MessageDef* m = _upb_DefType_Unpack(v, UPB_DEFTYPE_MSG);
|
239
|
-
|
240
|
-
|
241
|
-
|
240
|
+
if (_upb_MessageDef_InMessageSet(m)) {
|
241
|
+
for (int i = 0; i < upb_MessageDef_NestedExtensionCount(m); i++) {
|
242
|
+
const upb_FieldDef* ext = upb_MessageDef_NestedExtension(m, i);
|
243
|
+
if (upb_FieldDef_MessageSubDef(ext) == m) {
|
244
|
+
return ext;
|
245
|
+
}
|
246
|
+
}
|
247
|
+
}
|
248
|
+
return NULL;
|
242
249
|
}
|
243
250
|
default:
|
244
251
|
break;
|
@@ -6,7 +6,7 @@
|
|
6
6
|
#if defined(UPB_BOOTSTRAP_STAGE) && UPB_BOOTSTRAP_STAGE == 0
|
7
7
|
// This header is checked in.
|
8
8
|
#include "upb/reflection/stage0/google/protobuf/descriptor.upb.h"
|
9
|
-
#elif UPB_BOOTSTRAP_STAGE == 1
|
9
|
+
#elif defined(UPB_BOOTSTRAP_STAGE) && UPB_BOOTSTRAP_STAGE == 1
|
10
10
|
// This header is generated at build time by the bootstrapping process.
|
11
11
|
#include "upb/reflection/stage1/google/protobuf/descriptor.upb.h"
|
12
12
|
#else
|
@@ -181,7 +181,7 @@ bool upb_FileDef_Resolves(const upb_FileDef* f, const char* path) {
|
|
181
181
|
return false;
|
182
182
|
}
|
183
183
|
|
184
|
-
static char*
|
184
|
+
static char* _strviewdup(upb_DefBuilder* ctx, upb_StringView view) {
|
185
185
|
char* ret = upb_strdup2(view.data, view.size, _upb_DefBuilder_Arena(ctx));
|
186
186
|
if (!ret) _upb_DefBuilder_OomErr(ctx);
|
187
187
|
return ret;
|
@@ -310,7 +310,7 @@ void _upb_FileDef_Create(upb_DefBuilder* ctx,
|
|
310
310
|
}
|
311
311
|
|
312
312
|
upb_StringView name = UPB_DESC(FileDescriptorProto_name)(file_proto);
|
313
|
-
file->name =
|
313
|
+
file->name = _strviewdup(ctx, name);
|
314
314
|
if (strlen(file->name) != name.size) {
|
315
315
|
_upb_DefBuilder_Errf(ctx, "File name contained embedded NULL");
|
316
316
|
}
|
@@ -319,7 +319,7 @@ void _upb_FileDef_Create(upb_DefBuilder* ctx,
|
|
319
319
|
|
320
320
|
if (package.size) {
|
321
321
|
_upb_DefBuilder_CheckIdentFull(ctx, package);
|
322
|
-
file->package =
|
322
|
+
file->package = _strviewdup(ctx, package);
|
323
323
|
} else {
|
324
324
|
file->package = NULL;
|
325
325
|
}
|
@@ -453,8 +453,15 @@ void _upb_FileDef_Create(upb_DefBuilder* ctx,
|
|
453
453
|
}
|
454
454
|
|
455
455
|
if (file->ext_count) {
|
456
|
-
|
456
|
+
upb_ExtensionRegistryStatus status = upb_ExtensionRegistry_AddArray(
|
457
457
|
_upb_DefPool_ExtReg(ctx->symtab), file->ext_layouts, file->ext_count);
|
458
|
-
if (
|
458
|
+
if (status != kUpb_ExtensionRegistryStatus_Ok) {
|
459
|
+
if (status == kUpb_ExtensionRegistryStatus_OutOfMemory) {
|
460
|
+
_upb_DefBuilder_OomErr(ctx);
|
461
|
+
}
|
462
|
+
|
463
|
+
UPB_ASSERT(status == kUpb_ExtensionRegistryStatus_DuplicateEntry);
|
464
|
+
_upb_DefBuilder_Errf(ctx, "duplicate extension entry");
|
465
|
+
}
|
459
466
|
}
|
460
467
|
}
|
@@ -350,7 +350,7 @@ upb_StringView _upb_DefBuilder_MakeKey(upb_DefBuilder* ctx,
|
|
350
350
|
upb_StringView key) {
|
351
351
|
size_t need = key.size + sizeof(void*);
|
352
352
|
if (ctx->tmp_buf_size < need) {
|
353
|
-
ctx->tmp_buf_size = UPB_MAX(64,
|
353
|
+
ctx->tmp_buf_size = UPB_MAX(64, upb_RoundUpToPowerOfTwo(need));
|
354
354
|
ctx->tmp_buf = upb_Arena_Malloc(ctx->tmp_arena, ctx->tmp_buf_size);
|
355
355
|
if (!ctx->tmp_buf) _upb_DefBuilder_OomErr(ctx);
|
356
356
|
}
|
@@ -13,7 +13,7 @@
|
|
13
13
|
// features. This is used for feature resolution under Editions.
|
14
14
|
// NOLINTBEGIN
|
15
15
|
// clang-format off
|
16
|
-
#define UPB_INTERNAL_UPB_EDITION_DEFAULTS "\n\
|
16
|
+
#define UPB_INTERNAL_UPB_EDITION_DEFAULTS "\n\025\030\204\007\"\000*\016\010\001\020\002\030\002 \003(\0010\0028\002\n\025\030\347\007\"\000*\016\010\002\020\001\030\001 \002(\0010\0018\002\n\025\030\350\007\"\014\010\001\020\001\030\001 \002(\0010\001*\0028\002 \346\007(\350\007"
|
17
17
|
// clang-format on
|
18
18
|
// NOLINTEND
|
19
19
|
|
@@ -172,15 +172,18 @@ bool upb_Message_Next(const upb_Message* msg, const upb_MessageDef* m,
|
|
172
172
|
}
|
173
173
|
|
174
174
|
if (ext_pool) {
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
175
|
+
upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg);
|
176
|
+
if (!in) return false;
|
177
|
+
|
178
|
+
for (; (i - n) < in->size; i++) {
|
179
|
+
upb_TaggedAuxPtr tagged_ptr = in->aux_data[i - n];
|
180
|
+
if (upb_TaggedAuxPtr_IsExtension(tagged_ptr)) {
|
181
|
+
const upb_Extension* ext = upb_TaggedAuxPtr_Extension(tagged_ptr);
|
182
|
+
memcpy(out_val, &ext->data, sizeof(*out_val));
|
183
|
+
*out_f = upb_DefPool_FindExtensionByMiniTable(ext_pool, ext->ext);
|
184
|
+
*iter = i;
|
185
|
+
return true;
|
186
|
+
}
|
184
187
|
}
|
185
188
|
}
|
186
189
|
|
@@ -189,7 +192,7 @@ bool upb_Message_Next(const upb_Message* msg, const upb_MessageDef* m,
|
|
189
192
|
}
|
190
193
|
|
191
194
|
bool _upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m,
|
192
|
-
int depth) {
|
195
|
+
const upb_DefPool* ext_pool, int depth) {
|
193
196
|
UPB_ASSERT(!upb_Message_IsFrozen(msg));
|
194
197
|
size_t iter = kUpb_Message_Begin;
|
195
198
|
const upb_FieldDef* f;
|
@@ -200,7 +203,7 @@ bool _upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m,
|
|
200
203
|
|
201
204
|
_upb_Message_DiscardUnknown_shallow(msg);
|
202
205
|
|
203
|
-
while (upb_Message_Next(msg, m,
|
206
|
+
while (upb_Message_Next(msg, m, ext_pool, &f, &val, &iter)) {
|
204
207
|
const upb_MessageDef* subm = upb_FieldDef_MessageSubDef(f);
|
205
208
|
if (!subm) continue;
|
206
209
|
if (upb_FieldDef_IsMap(f)) {
|
@@ -214,7 +217,7 @@ bool _upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m,
|
|
214
217
|
upb_MessageValue map_key, map_val;
|
215
218
|
while (upb_Map_Next(map, &map_key, &map_val, &iter)) {
|
216
219
|
if (!_upb_Message_DiscardUnknown((upb_Message*)map_val.msg_val, val_m,
|
217
|
-
depth)) {
|
220
|
+
ext_pool, depth)) {
|
218
221
|
ret = false;
|
219
222
|
}
|
220
223
|
}
|
@@ -224,13 +227,13 @@ bool _upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m,
|
|
224
227
|
for (i = 0; i < n; i++) {
|
225
228
|
upb_MessageValue elem = upb_Array_Get(arr, i);
|
226
229
|
if (!_upb_Message_DiscardUnknown((upb_Message*)elem.msg_val, subm,
|
227
|
-
depth)) {
|
230
|
+
ext_pool, depth)) {
|
228
231
|
ret = false;
|
229
232
|
}
|
230
233
|
}
|
231
234
|
} else {
|
232
235
|
if (!_upb_Message_DiscardUnknown((upb_Message*)val.msg_val, subm,
|
233
|
-
depth)) {
|
236
|
+
ext_pool, depth)) {
|
234
237
|
ret = false;
|
235
238
|
}
|
236
239
|
}
|
@@ -240,6 +243,6 @@ bool _upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m,
|
|
240
243
|
}
|
241
244
|
|
242
245
|
bool upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m,
|
243
|
-
int maxdepth) {
|
244
|
-
return _upb_Message_DiscardUnknown(msg, m, maxdepth);
|
246
|
+
const upb_DefPool* ext_pool, int maxdepth) {
|
247
|
+
return _upb_Message_DiscardUnknown(msg, m, ext_pool, maxdepth);
|
245
248
|
}
|
@@ -78,7 +78,9 @@ UPB_API bool upb_Message_Next(const upb_Message* msg, const upb_MessageDef* m,
|
|
78
78
|
|
79
79
|
// Clears all unknown field data from this message and all submessages.
|
80
80
|
UPB_API bool upb_Message_DiscardUnknown(upb_Message* msg,
|
81
|
-
const upb_MessageDef* m,
|
81
|
+
const upb_MessageDef* m,
|
82
|
+
const upb_DefPool* ext_pool,
|
83
|
+
int maxdepth);
|
82
84
|
|
83
85
|
#ifdef __cplusplus
|
84
86
|
} /* extern "C" */
|
@@ -176,19 +176,7 @@ static void _upb_TextEncode_Msg(txtenc* e, const upb_Message* msg,
|
|
176
176
|
}
|
177
177
|
}
|
178
178
|
|
179
|
-
|
180
|
-
size_t size;
|
181
|
-
const char* ptr = upb_Message_GetUnknown(msg, &size);
|
182
|
-
if (size != 0) {
|
183
|
-
char* start = e->ptr;
|
184
|
-
upb_EpsCopyInputStream stream;
|
185
|
-
upb_EpsCopyInputStream_Init(&stream, &ptr, size, true);
|
186
|
-
if (!UPB_PRIVATE(_upb_TextEncode_Unknown)(e, ptr, &stream, -1)) {
|
187
|
-
/* Unknown failed to parse, back up and don't print it at all. */
|
188
|
-
e->ptr = start;
|
189
|
-
}
|
190
|
-
}
|
191
|
-
}
|
179
|
+
UPB_PRIVATE(_upb_TextEncode_ParseUnknown)(e, msg);
|
192
180
|
}
|
193
181
|
|
194
182
|
size_t upb_TextEncode(const upb_Message* msg, const upb_MessageDef* m,
|
@@ -15,6 +15,8 @@
|
|
15
15
|
#include "upb/base/string_view.h"
|
16
16
|
#include "upb/lex/round_trip.h"
|
17
17
|
#include "upb/message/array.h"
|
18
|
+
#include "upb/message/message.h"
|
19
|
+
#include "upb/text/options.h"
|
18
20
|
#include "upb/wire/eps_copy_input_stream.h"
|
19
21
|
#include "upb/wire/reader.h"
|
20
22
|
#include "upb/wire/types.h"
|
@@ -22,11 +24,11 @@
|
|
22
24
|
// Must be last.
|
23
25
|
#include "upb/port/def.inc"
|
24
26
|
|
25
|
-
#define CHK(x)
|
26
|
-
do {
|
27
|
-
if (!(x)) {
|
28
|
-
return
|
29
|
-
}
|
27
|
+
#define CHK(x) \
|
28
|
+
do { \
|
29
|
+
if (!(x)) { \
|
30
|
+
return NULL; \
|
31
|
+
} \
|
30
32
|
} while (0)
|
31
33
|
|
32
34
|
/*
|
@@ -134,6 +136,23 @@ const char* UPB_PRIVATE(_upb_TextEncode_Unknown)(txtenc* e, const char* ptr,
|
|
134
136
|
|
135
137
|
#undef CHK
|
136
138
|
|
139
|
+
void UPB_PRIVATE(_upb_TextEncode_ParseUnknown)(txtenc* e,
|
140
|
+
const upb_Message* msg) {
|
141
|
+
if ((e->options & UPB_TXTENC_SKIPUNKNOWN) != 0) return;
|
142
|
+
|
143
|
+
uintptr_t iter = kUpb_Message_UnknownBegin;
|
144
|
+
upb_StringView view;
|
145
|
+
while (upb_Message_NextUnknown(msg, &view, &iter)) {
|
146
|
+
char* start = e->ptr;
|
147
|
+
upb_EpsCopyInputStream stream;
|
148
|
+
upb_EpsCopyInputStream_Init(&stream, &view.data, view.size, true);
|
149
|
+
if (!UPB_PRIVATE(_upb_TextEncode_Unknown)(e, view.data, &stream, -1)) {
|
150
|
+
/* Unknown failed to parse, back up and don't print it at all. */
|
151
|
+
e->ptr = start;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
137
156
|
void UPB_PRIVATE(_upb_TextEncode_Scalar)(txtenc* e, upb_MessageValue val,
|
138
157
|
upb_CType ctype) {
|
139
158
|
switch (ctype) {
|
@@ -177,4 +196,4 @@ void UPB_PRIVATE(_upb_TextEncode_Scalar)(txtenc* e, upb_MessageValue val,
|
|
177
196
|
default:
|
178
197
|
UPB_UNREACHABLE();
|
179
198
|
}
|
180
|
-
}
|
199
|
+
}
|
@@ -15,6 +15,7 @@
|
|
15
15
|
#include "upb/base/string_view.h"
|
16
16
|
#include "upb/message/array.h"
|
17
17
|
#include "upb/message/internal/map_sorter.h"
|
18
|
+
#include "upb/message/message.h"
|
18
19
|
#include "upb/port/vsnprintf_compat.h"
|
19
20
|
#include "upb/text/options.h"
|
20
21
|
#include "upb/wire/eps_copy_input_stream.h"
|
@@ -230,6 +231,9 @@ const char* UPB_PRIVATE(_upb_TextEncode_Unknown)(txtenc* e, const char* ptr,
|
|
230
231
|
upb_EpsCopyInputStream* stream,
|
231
232
|
int groupnum);
|
232
233
|
|
234
|
+
void UPB_PRIVATE(_upb_TextEncode_ParseUnknown)(txtenc* e,
|
235
|
+
const upb_Message* msg);
|
236
|
+
|
233
237
|
// Must not be called for ctype = kUpb_CType_Enum, as they require different
|
234
238
|
// handling depending on whether or not we're doing reflection-based encoding.
|
235
239
|
void UPB_PRIVATE(_upb_TextEncode_Scalar)(txtenc* e, upb_MessageValue val,
|
@@ -288,11 +288,14 @@ static upb_Message* _upb_Decoder_ReuseSubMessage(
|
|
288
288
|
upb_Message* existing =
|
289
289
|
UPB_PRIVATE(_upb_TaggedMessagePtr_GetEmptyMessage)(tagged);
|
290
290
|
upb_Message* promoted = _upb_Decoder_NewSubMessage(d, subs, field, target);
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
291
|
+
uintptr_t iter = kUpb_Message_UnknownBegin;
|
292
|
+
upb_StringView unknown;
|
293
|
+
while (upb_Message_NextUnknown(existing, &unknown, &iter)) {
|
294
|
+
upb_DecodeStatus status =
|
295
|
+
upb_Decode(unknown.data, unknown.size, promoted, subl, d->extreg,
|
296
|
+
d->options, &d->arena);
|
297
|
+
if (status != kUpb_DecodeStatus_Ok) _upb_Decoder_ErrorJmp(d, status);
|
298
|
+
}
|
296
299
|
return promoted;
|
297
300
|
}
|
298
301
|
|
@@ -366,6 +369,7 @@ const char* _upb_Decoder_DecodeKnownGroup(upb_Decoder* d, const char* ptr,
|
|
366
369
|
field->UPB_PRIVATE(number));
|
367
370
|
}
|
368
371
|
|
372
|
+
#define kUpb_Decoder_EncodeVarint32MaxSize 5
|
369
373
|
static char* upb_Decoder_EncodeVarint32(uint32_t val, char* ptr) {
|
370
374
|
do {
|
371
375
|
uint8_t byte = val & 0x7fU;
|
@@ -376,18 +380,6 @@ static char* upb_Decoder_EncodeVarint32(uint32_t val, char* ptr) {
|
|
376
380
|
return ptr;
|
377
381
|
}
|
378
382
|
|
379
|
-
static void _upb_Decoder_AddUnknownVarints(upb_Decoder* d, upb_Message* msg,
|
380
|
-
uint32_t val1, uint32_t val2) {
|
381
|
-
char buf[20];
|
382
|
-
char* end = buf;
|
383
|
-
end = upb_Decoder_EncodeVarint32(val1, end);
|
384
|
-
end = upb_Decoder_EncodeVarint32(val2, end);
|
385
|
-
|
386
|
-
if (!UPB_PRIVATE(_upb_Message_AddUnknown)(msg, buf, end - buf, &d->arena)) {
|
387
|
-
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
|
388
|
-
}
|
389
|
-
}
|
390
|
-
|
391
383
|
UPB_FORCEINLINE
|
392
384
|
bool _upb_Decoder_CheckEnum(upb_Decoder* d, const char* ptr, upb_Message* msg,
|
393
385
|
const upb_MiniTableEnum* e,
|
@@ -402,9 +394,17 @@ bool _upb_Decoder_CheckEnum(upb_Decoder* d, const char* ptr, upb_Message* msg,
|
|
402
394
|
const uint32_t tag =
|
403
395
|
((uint32_t)field->UPB_PRIVATE(number) << 3) | kUpb_WireType_Varint;
|
404
396
|
upb_Message* unknown_msg =
|
405
|
-
field->UPB_PRIVATE(mode) & kUpb_LabelFlags_IsExtension ? d->
|
397
|
+
field->UPB_PRIVATE(mode) & kUpb_LabelFlags_IsExtension ? d->original_msg
|
406
398
|
: msg;
|
407
|
-
|
399
|
+
char buf[2 * kUpb_Decoder_EncodeVarint32MaxSize];
|
400
|
+
char* end = buf;
|
401
|
+
end = upb_Decoder_EncodeVarint32(tag, end);
|
402
|
+
end = upb_Decoder_EncodeVarint32(v, end);
|
403
|
+
|
404
|
+
if (!UPB_PRIVATE(_upb_Message_AddUnknown)(unknown_msg, buf, end - buf,
|
405
|
+
&d->arena, false)) {
|
406
|
+
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
|
407
|
+
}
|
408
408
|
return false;
|
409
409
|
}
|
410
410
|
|
@@ -662,10 +662,7 @@ static const char* _upb_Decoder_DecodeToMap(
|
|
662
662
|
|
663
663
|
ptr = _upb_Decoder_DecodeSubMessage(d, ptr, &ent.message, subs, field,
|
664
664
|
val->size);
|
665
|
-
|
666
|
-
size_t size;
|
667
|
-
upb_Message_GetUnknown(&ent.message, &size);
|
668
|
-
if (size != 0) {
|
665
|
+
if (upb_Message_HasUnknown(&ent.message)) {
|
669
666
|
char* buf;
|
670
667
|
size_t size;
|
671
668
|
uint32_t tag =
|
@@ -675,8 +672,16 @@ static const char* _upb_Decoder_DecodeToMap(
|
|
675
672
|
if (status != kUpb_EncodeStatus_Ok) {
|
676
673
|
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
|
677
674
|
}
|
678
|
-
|
679
|
-
|
675
|
+
char delim_buf[2 * kUpb_Decoder_EncodeVarint32MaxSize];
|
676
|
+
char* delim_end = delim_buf;
|
677
|
+
delim_end = upb_Decoder_EncodeVarint32(tag, delim_end);
|
678
|
+
delim_end = upb_Decoder_EncodeVarint32(size, delim_end);
|
679
|
+
upb_StringView unknown[] = {
|
680
|
+
{delim_buf, delim_end - delim_buf},
|
681
|
+
{buf, size},
|
682
|
+
};
|
683
|
+
|
684
|
+
if (!UPB_PRIVATE(_upb_Message_AddUnknownV)(msg, &d->arena, unknown, 2)) {
|
680
685
|
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
|
681
686
|
}
|
682
687
|
} else {
|
@@ -823,7 +828,7 @@ static void upb_Decoder_AddKnownMessageSetItem(
|
|
823
828
|
}
|
824
829
|
upb_Message* submsg = _upb_Decoder_NewSubMessage2(
|
825
830
|
d, ext->ext->UPB_PRIVATE(sub).UPB_PRIVATE(submsg),
|
826
|
-
&ext->ext->UPB_PRIVATE(field),
|
831
|
+
&ext->ext->UPB_PRIVATE(field), &ext->data.tagged_msg_val);
|
827
832
|
upb_DecodeStatus status = upb_Decode(
|
828
833
|
data, size, submsg, upb_MiniTableExtension_GetSubMessage(item_mt),
|
829
834
|
d->extreg, d->options, &d->arena);
|
@@ -835,7 +840,7 @@ static void upb_Decoder_AddUnknownMessageSetItem(upb_Decoder* d,
|
|
835
840
|
uint32_t type_id,
|
836
841
|
const char* message_data,
|
837
842
|
uint32_t message_size) {
|
838
|
-
char buf[
|
843
|
+
char buf[6 * kUpb_Decoder_EncodeVarint32MaxSize];
|
839
844
|
char* ptr = buf;
|
840
845
|
ptr = upb_Decoder_EncodeVarint32(kStartItemTag, ptr);
|
841
846
|
ptr = upb_Decoder_EncodeVarint32(kTypeIdTag, ptr);
|
@@ -846,12 +851,12 @@ static void upb_Decoder_AddUnknownMessageSetItem(upb_Decoder* d,
|
|
846
851
|
|
847
852
|
ptr = upb_Decoder_EncodeVarint32(kEndItemTag, ptr);
|
848
853
|
char* end = ptr;
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
854
|
+
upb_StringView unknown[] = {
|
855
|
+
{buf, split - buf},
|
856
|
+
{message_data, message_size},
|
857
|
+
{split, end - split},
|
858
|
+
};
|
859
|
+
if (!UPB_PRIVATE(_upb_Message_AddUnknownV)(msg, &d->arena, unknown, 3)) {
|
855
860
|
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
|
856
861
|
}
|
857
862
|
}
|
@@ -1176,8 +1181,8 @@ const char* _upb_Decoder_DecodeKnownField(upb_Decoder* d, const char* ptr,
|
|
1176
1181
|
if (UPB_UNLIKELY(!ext)) {
|
1177
1182
|
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
|
1178
1183
|
}
|
1179
|
-
d->
|
1180
|
-
msg =
|
1184
|
+
d->original_msg = msg;
|
1185
|
+
msg = &ext->data.UPB_PRIVATE(ext_msg_val);
|
1181
1186
|
if (upb_MiniTableField_IsSubMessage(&ext->ext->UPB_PRIVATE(field))) {
|
1182
1187
|
ext_sub.UPB_PRIVATE(submsg) =
|
1183
1188
|
&ext->ext->UPB_PRIVATE(sub).UPB_PRIVATE(submsg);
|
@@ -1221,7 +1226,8 @@ static const char* _upb_Decoder_DecodeUnknownField(upb_Decoder* d,
|
|
1221
1226
|
// Since unknown fields are the uncommon case, we do a little extra work here
|
1222
1227
|
// to walk backwards through the buffer to find the field start. This frees
|
1223
1228
|
// up a register in the fast paths (when the field is known), which leads to
|
1224
|
-
// significant speedups in benchmarks.
|
1229
|
+
// significant speedups in benchmarks. Note that ptr may point into the slop
|
1230
|
+
// space, beyond the normal end of the input buffer.
|
1225
1231
|
const char* start = ptr;
|
1226
1232
|
|
1227
1233
|
if (wire_type == kUpb_WireType_Delimited) ptr += val.size;
|
@@ -1247,15 +1253,21 @@ static const char* _upb_Decoder_DecodeUnknownField(upb_Decoder* d,
|
|
1247
1253
|
start = _upb_Decoder_ReverseSkipVarint(start, tag);
|
1248
1254
|
assert(start == d->debug_tagstart);
|
1249
1255
|
|
1256
|
+
const char* input_start =
|
1257
|
+
upb_EpsCopyInputStream_GetInputPtr(&d->input, start);
|
1250
1258
|
if (wire_type == kUpb_WireType_StartGroup) {
|
1251
|
-
d->unknown = start;
|
1252
|
-
d->unknown_msg = msg;
|
1253
1259
|
ptr = _upb_Decoder_DecodeUnknownGroup(d, ptr, field_number);
|
1254
|
-
start = d->unknown;
|
1255
|
-
d->unknown = NULL;
|
1256
1260
|
}
|
1257
|
-
|
1258
|
-
|
1261
|
+
// Normally, bounds checks for fixed or varint fields are performed after
|
1262
|
+
// the field is parsed; it's OK for the field to overrun the end of the
|
1263
|
+
// buffer, because it'll just read into slop space. However, because this
|
1264
|
+
// path reads bytes from the input buffer rather than the patch buffer,
|
1265
|
+
// bounds checks are needed before adding the unknown field.
|
1266
|
+
_upb_Decoder_IsDone(d, &ptr);
|
1267
|
+
const char* input_ptr = upb_EpsCopyInputStream_GetInputPtr(&d->input, ptr);
|
1268
|
+
if (!UPB_PRIVATE(_upb_Message_AddUnknown)(msg, input_start,
|
1269
|
+
input_ptr - input_start,
|
1270
|
+
&d->arena, d->input.aliasing)) {
|
1259
1271
|
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
|
1260
1272
|
}
|
1261
1273
|
} else if (wire_type == kUpb_WireType_StartGroup) {
|
@@ -1376,20 +1388,23 @@ static upb_DecodeStatus upb_Decoder_Decode(upb_Decoder* const decoder,
|
|
1376
1388
|
return decoder->status;
|
1377
1389
|
}
|
1378
1390
|
|
1391
|
+
uint16_t upb_DecodeOptions_GetEffectiveMaxDepth(uint32_t options) {
|
1392
|
+
uint16_t max_depth = upb_DecodeOptions_GetMaxDepth(options);
|
1393
|
+
return max_depth ? max_depth : kUpb_WireFormat_DefaultDepthLimit;
|
1394
|
+
}
|
1395
|
+
|
1379
1396
|
upb_DecodeStatus upb_Decode(const char* buf, size_t size, upb_Message* msg,
|
1380
1397
|
const upb_MiniTable* mt,
|
1381
1398
|
const upb_ExtensionRegistry* extreg, int options,
|
1382
1399
|
upb_Arena* arena) {
|
1383
1400
|
UPB_ASSERT(!upb_Message_IsFrozen(msg));
|
1384
1401
|
upb_Decoder decoder;
|
1385
|
-
unsigned depth = (unsigned)options >> 16;
|
1386
1402
|
|
1387
1403
|
upb_EpsCopyInputStream_Init(&decoder.input, &buf, size,
|
1388
1404
|
options & kUpb_DecodeOption_AliasString);
|
1389
1405
|
|
1390
1406
|
decoder.extreg = extreg;
|
1391
|
-
decoder.
|
1392
|
-
decoder.depth = depth ? depth : kUpb_WireFormat_DefaultDepthLimit;
|
1407
|
+
decoder.depth = upb_DecodeOptions_GetEffectiveMaxDepth(options);
|
1393
1408
|
decoder.end_group = DECODE_NOGROUP;
|
1394
1409
|
decoder.options = (uint16_t)options;
|
1395
1410
|
decoder.missing_required = false;
|
@@ -26,8 +26,8 @@ extern "C" {
|
|
26
26
|
#endif
|
27
27
|
|
28
28
|
enum {
|
29
|
-
/* If set, strings will alias the input buffer instead of
|
30
|
-
* arena. */
|
29
|
+
/* If set, strings and unknown fields will alias the input buffer instead of
|
30
|
+
* copying into the arena. */
|
31
31
|
kUpb_DecodeOption_AliasString = 1,
|
32
32
|
|
33
33
|
/* If set, the parse will return failure if any message is missing any
|
@@ -103,6 +103,8 @@ UPB_INLINE uint16_t upb_DecodeOptions_GetMaxDepth(uint32_t options) {
|
|
103
103
|
return options >> 16;
|
104
104
|
}
|
105
105
|
|
106
|
+
uint16_t upb_DecodeOptions_GetEffectiveMaxDepth(uint32_t options);
|
107
|
+
|
106
108
|
// Enforce an upper bound on recursion depth.
|
107
109
|
UPB_INLINE int upb_Decode_LimitDepth(uint32_t decode_options, uint32_t limit) {
|
108
110
|
uint32_t max_depth = upb_DecodeOptions_GetMaxDepth(decode_options);
|