grpc 1.80.0 → 1.81.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.
Files changed (889) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +301 -292
  3. data/include/grpc/context_types.h +28 -0
  4. data/include/grpc/credentials.h +11 -0
  5. data/include/grpc/grpc_security_constants.h +12 -0
  6. data/include/grpc/module.modulemap +1 -0
  7. data/src/core/call/call_spine.h +29 -6
  8. data/src/core/call/client_call.cc +2 -2
  9. data/src/core/call/client_call.h +6 -0
  10. data/src/core/call/interception_chain.h +12 -1
  11. data/src/core/call/metadata_batch.h +37 -2
  12. data/src/core/call/server_call.h +4 -0
  13. data/src/core/client_channel/client_channel.cc +2 -1
  14. data/src/core/client_channel/client_channel_filter.cc +2 -2
  15. data/src/core/credentials/transport/tls/grpc_tls_credentials_options.cc +8 -0
  16. data/src/core/credentials/transport/tls/grpc_tls_credentials_options.h +9 -2
  17. data/src/core/credentials/transport/tls/ssl_utils.cc +4 -0
  18. data/src/core/credentials/transport/tls/ssl_utils.h +3 -0
  19. data/src/core/credentials/transport/tls/tls_security_connector.cc +3 -2
  20. data/src/core/ext/filters/http/client_authority_filter.cc +4 -0
  21. data/src/core/ext/filters/http/http_filters_plugin.cc +6 -0
  22. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +1 -1
  23. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +7 -0
  24. data/src/core/ext/transport/chttp2/transport/frame.cc +1 -1
  25. data/src/core/ext/transport/chttp2/transport/frame.h +1 -1
  26. data/src/core/ext/transport/chttp2/transport/frame_security.cc +3 -1
  27. data/src/core/ext/transport/chttp2/transport/header_assembler.h +8 -8
  28. data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +112 -155
  29. data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +38 -37
  30. data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +11 -1
  31. data/src/core/ext/transport/chttp2/transport/http2_transport.cc +0 -38
  32. data/src/core/ext/transport/chttp2/transport/http2_transport.h +30 -37
  33. data/src/core/ext/transport/chttp2/transport/incoming_metadata_tracker.h +74 -5
  34. data/src/core/ext/transport/chttp2/transport/internal.h +1 -0
  35. data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -1
  36. data/src/core/ext/transport/chttp2/transport/security_frame.h +1 -1
  37. data/src/core/ext/transport/chttp2/transport/stream.h +29 -11
  38. data/src/core/ext/transport/chttp2/transport/transport_common.cc +3 -0
  39. data/src/core/ext/transport/chttp2/transport/writable_streams.h +2 -77
  40. data/src/core/ext/upb-gen/cel/expr/checked.upb_minitable.c +11 -93
  41. data/src/core/ext/upb-gen/cel/expr/syntax.upb_minitable.c +15 -129
  42. data/src/core/ext/upb-gen/envoy/admin/v3/certs.upb_minitable.c +4 -30
  43. data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb_minitable.c +4 -54
  44. data/src/core/ext/upb-gen/envoy/admin/v3/config_dump.upb_minitable.c +4 -28
  45. data/src/core/ext/upb-gen/envoy/admin/v3/config_dump_shared.upb_minitable.c +15 -133
  46. data/src/core/ext/upb-gen/envoy/admin/v3/init_dump.upb_minitable.c +2 -12
  47. data/src/core/ext/upb-gen/envoy/admin/v3/listeners.upb_minitable.c +2 -12
  48. data/src/core/ext/upb-gen/envoy/admin/v3/memory.upb_minitable.c +1 -11
  49. data/src/core/ext/upb-gen/envoy/admin/v3/metrics.upb_minitable.c +1 -7
  50. data/src/core/ext/upb-gen/envoy/admin/v3/mutex_stats.upb_minitable.c +1 -7
  51. data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb_minitable.c +2 -46
  52. data/src/core/ext/upb-gen/envoy/admin/v3/tap.upb_minitable.c +1 -5
  53. data/src/core/ext/upb-gen/envoy/annotations/resource.upb_minitable.c +1 -5
  54. data/src/core/ext/upb-gen/envoy/config/accesslog/v3/accesslog.upb_minitable.c +10 -80
  55. data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.c +18 -162
  56. data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb_minitable.c +2 -18
  57. data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.c +16 -148
  58. data/src/core/ext/upb-gen/envoy/config/cluster/v3/filter.upb_minitable.c +1 -5
  59. data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb_minitable.c +1 -35
  60. data/src/core/ext/upb-gen/envoy/config/common/matcher/v3/matcher.upb_minitable.c +13 -101
  61. data/src/core/ext/upb-gen/envoy/config/common/mutation_rules/v3/mutation_rules.upb_minitable.c +1 -7
  62. data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb_minitable.c +6 -48
  63. data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.c +29 -207
  64. data/src/core/ext/upb-gen/envoy/config/core/v3/cel.upb_minitable.c +1 -7
  65. data/src/core/ext/upb-gen/envoy/config/core/v3/config_source.upb_minitable.c +5 -59
  66. data/src/core/ext/upb-gen/envoy/config/core/v3/event_service_config.upb_minitable.c +1 -5
  67. data/src/core/ext/upb-gen/envoy/config/core/v3/extension.upb_minitable.c +1 -5
  68. data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_method_list.upb_minitable.c +2 -12
  69. data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_service.upb_minitable.c +11 -111
  70. data/src/core/ext/upb-gen/envoy/config/core/v3/health_check.upb_minitable.c +9 -97
  71. data/src/core/ext/upb-gen/envoy/config/core/v3/http_service.upb_minitable.c +1 -7
  72. data/src/core/ext/upb-gen/envoy/config/core/v3/http_uri.upb_minitable.c +1 -7
  73. data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c +10 -130
  74. data/src/core/ext/upb-gen/envoy/config/core/v3/proxy_protocol.upb_minitable.c +4 -26
  75. data/src/core/ext/upb-gen/envoy/config/core/v3/resolver.upb_minitable.c +2 -12
  76. data/src/core/ext/upb-gen/envoy/config/core/v3/socket_cmsg_headers.upb_minitable.c +1 -7
  77. data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.c +2 -16
  78. data/src/core/ext/upb-gen/envoy/config/core/v3/substitution_format_string.upb_minitable.c +2 -16
  79. data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint.upb_minitable.c +4 -28
  80. data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb_minitable.c +6 -64
  81. data/src/core/ext/upb-gen/envoy/config/endpoint/v3/load_report.upb_minitable.c +9 -53
  82. data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.c +4 -52
  83. data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb_minitable.c +6 -68
  84. data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb_minitable.c +1 -19
  85. data/src/core/ext/upb-gen/envoy/config/metrics/v3/metrics_service.upb_minitable.c +1 -11
  86. data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb_minitable.c +8 -52
  87. data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb_minitable.c +11 -59
  88. data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb_minitable.c +11 -93
  89. data/src/core/ext/upb-gen/envoy/config/route/v3/route.upb_minitable.c +2 -40
  90. data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c +48 -550
  91. data/src/core/ext/upb-gen/envoy/config/route/v3/scoped_route.upb_minitable.c +3 -21
  92. data/src/core/ext/upb-gen/envoy/config/tap/v3/common.upb_minitable.c +10 -80
  93. data/src/core/ext/upb-gen/envoy/config/trace/v3/datadog.upb_minitable.c +1 -7
  94. data/src/core/ext/upb-gen/envoy/config/trace/v3/dynamic_ot.upb_minitable.c +1 -5
  95. data/src/core/ext/upb-gen/envoy/config/trace/v3/http_tracer.upb_minitable.c +1 -7
  96. data/src/core/ext/upb-gen/envoy/config/trace/v3/lightstep.upb_minitable.c +1 -7
  97. data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb_minitable.c +1 -11
  98. data/src/core/ext/upb-gen/envoy/config/trace/v3/skywalking.upb_minitable.c +1 -7
  99. data/src/core/ext/upb-gen/envoy/config/trace/v3/xray.upb_minitable.c +2 -12
  100. data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb_minitable.c +1 -19
  101. data/src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb_minitable.c +16 -182
  102. data/src/core/ext/upb-gen/envoy/extensions/clusters/aggregate/v3/cluster.upb_minitable.c +2 -12
  103. data/src/core/ext/upb-gen/envoy/extensions/common/matching/v3/extension_matcher.upb.h +240 -0
  104. data/src/core/ext/upb-gen/envoy/extensions/common/matching/v3/extension_matcher.upb_minitable.c +78 -0
  105. data/src/core/ext/upb-gen/envoy/extensions/common/matching/v3/extension_matcher.upb_minitable.h +34 -0
  106. data/src/core/ext/upb-gen/envoy/extensions/filters/common/fault/v3/fault.upb_minitable.c +3 -23
  107. data/src/core/ext/upb-gen/envoy/extensions/filters/common/matcher/action/v3/skip_action.upb.h +73 -0
  108. data/src/core/ext/upb-gen/envoy/extensions/filters/common/matcher/action/v3/skip_action.upb_minitable.c +42 -0
  109. data/src/core/ext/upb-gen/envoy/extensions/filters/common/matcher/action/v3/skip_action.upb_minitable.h +32 -0
  110. data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb.h +431 -0
  111. data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb_minitable.c +111 -0
  112. data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb_minitable.h +38 -0
  113. data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb_minitable.c +2 -30
  114. data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb_minitable.c +3 -23
  115. data/src/core/ext/upb-gen/envoy/extensions/filters/http/rbac/v3/rbac.upb_minitable.c +1 -11
  116. data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb_minitable.c +2 -24
  117. data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb_minitable.c +2 -14
  118. data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.c +19 -187
  119. data/src/core/ext/upb-gen/envoy/extensions/grpc_service/call_credentials/access_token/v3/access_token_credentials.upb_minitable.c +1 -5
  120. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb_minitable.c +1 -11
  121. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.c +3 -25
  122. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.upb_minitable.c +1 -5
  123. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb_minitable.c +1 -11
  124. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb_minitable.c +7 -71
  125. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/secret.upb_minitable.c +3 -21
  126. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb_minitable.c +6 -70
  127. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb_minitable.c +2 -10
  128. data/src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb_minitable.c +2 -26
  129. data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb_minitable.c +13 -123
  130. data/src/core/ext/upb-gen/envoy/service/load_stats/v3/lrs.upb_minitable.c +2 -18
  131. data/src/core/ext/upb-gen/envoy/service/status/v3/csds.upb_minitable.c +5 -53
  132. data/src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb_minitable.c +2 -18
  133. data/src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb_minitable.c +2 -12
  134. data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.c +1 -5
  135. data/src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb_minitable.c +1 -7
  136. data/src/core/ext/upb-gen/envoy/type/matcher/v3/http_inputs.upb_minitable.c +5 -25
  137. data/src/core/ext/upb-gen/envoy/type/matcher/v3/metadata.upb_minitable.c +2 -16
  138. data/src/core/ext/upb-gen/envoy/type/matcher/v3/node.upb_minitable.c +1 -7
  139. data/src/core/ext/upb-gen/envoy/type/matcher/v3/number.upb_minitable.c +2 -2
  140. data/src/core/ext/upb-gen/envoy/type/matcher/v3/path.upb_minitable.c +1 -5
  141. data/src/core/ext/upb-gen/envoy/type/matcher/v3/regex.upb_minitable.c +2 -14
  142. data/src/core/ext/upb-gen/envoy/type/matcher/v3/string.upb_minitable.c +2 -24
  143. data/src/core/ext/upb-gen/envoy/type/matcher/v3/struct.upb_minitable.c +2 -12
  144. data/src/core/ext/upb-gen/envoy/type/matcher/v3/value.upb_minitable.c +3 -21
  145. data/src/core/ext/upb-gen/envoy/type/metadata/v3/metadata.upb_minitable.c +3 -23
  146. data/src/core/ext/upb-gen/envoy/type/tracing/v3/custom_tag.upb_minitable.c +5 -37
  147. data/src/core/ext/upb-gen/envoy/type/v3/hash_policy.upb_minitable.c +2 -12
  148. data/src/core/ext/upb-gen/envoy/type/v3/http_status.upb_minitable.c +1 -5
  149. data/src/core/ext/upb-gen/envoy/type/v3/percent.upb_minitable.c +2 -8
  150. data/src/core/ext/upb-gen/envoy/type/v3/range.upb_minitable.c +4 -16
  151. data/src/core/ext/upb-gen/envoy/type/v3/ratelimit_strategy.upb_minitable.c +2 -14
  152. data/src/core/ext/upb-gen/envoy/type/v3/semantic_version.upb_minitable.c +1 -7
  153. data/src/core/ext/upb-gen/envoy/type/v3/token_bucket.upb_minitable.c +1 -5
  154. data/src/core/ext/upb-gen/google/api/expr/v1alpha1/checked.upb_minitable.c +11 -91
  155. data/src/core/ext/upb-gen/google/api/expr/v1alpha1/syntax.upb_minitable.c +16 -140
  156. data/src/core/ext/upb-gen/google/api/http.upb_minitable.c +3 -33
  157. data/src/core/ext/upb-gen/google/api/httpbody.upb_minitable.c +1 -7
  158. data/src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c +1 -7
  159. data/src/core/ext/upb-gen/google/protobuf/descriptor.upb.h +1 -0
  160. data/src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.c +27 -410
  161. data/src/core/ext/upb-gen/google/protobuf/duration.upb_minitable.c +1 -7
  162. data/src/core/ext/upb-gen/google/protobuf/struct.upb_minitable.c +5 -17
  163. data/src/core/ext/upb-gen/google/protobuf/timestamp.upb_minitable.c +1 -7
  164. data/src/core/ext/upb-gen/google/protobuf/wrappers.upb_minitable.c +9 -37
  165. data/src/core/ext/upb-gen/google/rpc/status.upb_minitable.c +1 -7
  166. data/src/core/ext/upb-gen/src/proto/grpc/channelz/channelz.upb_minitable.c +34 -310
  167. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.c +3 -23
  168. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.c +11 -83
  169. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.c +8 -46
  170. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/service.upb_minitable.c +7 -45
  171. data/src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c +2 -18
  172. data/src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c +12 -108
  173. data/src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c +3 -17
  174. data/src/core/ext/upb-gen/src/proto/grpc/health/v1/health.upb_minitable.c +2 -10
  175. data/src/core/ext/upb-gen/src/proto/grpc/lb/v1/load_balancer.upb_minitable.c +7 -61
  176. data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls.upb_minitable.c +3 -25
  177. data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls_config.upb_minitable.c +8 -72
  178. data/src/core/ext/upb-gen/udpa/annotations/migrate.upb_minitable.c +3 -19
  179. data/src/core/ext/upb-gen/udpa/annotations/security.upb_minitable.c +1 -7
  180. data/src/core/ext/upb-gen/udpa/annotations/status.upb_minitable.c +1 -7
  181. data/src/core/ext/upb-gen/udpa/annotations/versioning.upb_minitable.c +1 -5
  182. data/src/core/ext/upb-gen/validate/validate.upb_minitable.c +54 -234
  183. data/src/core/ext/upb-gen/xds/annotations/v3/migrate.upb_minitable.c +3 -19
  184. data/src/core/ext/upb-gen/xds/annotations/v3/security.upb_minitable.c +1 -7
  185. data/src/core/ext/upb-gen/xds/annotations/v3/status.upb_minitable.c +4 -22
  186. data/src/core/ext/upb-gen/xds/annotations/v3/versioning.upb_minitable.c +1 -5
  187. data/src/core/ext/upb-gen/xds/core/v3/authority.upb_minitable.c +1 -5
  188. data/src/core/ext/upb-gen/xds/core/v3/cidr.upb_minitable.c +1 -5
  189. data/src/core/ext/upb-gen/xds/core/v3/collection_entry.upb_minitable.c +2 -14
  190. data/src/core/ext/upb-gen/xds/core/v3/context_params.upb_minitable.c +1 -7
  191. data/src/core/ext/upb-gen/xds/core/v3/extension.upb_minitable.c +1 -5
  192. data/src/core/ext/upb-gen/xds/core/v3/resource.upb_minitable.c +1 -7
  193. data/src/core/ext/upb-gen/xds/core/v3/resource_locator.upb_minitable.c +2 -18
  194. data/src/core/ext/upb-gen/xds/core/v3/resource_name.upb_minitable.c +1 -7
  195. data/src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb_minitable.c +12 -12
  196. data/src/core/ext/upb-gen/xds/service/orca/v3/orca.upb_minitable.c +1 -7
  197. data/src/core/ext/upb-gen/xds/type/matcher/v3/cel.upb_minitable.c +1 -7
  198. data/src/core/ext/upb-gen/xds/type/matcher/v3/domain.upb_minitable.c +2 -10
  199. data/src/core/ext/upb-gen/xds/type/matcher/v3/ip.upb_minitable.c +2 -12
  200. data/src/core/ext/upb-gen/xds/type/matcher/v3/matcher.upb_minitable.c +8 -58
  201. data/src/core/ext/upb-gen/xds/type/matcher/v3/range.upb_minitable.c +6 -30
  202. data/src/core/ext/upb-gen/xds/type/matcher/v3/regex.upb_minitable.c +1 -7
  203. data/src/core/ext/upb-gen/xds/type/matcher/v3/string.upb_minitable.c +2 -24
  204. data/src/core/ext/upb-gen/xds/type/v3/cel.upb_minitable.c +1 -11
  205. data/src/core/ext/upb-gen/xds/type/v3/range.upb_minitable.c +4 -16
  206. data/src/core/ext/upb-gen/xds/type/v3/typed_struct.upb_minitable.c +1 -5
  207. data/src/core/ext/upbdefs-gen/envoy/extensions/common/matching/v3/extension_matcher.upbdefs.c +110 -0
  208. data/src/core/ext/upbdefs-gen/envoy/extensions/common/matching/v3/extension_matcher.upbdefs.h +42 -0
  209. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/common/matcher/action/v3/skip_action.upbdefs.c +60 -0
  210. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/common/matcher/action/v3/skip_action.upbdefs.h +37 -0
  211. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/composite/v3/composite.upbdefs.c +138 -0
  212. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/composite/v3/composite.upbdefs.h +52 -0
  213. data/src/core/ext/upbdefs-gen/google/protobuf/descriptor.upbdefs.c +734 -731
  214. data/src/core/filter/composite/composite_filter.cc +227 -0
  215. data/src/core/filter/composite/composite_filter.h +154 -0
  216. data/src/core/filter/filter_args.h +4 -0
  217. data/src/core/handshaker/security/pipelined_secure_endpoint.cc +163 -41
  218. data/src/core/handshaker/security/pipelining_heuristic_selector.h +151 -0
  219. data/src/core/handshaker/security/secure_endpoint.cc +24 -8
  220. data/src/core/lib/channel/connected_channel.cc +13 -0
  221. data/src/core/lib/channel/promise_based_filter.h +267 -0
  222. data/src/core/lib/event_engine/cf_engine/cfsocket_listener.cc +3 -2
  223. data/src/core/lib/event_engine/extensions/blocking_dns.h +1 -1
  224. data/src/core/lib/event_engine/posix_engine/posix_interface_posix.cc +4 -0
  225. data/src/core/lib/event_engine/windows/windows_engine.cc +11 -3
  226. data/src/core/lib/experiments/experiments.cc +120 -117
  227. data/src/core/lib/experiments/experiments.h +71 -58
  228. data/src/core/lib/promise/detail/promise_factory.h +16 -5
  229. data/src/core/lib/promise/detail/promise_like.h +19 -1
  230. data/src/core/lib/promise/inter_activity_latch.h +5 -8
  231. data/src/core/lib/promise/inter_activity_pipe.h +193 -0
  232. data/src/core/lib/promise/sleep.cc +5 -9
  233. data/src/core/lib/resource_quota/arena.h +1 -1
  234. data/src/core/lib/surface/call.cc +43 -6
  235. data/src/core/lib/surface/call.h +6 -0
  236. data/src/core/lib/surface/call_utils.cc +42 -3
  237. data/src/core/lib/surface/call_utils.h +30 -11
  238. data/src/core/lib/surface/channel_stack_type.cc +8 -0
  239. data/src/core/lib/surface/channel_stack_type.h +4 -0
  240. data/src/core/lib/surface/completion_queue.cc +15 -12
  241. data/src/core/lib/surface/filter_stack_call.h +5 -0
  242. data/src/core/lib/surface/legacy_channel.cc +1 -22
  243. data/src/core/lib/surface/legacy_channel.h +1 -3
  244. data/src/core/lib/surface/version.cc +2 -2
  245. data/src/core/lib/transport/bdp_estimator.cc +6 -3
  246. data/src/core/lib/transport/promise_endpoint.h +13 -17
  247. data/src/core/load_balancing/endpoint_list.cc +0 -8
  248. data/src/core/load_balancing/pick_first/pick_first.cc +5 -14
  249. data/src/core/load_balancing/xds/cds.cc +100 -122
  250. data/src/core/load_balancing/xds/cds.h +58 -0
  251. data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -0
  252. data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc +1 -1
  253. data/src/core/server/server.cc +19 -35
  254. data/src/core/server/server.h +9 -17
  255. data/src/core/server/xds_server_config_fetcher.cc +0 -24
  256. data/src/core/telemetry/metrics.cc +26 -0
  257. data/src/core/transport/session_endpoint.cc +314 -0
  258. data/src/core/transport/session_endpoint.h +85 -0
  259. data/src/core/tsi/ssl_transport_security.cc +137 -100
  260. data/src/core/tsi/ssl_transport_security.h +8 -0
  261. data/src/core/tsi/ssl_transport_security_utils.cc +25 -1
  262. data/src/core/tsi/ssl_transport_security_utils.h +4 -0
  263. data/src/core/util/sorted_pack.h +69 -44
  264. data/src/core/util/string.cc +8 -0
  265. data/src/core/util/string.h +11 -0
  266. data/src/core/util/table.h +38 -102
  267. data/src/core/util/time_precise.cc +42 -1
  268. data/src/core/util/useful.h +0 -91
  269. data/src/core/util/windows/string_util.cc +4 -2
  270. data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +27 -15
  271. data/src/core/xds/grpc/xds_bootstrap_grpc.cc +148 -69
  272. data/src/core/xds/grpc/xds_bootstrap_grpc.h +12 -0
  273. data/src/core/xds/grpc/xds_client_grpc.cc +1 -1
  274. data/src/core/xds/grpc/xds_cluster.cc +54 -37
  275. data/src/core/xds/grpc/xds_cluster.h +0 -1
  276. data/src/core/xds/grpc/xds_common_types.cc +59 -34
  277. data/src/core/xds/grpc/xds_common_types_parser.cc +33 -3
  278. data/src/core/xds/grpc/xds_common_types_parser.h +5 -1
  279. data/src/core/xds/grpc/xds_endpoint.cc +44 -24
  280. data/src/core/xds/grpc/xds_health_status.cc +10 -6
  281. data/src/core/xds/grpc/xds_http_composite_filter.cc +302 -0
  282. data/src/core/xds/grpc/xds_http_composite_filter.h +84 -0
  283. data/src/core/xds/grpc/xds_http_filter_registry.cc +34 -2
  284. data/src/core/xds/grpc/xds_http_filter_registry.h +4 -0
  285. data/src/core/xds/grpc/xds_http_rbac_filter.cc +21 -10
  286. data/src/core/xds/grpc/xds_listener.cc +98 -59
  287. data/src/core/xds/grpc/xds_listener_parser.cc +64 -26
  288. data/src/core/xds/grpc/xds_matcher.cc +92 -49
  289. data/src/core/xds/grpc/xds_metadata.cc +40 -7
  290. data/src/core/xds/grpc/xds_metadata.h +3 -10
  291. data/src/core/xds/grpc/xds_route_config.cc +171 -100
  292. data/src/core/xds/grpc/xds_server_grpc.cc +27 -18
  293. data/src/ruby/bin/math_pb.rb +1 -1
  294. data/src/ruby/ext/grpc/extconf.rb +1 -15
  295. data/src/ruby/ext/grpc/rb_call_credentials.c +1 -0
  296. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +2 -0
  297. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +3 -0
  298. data/src/ruby/lib/grpc/version.rb +1 -1
  299. data/src/ruby/pb/generate_proto_ruby.sh +1 -1
  300. data/src/ruby/pb/grpc/health/v1/health_pb.rb +1 -1
  301. data/src/ruby/pb/src/proto/grpc/testing/empty_pb.rb +1 -1
  302. data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +1 -1
  303. data/src/ruby/pb/src/proto/grpc/testing/test_pb.rb +1 -1
  304. data/src/ruby/spec/client_server_spec.rb +40 -0
  305. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bn/convert.cc +47 -31
  306. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bn/exponentiation.cc +35 -17
  307. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bytestring/cbb.cc +8 -14
  308. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/derive_key.cc +15 -13
  309. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cpu_arm_linux.cc +5 -28
  310. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cpu_arm_linux.h +9 -11
  311. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/dh/dh_asn1.cc +14 -13
  312. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/dsa/dsa.cc +34 -30
  313. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/dsa/dsa_asn1.cc +35 -23
  314. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/ec/ec_asn1.cc +63 -47
  315. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/ec/hash_to_curve.cc +68 -60
  316. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/ecdsa/ecdsa_asn1.cc +17 -11
  317. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/evp_asn1.cc +11 -10
  318. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/evp_ctx.cc +11 -10
  319. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_dsa_asn1.cc +6 -6
  320. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_ec_asn1.cc +6 -6
  321. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_ed25519_asn1.cc +6 -6
  322. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_rsa_asn1.cc +6 -6
  323. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_x25519_asn1.cc +6 -6
  324. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/sign.cc +42 -23
  325. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/div.cc.inc +79 -0
  326. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/exponentiation.cc.inc +6 -5
  327. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/gcd.cc.inc +80 -58
  328. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/gcd_extra.cc.inc +45 -29
  329. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/jacobi.cc.inc +16 -7
  330. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/montgomery.cc.inc +24 -10
  331. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/mul.cc.inc +34 -24
  332. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/prime.cc.inc +154 -102
  333. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/shift.cc.inc +8 -3
  334. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/sqrt.cc.inc +78 -1
  335. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/dh/check.cc.inc +53 -35
  336. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/dh/dh.cc.inc +76 -57
  337. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/digest/digest.cc.inc +10 -4
  338. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/ec.cc.inc +5 -3
  339. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/rsa/padding.cc.inc +26 -19
  340. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/rsa/rsa.cc.inc +7 -7
  341. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/rsa/rsa_impl.cc.inc +138 -117
  342. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/self_check/self_check.cc.inc +30 -22
  343. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/obj/obj.cc +8 -2
  344. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pem/pem_lib.cc +13 -8
  345. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pkcs7/pkcs7.cc +6 -5
  346. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pkcs7/pkcs7_x509.cc +3 -6
  347. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pkcs8/p5_pbev2.cc +14 -9
  348. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pkcs8/pkcs8.cc +29 -19
  349. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pkcs8/pkcs8_x509.cc +39 -34
  350. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rsa/rsa_crypt.cc +22 -14
  351. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/a_sign.cc +5 -3
  352. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/asn1_gen.cc +12 -8
  353. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_conf.cc +24 -16
  354. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_info.cc +21 -18
  355. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_x509.cc +57 -52
  356. data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_x509a.cc +32 -16
  357. data/third_party/boringssl-with-bazel/{src/include → include}/openssl/bytestring.h +0 -6
  358. data/third_party/boringssl-with-bazel/{src/ssl → ssl}/handoff.cc +12 -12
  359. data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_asn1.cc +3 -2
  360. data/third_party/upb/upb/base/string_view.h +7 -3
  361. data/third_party/upb/upb/generated_code_support.h +17 -1
  362. data/third_party/upb/upb/hash/common.c +2 -1
  363. data/third_party/upb/upb/mem/alloc.c +2 -1
  364. data/third_party/upb/upb/mem/alloc.h +25 -6
  365. data/third_party/upb/upb/mem/arena.c +225 -73
  366. data/third_party/upb/upb/mem/arena.h +56 -0
  367. data/third_party/upb/upb/mem/arena.hpp +6 -0
  368. data/third_party/upb/upb/mem/internal/arena.h +69 -56
  369. data/third_party/upb/upb/message/accessors.h +4 -0
  370. data/third_party/upb/upb/message/array.h +3 -0
  371. data/third_party/upb/upb/message/copy.c +1 -1
  372. data/third_party/upb/upb/message/internal/accessors.h +10 -0
  373. data/third_party/upb/upb/message/internal/array.h +34 -3
  374. data/third_party/upb/upb/message/internal/message.h +23 -9
  375. data/third_party/upb/upb/mini_descriptor/decode.c +127 -66
  376. data/third_party/upb/upb/mini_descriptor/decode.h +6 -2
  377. data/third_party/upb/upb/mini_descriptor/internal/encode.hpp +2 -0
  378. data/third_party/upb/upb/mini_descriptor/link.c +11 -0
  379. data/third_party/upb/upb/mini_table/extension.h +7 -0
  380. data/third_party/upb/upb/mini_table/extension_registry.c +10 -1
  381. data/third_party/upb/upb/mini_table/extension_registry.h +1 -0
  382. data/third_party/upb/upb/mini_table/internal/extension.h +10 -0
  383. data/third_party/upb/upb/mini_table/internal/field.h +1 -1
  384. data/third_party/upb/upb/mini_table/internal/message.h +69 -9
  385. data/third_party/upb/upb/mini_table/message.c +0 -38
  386. data/third_party/upb/upb/mini_table/message.h +5 -1
  387. data/third_party/upb/upb/port/def.inc +140 -111
  388. data/third_party/upb/upb/port/sanitizers.h +179 -0
  389. data/third_party/upb/upb/port/undef.inc +19 -9
  390. data/third_party/upb/upb/reflection/enum_def.c +7 -3
  391. data/third_party/upb/upb/reflection/enum_def.h +1 -0
  392. data/third_party/upb/upb/reflection/field_def.h +1 -0
  393. data/third_party/upb/upb/reflection/file_def.c +1 -1
  394. data/third_party/upb/upb/reflection/internal/upb_edition_defaults.h +1 -1
  395. data/third_party/upb/upb/reflection/message_def.c +29 -2
  396. data/third_party/upb/upb/reflection/message_def.h +2 -0
  397. data/third_party/upb/upb/text/internal/encode.c +5 -5
  398. data/third_party/upb/upb/wire/decode.c +190 -239
  399. data/third_party/upb/upb/wire/decode.h +14 -5
  400. data/third_party/upb/upb/wire/decode_fast/combinations.h +217 -0
  401. data/third_party/upb/upb/wire/decode_fast/data.h +74 -0
  402. data/third_party/upb/upb/wire/decode_fast/select.c +235 -0
  403. data/third_party/upb/upb/wire/decode_fast/select.h +66 -0
  404. data/third_party/upb/upb/wire/encode.c +332 -203
  405. data/third_party/upb/upb/wire/encode.h +3 -6
  406. data/third_party/upb/upb/wire/eps_copy_input_stream.h +64 -6
  407. data/third_party/upb/upb/wire/internal/decoder.c +43 -0
  408. data/third_party/upb/upb/wire/internal/decoder.h +73 -35
  409. data/third_party/upb/upb/wire/internal/reader.h +28 -9
  410. data/third_party/upb/upb/wire/reader.c +20 -2
  411. data/third_party/upb/upb/wire/reader.h +29 -19
  412. data/third_party/upb/upb/wire/writer.h +20 -0
  413. data/third_party/utf8_range/utf8_range.c +6 -6
  414. data/third_party/utf8_range/utf8_range_neon.inc +1 -1
  415. data/third_party/utf8_range/utf8_range_sse.inc +1 -1
  416. metadata +559 -531
  417. data/third_party/boringssl-with-bazel/src/crypto/bn/div.cc +0 -100
  418. data/third_party/boringssl-with-bazel/src/crypto/bn/sqrt.cc +0 -93
  419. data/third_party/upb/upb/wire/internal/decode_fast.c +0 -1000
  420. data/third_party/upb/upb/wire/internal/decode_fast.h +0 -152
  421. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/aes/aes.cc +0 -0
  422. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_bitstr.cc +0 -0
  423. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_bool.cc +0 -0
  424. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_d2i_fp.cc +0 -0
  425. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_dup.cc +0 -0
  426. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_gentm.cc +0 -0
  427. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_i2d_fp.cc +0 -0
  428. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_int.cc +0 -0
  429. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_mbstr.cc +0 -0
  430. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_object.cc +0 -0
  431. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_octet.cc +0 -0
  432. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_strex.cc +0 -0
  433. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_strnid.cc +0 -0
  434. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_time.cc +0 -0
  435. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_type.cc +0 -0
  436. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/a_utctm.cc +0 -0
  437. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/asn1_lib.cc +0 -0
  438. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/asn1_par.cc +0 -0
  439. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/asn_pack.cc +0 -0
  440. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/f_int.cc +0 -0
  441. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/f_string.cc +0 -0
  442. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/internal.h +0 -0
  443. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/posix_time.cc +0 -0
  444. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/tasn_dec.cc +0 -0
  445. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/tasn_enc.cc +0 -0
  446. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/tasn_fre.cc +0 -0
  447. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/tasn_new.cc +0 -0
  448. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/tasn_typ.cc +0 -0
  449. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/asn1/tasn_utl.cc +0 -0
  450. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/base64/base64.cc +0 -0
  451. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bcm_support.h +0 -0
  452. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/bio.cc +0 -0
  453. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/bio_mem.cc +0 -0
  454. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/connect.cc +0 -0
  455. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/errno.cc +0 -0
  456. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/fd.cc +0 -0
  457. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/file.cc +0 -0
  458. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/hexdump.cc +0 -0
  459. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/internal.h +0 -0
  460. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/pair.cc +0 -0
  461. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/printf.cc +0 -0
  462. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/socket.cc +0 -0
  463. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bio/socket_helper.cc +0 -0
  464. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/blake2/blake2.cc +0 -0
  465. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bn/bn_asn1.cc +0 -0
  466. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/buf/buf.cc +0 -0
  467. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bytestring/asn1_compat.cc +0 -0
  468. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bytestring/ber.cc +0 -0
  469. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bytestring/cbs.cc +0 -0
  470. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bytestring/internal.h +0 -0
  471. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/bytestring/unicode.cc +0 -0
  472. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/chacha/chacha.cc +0 -0
  473. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/chacha/internal.h +0 -0
  474. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/e_aesctrhmac.cc +0 -0
  475. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/e_aeseax.cc +0 -0
  476. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/e_aesgcmsiv.cc +0 -0
  477. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/e_chacha20poly1305.cc +0 -0
  478. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/e_des.cc +0 -0
  479. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/e_null.cc +0 -0
  480. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/e_rc2.cc +0 -0
  481. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/e_rc4.cc +0 -0
  482. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/e_tls.cc +0 -0
  483. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/get_cipher.cc +0 -0
  484. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/internal.h +0 -0
  485. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cipher/tls_cbc.cc +0 -0
  486. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cms/cms.cc +0 -0
  487. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/conf/conf.cc +0 -0
  488. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/conf/internal.h +0 -0
  489. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cpu_aarch64_apple.cc +0 -0
  490. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cpu_aarch64_fuchsia.cc +0 -0
  491. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cpu_aarch64_linux.cc +0 -0
  492. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cpu_aarch64_openbsd.cc +0 -0
  493. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cpu_aarch64_sysreg.cc +0 -0
  494. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cpu_aarch64_win.cc +0 -0
  495. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cpu_arm_freebsd.cc +0 -0
  496. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/cpu_intel.cc +0 -0
  497. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/crypto.cc +0 -0
  498. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/curve25519/curve25519.cc +0 -0
  499. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/curve25519/curve25519_64_adx.cc +0 -0
  500. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/curve25519/curve25519_tables.h +0 -0
  501. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/curve25519/internal.h +0 -0
  502. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/curve25519/spake25519.cc +0 -0
  503. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/des/des.cc +0 -0
  504. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/des/internal.h +0 -0
  505. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/dh/params.cc +0 -0
  506. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/digest/digest_extra.cc +0 -0
  507. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/dsa/internal.h +0 -0
  508. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/ec/ec_derive.cc +0 -0
  509. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/ec/internal.h +0 -0
  510. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/ecdh/ecdh.cc +0 -0
  511. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/engine/engine.cc +0 -0
  512. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/err/err.cc +0 -0
  513. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/err/internal.h +0 -0
  514. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/evp.cc +0 -0
  515. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/internal.h +0 -0
  516. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_dh.cc +0 -0
  517. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_dh_asn1.cc +0 -0
  518. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_ec.cc +0 -0
  519. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_ed25519.cc +0 -0
  520. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_hkdf.cc +0 -0
  521. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_rsa.cc +0 -0
  522. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/p_x25519.cc +0 -0
  523. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/pbkdf.cc +0 -0
  524. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/print.cc +0 -0
  525. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/evp/scrypt.cc +0 -0
  526. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/ex_data.cc +0 -0
  527. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/aes/aes.cc.inc +0 -0
  528. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/aes/aes_nohw.cc.inc +0 -0
  529. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/aes/cbc.cc.inc +0 -0
  530. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/aes/cfb.cc.inc +0 -0
  531. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/aes/ctr.cc.inc +0 -0
  532. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/aes/gcm.cc.inc +0 -0
  533. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/aes/gcm_nohw.cc.inc +0 -0
  534. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/aes/internal.h +0 -0
  535. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/aes/key_wrap.cc.inc +0 -0
  536. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/aes/mode_wrappers.cc.inc +0 -0
  537. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/aes/ofb.cc.inc +0 -0
  538. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bcm.cc +0 -0
  539. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bcm_interface.h +0 -0
  540. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/add.cc.inc +0 -0
  541. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/asm/x86_64-gcc.cc.inc +0 -0
  542. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/bn.cc.inc +0 -0
  543. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/bytes.cc.inc +0 -0
  544. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/cmp.cc.inc +0 -0
  545. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/ctx.cc.inc +0 -0
  546. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/div_extra.cc.inc +0 -0
  547. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/generic.cc.inc +0 -0
  548. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/internal.h +0 -0
  549. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/montgomery_inv.cc.inc +0 -0
  550. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/random.cc.inc +0 -0
  551. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/rsaz_exp.cc.inc +0 -0
  552. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/bn/rsaz_exp.h +0 -0
  553. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/cipher/aead.cc.inc +0 -0
  554. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/cipher/cipher.cc.inc +0 -0
  555. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/cipher/e_aes.cc.inc +0 -0
  556. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/cipher/e_aesccm.cc.inc +0 -0
  557. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/cipher/internal.h +0 -0
  558. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/cmac/cmac.cc.inc +0 -0
  559. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/delocate.h +0 -0
  560. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/dh/internal.h +0 -0
  561. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/digest/digests.cc.inc +0 -0
  562. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/digest/internal.h +0 -0
  563. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/digest/md32_common.h +0 -0
  564. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/digestsign/digestsign.cc.inc +0 -0
  565. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/builtin_curves.h +0 -0
  566. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/ec_key.cc.inc +0 -0
  567. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/ec_montgomery.cc.inc +0 -0
  568. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/felem.cc.inc +0 -0
  569. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/internal.h +0 -0
  570. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/oct.cc.inc +0 -0
  571. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/p224-64.cc.inc +0 -0
  572. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/p256-nistz-table.h +0 -0
  573. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/p256-nistz.cc.inc +0 -0
  574. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/p256-nistz.h +0 -0
  575. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/p256.cc.inc +0 -0
  576. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/p256_table.h +0 -0
  577. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/scalar.cc.inc +0 -0
  578. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/simple.cc.inc +0 -0
  579. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/simple_mul.cc.inc +0 -0
  580. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/util.cc.inc +0 -0
  581. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ec/wnaf.cc.inc +0 -0
  582. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ecdh/ecdh.cc.inc +0 -0
  583. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ecdsa/ecdsa.cc.inc +0 -0
  584. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/ecdsa/internal.h +0 -0
  585. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/fips_shared_support.cc +0 -0
  586. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/hkdf/hkdf.cc.inc +0 -0
  587. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/hmac/hmac.cc.inc +0 -0
  588. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/keccak/internal.h +0 -0
  589. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/keccak/keccak.cc.inc +0 -0
  590. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/mldsa/fips_known_values.inc +0 -0
  591. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/mldsa/mldsa.cc.inc +0 -0
  592. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/mlkem/fips_known_values.inc +0 -0
  593. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/mlkem/mlkem.cc.inc +0 -0
  594. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/rand/ctrdrbg.cc.inc +0 -0
  595. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/rand/internal.h +0 -0
  596. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/rand/rand.cc.inc +0 -0
  597. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/rsa/blinding.cc.inc +0 -0
  598. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/rsa/internal.h +0 -0
  599. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/self_check/fips.cc.inc +0 -0
  600. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/service_indicator/internal.h +0 -0
  601. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/service_indicator/service_indicator.cc.inc +0 -0
  602. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/sha/internal.h +0 -0
  603. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/sha/sha1.cc.inc +0 -0
  604. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/sha/sha256.cc.inc +0 -0
  605. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/sha/sha512.cc.inc +0 -0
  606. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/address.h +0 -0
  607. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/fips_known_values.inc +0 -0
  608. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/fors.cc.inc +0 -0
  609. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/fors.h +0 -0
  610. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/merkle.cc.inc +0 -0
  611. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/merkle.h +0 -0
  612. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/params.h +0 -0
  613. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/slhdsa.cc.inc +0 -0
  614. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/thash.cc.inc +0 -0
  615. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/thash.h +0 -0
  616. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/wots.cc.inc +0 -0
  617. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/slhdsa/wots.h +0 -0
  618. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/tls/internal.h +0 -0
  619. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fipsmodule/tls/kdf.cc.inc +0 -0
  620. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/fuzzer_mode.cc +0 -0
  621. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/hpke/hpke.cc +0 -0
  622. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/hrss/hrss.cc +0 -0
  623. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/hrss/internal.h +0 -0
  624. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/internal.h +0 -0
  625. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/kyber/internal.h +0 -0
  626. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/kyber/kyber.cc +0 -0
  627. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/lhash/internal.h +0 -0
  628. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/lhash/lhash.cc +0 -0
  629. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/md4/md4.cc +0 -0
  630. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/md5/internal.h +0 -0
  631. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/md5/md5.cc +0 -0
  632. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/mem.cc +0 -0
  633. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/mldsa/mldsa.cc +0 -0
  634. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/mlkem/mlkem.cc +0 -0
  635. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/obj/obj_dat.h +0 -0
  636. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/obj/obj_xref.cc +0 -0
  637. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pem/internal.h +0 -0
  638. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pem/pem_all.cc +0 -0
  639. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pem/pem_info.cc +0 -0
  640. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pem/pem_oth.cc +0 -0
  641. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pem/pem_pk8.cc +0 -0
  642. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pem/pem_pkey.cc +0 -0
  643. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pem/pem_x509.cc +0 -0
  644. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pem/pem_xaux.cc +0 -0
  645. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pkcs7/internal.h +0 -0
  646. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pkcs8/internal.h +0 -0
  647. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/poly1305/internal.h +0 -0
  648. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/poly1305/poly1305.cc +0 -0
  649. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/poly1305/poly1305_arm.cc +0 -0
  650. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/poly1305/poly1305_vec.cc +0 -0
  651. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pool/internal.h +0 -0
  652. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/pool/pool.cc +0 -0
  653. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/deterministic.cc +0 -0
  654. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/fork_detect.cc +0 -0
  655. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/forkunsafe.cc +0 -0
  656. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/getentropy.cc +0 -0
  657. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/getrandom_fillin.h +0 -0
  658. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/internal.h +0 -0
  659. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/ios.cc +0 -0
  660. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/passive.cc +0 -0
  661. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/rand.cc +0 -0
  662. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/trusty.cc +0 -0
  663. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/urandom.cc +0 -0
  664. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rand/windows.cc +0 -0
  665. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rc4/rc4.cc +0 -0
  666. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/refcount.cc +0 -0
  667. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rsa/internal.h +0 -0
  668. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rsa/rsa_asn1.cc +0 -0
  669. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rsa/rsa_extra.cc +0 -0
  670. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/rsa/rsa_print.cc +0 -0
  671. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/sha/sha1.cc +0 -0
  672. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/sha/sha256.cc +0 -0
  673. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/sha/sha512.cc +0 -0
  674. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/siphash/siphash.cc +0 -0
  675. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/slhdsa/slhdsa.cc +0 -0
  676. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/spake2plus/internal.h +0 -0
  677. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/spake2plus/spake2plus.cc +0 -0
  678. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/stack/stack.cc +0 -0
  679. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/thread.cc +0 -0
  680. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/thread_none.cc +0 -0
  681. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/thread_pthread.cc +0 -0
  682. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/thread_win.cc +0 -0
  683. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/trust_token/internal.h +0 -0
  684. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/trust_token/pmbtoken.cc +0 -0
  685. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/trust_token/trust_token.cc +0 -0
  686. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/trust_token/voprf.cc +0 -0
  687. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/a_digest.cc +0 -0
  688. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/a_verify.cc +0 -0
  689. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/algorithm.cc +0 -0
  690. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/by_dir.cc +0 -0
  691. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/by_file.cc +0 -0
  692. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/ext_dat.h +0 -0
  693. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/i2d_pr.cc +0 -0
  694. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/internal.h +0 -0
  695. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/name_print.cc +0 -0
  696. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/policy.cc +0 -0
  697. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/rsa_pss.cc +0 -0
  698. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/t_crl.cc +0 -0
  699. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/t_req.cc +0 -0
  700. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/t_x509.cc +0 -0
  701. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/t_x509a.cc +0 -0
  702. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_akey.cc +0 -0
  703. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_akeya.cc +0 -0
  704. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_alt.cc +0 -0
  705. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_bcons.cc +0 -0
  706. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_bitst.cc +0 -0
  707. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_cpols.cc +0 -0
  708. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_crld.cc +0 -0
  709. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_enum.cc +0 -0
  710. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_extku.cc +0 -0
  711. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_genn.cc +0 -0
  712. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_ia5.cc +0 -0
  713. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_int.cc +0 -0
  714. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_lib.cc +0 -0
  715. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_ncons.cc +0 -0
  716. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_ocsp.cc +0 -0
  717. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_pcons.cc +0 -0
  718. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_pmaps.cc +0 -0
  719. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_prn.cc +0 -0
  720. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_purp.cc +0 -0
  721. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_skey.cc +0 -0
  722. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/v3_utl.cc +0 -0
  723. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509.cc +0 -0
  724. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_att.cc +0 -0
  725. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_cmp.cc +0 -0
  726. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_d2.cc +0 -0
  727. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_def.cc +0 -0
  728. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_ext.cc +0 -0
  729. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_lu.cc +0 -0
  730. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_obj.cc +0 -0
  731. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_req.cc +0 -0
  732. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_set.cc +0 -0
  733. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_trs.cc +0 -0
  734. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_txt.cc +0 -0
  735. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_v3.cc +0 -0
  736. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_vfy.cc +0 -0
  737. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509_vpm.cc +0 -0
  738. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509cset.cc +0 -0
  739. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509name.cc +0 -0
  740. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509rset.cc +0 -0
  741. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x509spki.cc +0 -0
  742. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_algor.cc +0 -0
  743. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_all.cc +0 -0
  744. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_attrib.cc +0 -0
  745. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_crl.cc +0 -0
  746. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_exten.cc +0 -0
  747. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_name.cc +0 -0
  748. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_pubkey.cc +0 -0
  749. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_req.cc +0 -0
  750. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_sig.cc +0 -0
  751. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_spki.cc +0 -0
  752. /data/third_party/boringssl-with-bazel/{src/crypto → crypto}/x509/x_val.cc +0 -0
  753. /data/third_party/boringssl-with-bazel/{src/gen → gen}/crypto/err_data.cc +0 -0
  754. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/aead.h +0 -0
  755. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/aes.h +0 -0
  756. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/arm_arch.h +0 -0
  757. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/asm_base.h +0 -0
  758. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/asn1.h +0 -0
  759. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/asn1_mac.h +0 -0
  760. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/asn1t.h +0 -0
  761. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/base.h +0 -0
  762. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/base64.h +0 -0
  763. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/bcm_public.h +0 -0
  764. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/bio.h +0 -0
  765. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/blake2.h +0 -0
  766. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/blowfish.h +0 -0
  767. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/bn.h +0 -0
  768. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/buf.h +0 -0
  769. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/buffer.h +0 -0
  770. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/cast.h +0 -0
  771. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/chacha.h +0 -0
  772. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/cipher.h +0 -0
  773. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/cmac.h +0 -0
  774. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/cms.h +0 -0
  775. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/conf.h +0 -0
  776. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/cpu.h +0 -0
  777. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/crypto.h +0 -0
  778. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/ctrdrbg.h +0 -0
  779. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/curve25519.h +0 -0
  780. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/des.h +0 -0
  781. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/dh.h +0 -0
  782. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/digest.h +0 -0
  783. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/dsa.h +0 -0
  784. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/dtls1.h +0 -0
  785. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/e_os2.h +0 -0
  786. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/ec.h +0 -0
  787. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/ec_key.h +0 -0
  788. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/ecdh.h +0 -0
  789. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/ecdsa.h +0 -0
  790. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/engine.h +0 -0
  791. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/err.h +0 -0
  792. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/evp.h +0 -0
  793. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/evp_errors.h +0 -0
  794. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/ex_data.h +0 -0
  795. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/experimental/kyber.h +0 -0
  796. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/hkdf.h +0 -0
  797. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/hmac.h +0 -0
  798. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/hpke.h +0 -0
  799. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/hrss.h +0 -0
  800. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/is_boringssl.h +0 -0
  801. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/kdf.h +0 -0
  802. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/lhash.h +0 -0
  803. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/md4.h +0 -0
  804. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/md5.h +0 -0
  805. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/mem.h +0 -0
  806. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/mldsa.h +0 -0
  807. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/mlkem.h +0 -0
  808. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/nid.h +0 -0
  809. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/obj.h +0 -0
  810. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/obj_mac.h +0 -0
  811. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/objects.h +0 -0
  812. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/opensslconf.h +0 -0
  813. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/opensslv.h +0 -0
  814. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/ossl_typ.h +0 -0
  815. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/pem.h +0 -0
  816. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/pkcs12.h +0 -0
  817. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/pkcs7.h +0 -0
  818. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/pkcs8.h +0 -0
  819. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/poly1305.h +0 -0
  820. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/pool.h +0 -0
  821. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/posix_time.h +0 -0
  822. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/rand.h +0 -0
  823. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/rc4.h +0 -0
  824. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/ripemd.h +0 -0
  825. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/rsa.h +0 -0
  826. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/safestack.h +0 -0
  827. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/service_indicator.h +0 -0
  828. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/sha.h +0 -0
  829. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/siphash.h +0 -0
  830. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/slhdsa.h +0 -0
  831. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/span.h +0 -0
  832. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/srtp.h +0 -0
  833. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/ssl.h +0 -0
  834. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/ssl3.h +0 -0
  835. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/stack.h +0 -0
  836. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/target.h +0 -0
  837. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/thread.h +0 -0
  838. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/time.h +0 -0
  839. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/tls1.h +0 -0
  840. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/trust_token.h +0 -0
  841. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/type_check.h +0 -0
  842. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/x509.h +0 -0
  843. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/x509_vfy.h +0 -0
  844. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/x509v3.h +0 -0
  845. /data/third_party/boringssl-with-bazel/{src/include → include}/openssl/x509v3_errors.h +0 -0
  846. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/bio_ssl.cc +0 -0
  847. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/d1_both.cc +0 -0
  848. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/d1_lib.cc +0 -0
  849. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/d1_pkt.cc +0 -0
  850. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/d1_srtp.cc +0 -0
  851. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/dtls_method.cc +0 -0
  852. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/dtls_record.cc +0 -0
  853. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/encrypted_client_hello.cc +0 -0
  854. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/extensions.cc +0 -0
  855. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/handshake.cc +0 -0
  856. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/handshake_client.cc +0 -0
  857. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/handshake_server.cc +0 -0
  858. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/internal.h +0 -0
  859. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/s3_both.cc +0 -0
  860. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/s3_lib.cc +0 -0
  861. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/s3_pkt.cc +0 -0
  862. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_aead_ctx.cc +0 -0
  863. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_buffer.cc +0 -0
  864. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_cert.cc +0 -0
  865. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_cipher.cc +0 -0
  866. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_credential.cc +0 -0
  867. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_file.cc +0 -0
  868. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_key_share.cc +0 -0
  869. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_lib.cc +0 -0
  870. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_privkey.cc +0 -0
  871. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_session.cc +0 -0
  872. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_stat.cc +0 -0
  873. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_transcript.cc +0 -0
  874. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_versions.cc +0 -0
  875. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/ssl_x509.cc +0 -0
  876. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/t1_enc.cc +0 -0
  877. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/tls13_both.cc +0 -0
  878. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/tls13_client.cc +0 -0
  879. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/tls13_enc.cc +0 -0
  880. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/tls13_server.cc +0 -0
  881. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/tls_method.cc +0 -0
  882. /data/third_party/boringssl-with-bazel/{src/ssl → ssl}/tls_record.cc +0 -0
  883. /data/third_party/boringssl-with-bazel/{src/third_party → third_party}/fiat/curve25519_32.h +0 -0
  884. /data/third_party/boringssl-with-bazel/{src/third_party → third_party}/fiat/curve25519_64.h +0 -0
  885. /data/third_party/boringssl-with-bazel/{src/third_party → third_party}/fiat/curve25519_64_adx.h +0 -0
  886. /data/third_party/boringssl-with-bazel/{src/third_party → third_party}/fiat/curve25519_64_msvc.h +0 -0
  887. /data/third_party/boringssl-with-bazel/{src/third_party → third_party}/fiat/p256_32.h +0 -0
  888. /data/third_party/boringssl-with-bazel/{src/third_party → third_party}/fiat/p256_64.h +0 -0
  889. /data/third_party/boringssl-with-bazel/{src/third_party → third_party}/fiat/p256_64_msvc.h +0 -0
@@ -7,6 +7,10 @@
7
7
 
8
8
  #include "upb/mem/arena.h"
9
9
 
10
+ #include <string.h>
11
+
12
+ #include "upb/port/sanitizers.h"
13
+
10
14
  #ifdef UPB_TRACING_ENABLED
11
15
  #include <stdatomic.h>
12
16
  #endif
@@ -29,17 +33,46 @@ void upb_Arena_SetMaxBlockSize(size_t max) {
29
33
 
30
34
  typedef struct upb_MemBlock {
31
35
  struct upb_MemBlock* next;
32
- // If this block is the head of the list, tracks a growing hint of what the
33
- // *next* block should be; otherwise tracks the size of the actual allocation.
34
- size_t size_or_hint;
36
+ // Size of the actual allocation.
37
+ // Size of 0 means this is a upb_ArenaRef.
38
+ size_t size;
35
39
  // Data follows.
36
40
  } upb_MemBlock;
37
41
 
42
+ // A special block type that indicates a reference to another arena.
43
+ // When this arena is freed, a ref is released on the referenced arena.
44
+ // size must be 0.
45
+ typedef struct upb_ArenaRef {
46
+ upb_MemBlock prefix; // size is always zero
47
+ const upb_Arena* arena;
48
+ #ifndef NDEBUG
49
+ const struct upb_ArenaRef* next_ref;
50
+ #endif
51
+ } upb_ArenaRef;
52
+
38
53
  typedef struct upb_ArenaInternal {
39
54
  // upb_alloc* together with a low bit which signals if there is an initial
40
55
  // block.
41
56
  uintptr_t block_alloc;
42
57
 
58
+ // Linked list of blocks to free/cleanup.
59
+ upb_MemBlock* blocks;
60
+
61
+ #ifndef NDEBUG
62
+ // Stack of pointers to other arenas that this arena owns.
63
+ // Used for debug-only ref cycle checks.
64
+ UPB_ATOMIC(const upb_ArenaRef*) refs;
65
+ #endif
66
+
67
+ // A growing hint of what the *next* block should be sized
68
+ size_t size_hint;
69
+
70
+ // All non atomic members used during allocation must be above this point, and
71
+ // are used by _SwapIn/_SwapOut
72
+
73
+ // Total space allocated in blocks, atomic only for SpaceAllocated
74
+ UPB_ATOMIC(uintptr_t) space_allocated;
75
+
43
76
  // The cleanup for the allocator. This is called after all the blocks are
44
77
  // freed in an arena.
45
78
  upb_AllocCleanupFunc* upb_alloc_cleanup;
@@ -66,13 +99,13 @@ typedef struct upb_ArenaInternal {
66
99
  // such that a->previous_or_tail->next == a.
67
100
  UPB_ATOMIC(uintptr_t) previous_or_tail;
68
101
 
69
- // Linked list of blocks to free/cleanup.
70
- upb_MemBlock* blocks;
71
-
72
- // Total space allocated in blocks, atomic only for SpaceAllocated
73
- UPB_ATOMIC(uintptr_t) space_allocated;
74
-
75
- UPB_TSAN_PUBLISHED_MEMBER
102
+ // We use a different UPB_XSAN_MEMBER than the one in upb_Arena because the
103
+ // two are distinct synchronization domains. The upb_Arena.ptr member is
104
+ // not published in the allocation path, so it is not synchronized with
105
+ // respect to operations performed in this file such as Fuse, Free,
106
+ // SpaceAllocated, etc. This means that it is not safe to read or write
107
+ // the upb_Arena.ptr member in those functions.
108
+ UPB_XSAN_MEMBER
76
109
  } upb_ArenaInternal;
77
110
 
78
111
  // All public + private state for an arena.
@@ -89,17 +122,14 @@ typedef struct {
89
122
  static const size_t kUpb_MemblockReserve =
90
123
  UPB_ALIGN_MALLOC(sizeof(upb_MemBlock));
91
124
 
125
+ static const size_t kUpb_ArenaRefReserve =
126
+ UPB_ALIGN_MALLOC(sizeof(upb_ArenaRef));
127
+
92
128
  // Extracts the (upb_ArenaInternal*) from a (upb_Arena*)
93
129
  static upb_ArenaInternal* upb_Arena_Internal(const upb_Arena* a) {
94
130
  return &((upb_ArenaState*)a)->body;
95
131
  }
96
132
 
97
- // Extracts the (upb_Arena*) from a (upb_ArenaInternal*)
98
- static upb_Arena* upb_Arena_FromInternal(const upb_ArenaInternal* ai) {
99
- ptrdiff_t offset = -offsetof(upb_ArenaState, body);
100
- return UPB_PTR_AT(ai, offset, upb_Arena);
101
- }
102
-
103
133
  static bool _upb_Arena_IsTaggedRefcount(uintptr_t parent_or_count) {
104
134
  return (parent_or_count & 1) == 1;
105
135
  }
@@ -226,7 +256,7 @@ static upb_ArenaRoot _upb_Arena_FindRoot(upb_ArenaInternal* ai) {
226
256
  poc = upb_Atomic_Load(&ai->parent_or_count, memory_order_acquire);
227
257
  do {
228
258
  upb_ArenaInternal* next = _upb_Arena_PointerFromTagged(poc);
229
- UPB_TSAN_CHECK_PUBLISHED(next);
259
+ UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(next));
230
260
  UPB_ASSERT(ai != next);
231
261
  poc = upb_Atomic_Load(&next->parent_or_count, memory_order_acquire);
232
262
 
@@ -260,7 +290,7 @@ uintptr_t upb_Arena_SpaceAllocated(const upb_Arena* arena,
260
290
  upb_ArenaInternal* previous =
261
291
  _upb_Arena_PreviousFromTagged(previous_or_tail);
262
292
  UPB_ASSERT(previous != ai);
263
- UPB_TSAN_CHECK_PUBLISHED(previous);
293
+ UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(previous));
264
294
  // Unfortunate macro behavior; prior to C11 when using nonstandard atomics
265
295
  // this returns a void* and can't be used with += without an intermediate
266
296
  // conversion to an integer.
@@ -273,7 +303,7 @@ uintptr_t upb_Arena_SpaceAllocated(const upb_Arena* arena,
273
303
  local_fused_count++;
274
304
  }
275
305
  while (ai != NULL) {
276
- UPB_TSAN_CHECK_PUBLISHED(ai);
306
+ UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(ai));
277
307
  // Unfortunate macro behavior; prior to C11 when using nonstandard atomics
278
308
  // this returns a void* and can't be used with += without an intermediate
279
309
  // conversion to an integer.
@@ -294,25 +324,59 @@ uint32_t upb_Arena_DebugRefCount(const upb_Arena* a) {
294
324
  return (uint32_t)_upb_Arena_RefCountFromTagged(tagged);
295
325
  }
296
326
 
327
+ #if UPB_ENABLE_REF_CYCLE_CHECKS
328
+
329
+ bool upb_Arena_HasRefChain(const upb_Arena* from, const upb_Arena* to) {
330
+ upb_ArenaInternal* ai = upb_Arena_Internal(from);
331
+ upb_ArenaInternal* current;
332
+
333
+ if (upb_Arena_IsFused(from, to)) return true;
334
+
335
+ // 1. Traverse backward to the start of a consistent segment.
336
+ uintptr_t previous_or_tail =
337
+ upb_Atomic_Load(&ai->previous_or_tail, memory_order_acquire);
338
+ while (_upb_Arena_IsTaggedPrevious(previous_or_tail)) {
339
+ ai = _upb_Arena_PreviousFromTagged(previous_or_tail);
340
+ UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(ai));
341
+ previous_or_tail =
342
+ upb_Atomic_Load(&ai->previous_or_tail, memory_order_acquire);
343
+ }
344
+
345
+ // 2. Traverse forward through all arenas in the fuse group.
346
+ current = ai;
347
+ while (current != NULL) {
348
+ UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(current));
349
+ const upb_ArenaRef* ref =
350
+ upb_Atomic_Load(&current->refs, memory_order_acquire);
351
+ while (ref != NULL) {
352
+ if (ref->arena == to || upb_Arena_HasRefChain(ref->arena, to)) {
353
+ return true;
354
+ }
355
+ ref = ref->next_ref;
356
+ }
357
+ current = upb_Atomic_Load(&current->next, memory_order_acquire);
358
+ }
359
+ return false;
360
+ }
361
+
362
+ #endif
363
+
297
364
  // Adds an allocated block to the head of the list.
298
365
  static void _upb_Arena_AddBlock(upb_Arena* a, void* ptr, size_t offset,
299
366
  size_t block_size) {
300
367
  upb_ArenaInternal* ai = upb_Arena_Internal(a);
301
368
  upb_MemBlock* block = ptr;
302
369
 
303
- block->size_or_hint = block_size;
370
+ block->size = block_size;
304
371
  UPB_ASSERT(offset >= kUpb_MemblockReserve);
305
372
  char* start = UPB_PTR_AT(block, offset, char);
306
373
  upb_MemBlock* head = ai->blocks;
307
- if (head && head->next) {
308
- // Fix up size to match actual allocation size
309
- head->size_or_hint = a->UPB_PRIVATE(end) - (char*)head;
310
- }
311
374
  block->next = head;
312
375
  ai->blocks = block;
376
+ UPB_PRIVATE(upb_Xsan_Init)(UPB_XSAN(a));
313
377
  a->UPB_PRIVATE(ptr) = start;
314
378
  a->UPB_PRIVATE(end) = UPB_PTR_AT(block, block_size, char);
315
- UPB_POISON_MEMORY_REGION(start, a->UPB_PRIVATE(end) - start);
379
+ UPB_PRIVATE(upb_Xsan_PoisonRegion)(start, a->UPB_PRIVATE(end) - start);
316
380
  UPB_ASSERT(UPB_PRIVATE(_upb_ArenaHas)(a) >= block_size - offset);
317
381
  }
318
382
 
@@ -325,7 +389,7 @@ void* UPB_PRIVATE(_upb_Arena_SlowMalloc)(upb_Arena* a, size_t size) {
325
389
  size_t current_free = 0;
326
390
  upb_MemBlock* last_block = ai->blocks;
327
391
  if (last_block) {
328
- last_size = a->UPB_PRIVATE(end) - (char*)last_block;
392
+ last_size = last_block->size;
329
393
  current_free = a->UPB_PRIVATE(end) - a->UPB_PRIVATE(ptr);
330
394
  }
331
395
 
@@ -342,7 +406,7 @@ void* UPB_PRIVATE(_upb_Arena_SlowMalloc)(upb_Arena* a, size_t size) {
342
406
  // allocations, allocate blocks that would net reduce free space behind it.
343
407
  if (last_block && current_free > future_free &&
344
408
  target_size < max_block_size) {
345
- last_size = last_block->size_or_hint;
409
+ last_size = ai->size_hint;
346
410
  // Recalculate sizes with possibly larger last_size
347
411
  target_size = UPB_MIN(last_size * 2, max_block_size);
348
412
  future_free = UPB_MAX(size, target_size - kUpb_MemblockReserve) - size;
@@ -361,18 +425,20 @@ void* UPB_PRIVATE(_upb_Arena_SlowMalloc)(upb_Arena* a, size_t size) {
361
425
  // will reach the max block size. Allocations larger than the max block size
362
426
  // will always get their own backing allocation, so don't include them.
363
427
  if (target_size <= max_block_size) {
364
- last_block->size_or_hint =
365
- UPB_MIN(last_block->size_or_hint + (size >> 1), max_block_size >> 1);
428
+ ai->size_hint = UPB_MIN(ai->size_hint + (size >> 1), max_block_size >> 1);
366
429
  }
367
430
  }
368
431
  // We may need to exceed the max block size if the user requested a large
369
432
  // allocation.
370
433
  size_t block_size = UPB_MAX(kUpb_MemblockReserve + size, target_size);
434
+ upb_alloc* block_alloc = _upb_ArenaInternal_BlockAlloc(ai);
435
+ upb_SizedPtr alloc_result = upb_SizeReturningMalloc(block_alloc, block_size);
371
436
 
372
- upb_MemBlock* block =
373
- upb_malloc(_upb_ArenaInternal_BlockAlloc(ai), block_size);
437
+ if (!alloc_result.p) return NULL;
438
+
439
+ upb_MemBlock* block = alloc_result.p;
440
+ size_t actual_block_size = alloc_result.n;
374
441
 
375
- if (!block) return NULL;
376
442
  // Atomic add not required here, as threads won't race allocating blocks, plus
377
443
  // atomic fetch-add is slower than load/add/store on arm devices compiled
378
444
  // targetting pre-v8.1. Relaxed order is safe as nothing depends on order of
@@ -380,22 +446,25 @@ void* UPB_PRIVATE(_upb_Arena_SlowMalloc)(upb_Arena* a, size_t size) {
380
446
 
381
447
  uintptr_t old_space_allocated =
382
448
  upb_Atomic_Load(&ai->space_allocated, memory_order_relaxed);
383
- upb_Atomic_Store(&ai->space_allocated, old_space_allocated + block_size,
449
+ upb_Atomic_Store(&ai->space_allocated,
450
+ old_space_allocated + actual_block_size,
384
451
  memory_order_relaxed);
385
452
  if (UPB_UNLIKELY(insert_after_head)) {
386
453
  upb_ArenaInternal* ai = upb_Arena_Internal(a);
387
- block->size_or_hint = block_size;
454
+ block->size = actual_block_size;
388
455
  upb_MemBlock* head = ai->blocks;
389
456
  block->next = head->next;
390
457
  head->next = block;
391
458
 
392
459
  char* allocated = UPB_PTR_AT(block, kUpb_MemblockReserve, char);
393
- UPB_POISON_MEMORY_REGION(allocated + size, UPB_ASAN_GUARD_SIZE);
460
+ UPB_PRIVATE(upb_Xsan_PoisonRegion)(allocated + size,
461
+ UPB_PRIVATE(kUpb_Asan_GuardSize));
394
462
  return allocated;
395
463
  } else {
396
- _upb_Arena_AddBlock(a, block, kUpb_MemblockReserve, block_size);
464
+ ai->size_hint = actual_block_size;
465
+ _upb_Arena_AddBlock(a, block, kUpb_MemblockReserve, actual_block_size);
397
466
  UPB_ASSERT(UPB_PRIVATE(_upb_ArenaHas)(a) >= size);
398
- return upb_Arena_Malloc(a, size - UPB_ASAN_GUARD_SIZE);
467
+ return upb_Arena_Malloc(a, size - UPB_PRIVATE(kUpb_Asan_GuardSize));
399
468
  }
400
469
  }
401
470
 
@@ -405,33 +474,42 @@ static upb_Arena* _upb_Arena_InitSlow(upb_alloc* alloc, size_t first_size) {
405
474
  upb_ArenaState* a;
406
475
 
407
476
  // We need to malloc the initial block.
408
- char* mem;
477
+
409
478
  size_t block_size =
410
- first_block_overhead +
411
- UPB_MAX(256, UPB_ALIGN_MALLOC(first_size) + UPB_ASAN_GUARD_SIZE);
412
- if (!alloc || !(mem = upb_malloc(alloc, block_size))) {
479
+ first_block_overhead + UPB_MAX(256, UPB_ALIGN_MALLOC(first_size) +
480
+ UPB_PRIVATE(kUpb_Asan_GuardSize));
481
+ upb_SizedPtr alloc_result;
482
+ if (!alloc ||
483
+ !(alloc_result = upb_SizeReturningMalloc(alloc, block_size)).p) {
413
484
  return NULL;
414
485
  }
486
+ char* mem = alloc_result.p;
487
+ size_t actual_block_size = alloc_result.n;
415
488
 
416
489
  a = UPB_PTR_AT(mem, kUpb_MemblockReserve, upb_ArenaState);
417
-
418
490
  a->body.block_alloc = _upb_Arena_MakeBlockAlloc(alloc, 0);
491
+ a->body.size_hint = actual_block_size;
419
492
  upb_Atomic_Init(&a->body.parent_or_count, _upb_Arena_TaggedFromRefcount(1));
420
493
  upb_Atomic_Init(&a->body.next, NULL);
421
494
  upb_Atomic_Init(&a->body.previous_or_tail,
422
495
  _upb_Arena_TaggedFromTail(&a->body));
423
- upb_Atomic_Init(&a->body.space_allocated, block_size);
496
+ upb_Atomic_Init(&a->body.space_allocated, actual_block_size);
424
497
  a->body.blocks = NULL;
498
+ #ifndef NDEBUG
499
+ a->body.refs = NULL;
500
+ #endif
425
501
  a->body.upb_alloc_cleanup = NULL;
426
- UPB_TSAN_INIT_PUBLISHED(&a->body);
502
+ UPB_PRIVATE(upb_Xsan_Init)(UPB_XSAN(&a->body));
427
503
 
428
- _upb_Arena_AddBlock(&a->head, mem, first_block_overhead, block_size);
504
+ _upb_Arena_AddBlock(&a->head, mem, first_block_overhead, actual_block_size);
429
505
 
430
506
  return &a->head;
431
507
  }
432
508
 
433
509
  upb_Arena* upb_Arena_Init(void* mem, size_t n, upb_alloc* alloc) {
434
- UPB_ASSERT(sizeof(void*) * UPB_ARENA_SIZE_HACK >= sizeof(upb_ArenaState));
510
+ UPB_STATIC_ASSERT(
511
+ sizeof(void*) * UPB_ARENA_SIZE_HACK >= sizeof(upb_ArenaState),
512
+ "Need to update UPB_ARENA_SIZE_HACK");
435
513
  upb_ArenaState* a;
436
514
 
437
515
  if (mem) {
@@ -457,11 +535,15 @@ upb_Arena* upb_Arena_Init(void* mem, size_t n, upb_alloc* alloc) {
457
535
  _upb_Arena_TaggedFromTail(&a->body));
458
536
  upb_Atomic_Init(&a->body.space_allocated, 0);
459
537
  a->body.blocks = NULL;
538
+ #ifndef NDEBUG
539
+ a->body.refs = NULL;
540
+ #endif
541
+ a->body.size_hint = 128;
460
542
  a->body.upb_alloc_cleanup = NULL;
461
543
  a->body.block_alloc = _upb_Arena_MakeBlockAlloc(alloc, 1);
462
544
  a->head.UPB_PRIVATE(ptr) = (void*)UPB_ALIGN_MALLOC((uintptr_t)(a + 1));
463
545
  a->head.UPB_PRIVATE(end) = UPB_PTR_AT(mem, n, char);
464
- UPB_TSAN_INIT_PUBLISHED(&a->body);
546
+ UPB_PRIVATE(upb_Xsan_Init)(UPB_XSAN(&a->body));
465
547
  #ifdef UPB_TRACING_ENABLED
466
548
  upb_Arena_LogInit(&a->head, n);
467
549
  #endif
@@ -471,26 +553,31 @@ upb_Arena* upb_Arena_Init(void* mem, size_t n, upb_alloc* alloc) {
471
553
  static void _upb_Arena_DoFree(upb_ArenaInternal* ai) {
472
554
  UPB_ASSERT(_upb_Arena_RefCountFromTagged(ai->parent_or_count) == 1);
473
555
  while (ai != NULL) {
474
- UPB_TSAN_CHECK_PUBLISHED(ai);
475
- // Load first since arena itself is likely from one of its blocks.
556
+ UPB_PRIVATE(upb_Xsan_AccessReadWrite)(UPB_XSAN(ai));
557
+ // Load first since arena itself is likely from one of its blocks. Relaxed
558
+ // order is safe because fused arena ordering is provided by the reference
559
+ // count, and fuse is not permitted to race with the final decrement.
476
560
  upb_ArenaInternal* next_arena =
477
- (upb_ArenaInternal*)upb_Atomic_Load(&ai->next, memory_order_acquire);
561
+ (upb_ArenaInternal*)upb_Atomic_Load(&ai->next, memory_order_relaxed);
478
562
  // Freeing may have memory barriers that confuse tsan, so assert immediately
479
563
  // after load here
480
564
  if (next_arena) {
481
- UPB_TSAN_CHECK_PUBLISHED(next_arena);
565
+ UPB_PRIVATE(upb_Xsan_AccessReadWrite)(UPB_XSAN(next_arena));
482
566
  }
483
567
  upb_alloc* block_alloc = _upb_ArenaInternal_BlockAlloc(ai);
484
568
  upb_MemBlock* block = ai->blocks;
485
- if (block && block->next) {
486
- block->size_or_hint =
487
- upb_Arena_FromInternal(ai)->UPB_PRIVATE(end) - (char*)block;
488
- }
489
569
  upb_AllocCleanupFunc* alloc_cleanup = *ai->upb_alloc_cleanup;
490
570
  while (block != NULL) {
491
571
  // Load first since we are deleting block.
492
572
  upb_MemBlock* next_block = block->next;
493
- upb_free_sized(block_alloc, block, block->size_or_hint);
573
+ if (block->size == 0) {
574
+ // If the block is an arena ref, then we need to release our ref on the
575
+ // referenced arena.
576
+ upb_ArenaRef* ref = (upb_ArenaRef*)block;
577
+ upb_Arena_DecRefFor((upb_Arena*)ref->arena, ai);
578
+ } else {
579
+ upb_free_sized(block_alloc, block, block->size);
580
+ }
494
581
  block = next_block;
495
582
  }
496
583
  if (alloc_cleanup != NULL) {
@@ -508,7 +595,7 @@ void upb_Arena_Free(upb_Arena* a) {
508
595
  retry:
509
596
  while (_upb_Arena_IsTaggedPointer(poc)) {
510
597
  ai = _upb_Arena_PointerFromTagged(poc);
511
- UPB_TSAN_CHECK_PUBLISHED(ai);
598
+ UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(ai));
512
599
  poc = upb_Atomic_Load(&ai->parent_or_count, memory_order_acquire);
513
600
  }
514
601
 
@@ -545,7 +632,7 @@ retry:
545
632
  // The caller is therefore guaranteed that ret->next == child.
546
633
  static upb_ArenaInternal* _upb_Arena_LinkForward(
547
634
  upb_ArenaInternal* const parent, upb_ArenaInternal* child) {
548
- UPB_TSAN_CHECK_PUBLISHED(parent);
635
+ UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(parent));
549
636
  uintptr_t parent_previous_or_tail =
550
637
  upb_Atomic_Load(&parent->previous_or_tail, memory_order_acquire);
551
638
 
@@ -563,7 +650,7 @@ static upb_ArenaInternal* _upb_Arena_LinkForward(
563
650
  ? _upb_Arena_TailFromTagged(parent_previous_or_tail)
564
651
  : parent;
565
652
 
566
- UPB_TSAN_CHECK_PUBLISHED(parent_tail);
653
+ UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(parent_tail));
567
654
  upb_ArenaInternal* parent_tail_next =
568
655
  upb_Atomic_Load(&parent_tail->next, memory_order_acquire);
569
656
 
@@ -571,7 +658,7 @@ static upb_ArenaInternal* _upb_Arena_LinkForward(
571
658
  // Walk the list to find the true tail (a node with next == NULL).
572
659
  while (parent_tail_next != NULL) {
573
660
  parent_tail = parent_tail_next;
574
- UPB_TSAN_CHECK_PUBLISHED(parent_tail);
661
+ UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(parent_tail));
575
662
  parent_tail_next =
576
663
  upb_Atomic_Load(&parent_tail->next, memory_order_acquire);
577
664
  }
@@ -601,7 +688,7 @@ void _upb_Arena_UpdateParentTail(upb_ArenaInternal* parent,
601
688
  upb_Atomic_Load(&child->previous_or_tail, memory_order_acquire);
602
689
  upb_ArenaInternal* new_parent_tail =
603
690
  _upb_Arena_TailFromTagged(child_previous_or_tail);
604
- UPB_TSAN_CHECK_PUBLISHED(new_parent_tail);
691
+ UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(new_parent_tail));
605
692
 
606
693
  // If another thread fused with parent, such that it is no longer a root,
607
694
  // don't overwrite their previous pointer with our tail. Relaxed order is fine
@@ -647,7 +734,7 @@ static void _upb_Arena_DoFuseArenaLists(upb_ArenaInternal* const parent,
647
734
  }
648
735
 
649
736
  void upb_Arena_SetAllocCleanup(upb_Arena* a, upb_AllocCleanupFunc* func) {
650
- UPB_TSAN_CHECK_READ(a->UPB_ONLYBITS(ptr));
737
+ UPB_PRIVATE(upb_Xsan_AccessReadWrite)(UPB_XSAN(a));
651
738
  upb_ArenaInternal* ai = upb_Arena_Internal(a);
652
739
  UPB_ASSERT(ai->upb_alloc_cleanup == NULL);
653
740
  ai->upb_alloc_cleanup = func;
@@ -765,6 +852,9 @@ bool upb_Arena_Fuse(const upb_Arena* a1, const upb_Arena* a2) {
765
852
  while (true) {
766
853
  upb_ArenaInternal* new_root = _upb_Arena_DoFuse(&ai1, &ai2, &ref_delta);
767
854
  if (new_root != NULL && _upb_Arena_FixupRefs(new_root, ref_delta)) {
855
+ #if UPB_ENABLE_REF_CYCLE_CHECKS
856
+ UPB_ASSERT(!upb_Arena_HasRefChain(a1, a2));
857
+ #endif
768
858
  return true;
769
859
  }
770
860
  }
@@ -814,35 +904,97 @@ void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner) {
814
904
  upb_Arena_Free((upb_Arena*)a);
815
905
  }
816
906
 
907
+ bool upb_Arena_RefArena(upb_Arena* from, const upb_Arena* to) {
908
+ UPB_ASSERT(!upb_Arena_IsFused(from, to));
909
+ if (_upb_ArenaInternal_HasInitialBlock(upb_Arena_Internal(to))) {
910
+ // We can't increment a ref to `to`, so return early.
911
+ return false;
912
+ }
913
+
914
+ upb_ArenaInternal* ai = upb_Arena_Internal(from);
915
+ upb_ArenaRef* ref = upb_Arena_Malloc(from, kUpb_ArenaRefReserve);
916
+
917
+ if (!ref) {
918
+ return false;
919
+ }
920
+
921
+ // When 'from' is freed, a ref on 'to' will be released.
922
+ // Intentionally ignore return value, since we already check up above if this
923
+ // call will succeed.
924
+ bool result = upb_Arena_IncRefFor(to, from);
925
+ UPB_ASSERT(result);
926
+
927
+ // When we add a reference from `from` to `to`, we need to keep track of the
928
+ // ref in the `from` arena's linked list of refs. This allows us to
929
+ // walk all refs for `from` when `from` is freed, and thus allows us to
930
+ // decrement the refcount on `to` when `from` is freed.
931
+ ref->prefix.next = ai->blocks;
932
+ ref->prefix.size = 0;
933
+ ref->arena = to;
934
+ ai->blocks = (upb_MemBlock*)ref;
935
+
936
+ #ifndef NDEBUG
937
+ // Add to the dedicated list of refs.
938
+ // This function is not thread-safe from `from`, so a simple load/store is
939
+ // sufficient.
940
+ ref->next_ref = upb_Atomic_Load(&ai->refs, memory_order_relaxed);
941
+ upb_Atomic_Store(&ai->refs, ref, memory_order_release);
942
+ #endif
943
+
944
+ #if UPB_ENABLE_REF_CYCLE_CHECKS
945
+ UPB_ASSERT(!upb_Arena_HasRefChain(to, from)); // Forbid cycles.
946
+ #endif
947
+
948
+ return true;
949
+ }
950
+
951
+ #ifndef NDEBUG
952
+ bool upb_Arena_HasRef(const upb_Arena* from, const upb_Arena* to) {
953
+ const upb_ArenaInternal* ai = upb_Arena_Internal(from);
954
+ const upb_ArenaRef* ref = upb_Atomic_Load(&ai->refs, memory_order_acquire);
955
+ while (ref != NULL) {
956
+ if (upb_Arena_IsFused(ref->arena, to)) {
957
+ return true;
958
+ }
959
+ ref = ref->next_ref;
960
+ }
961
+ return false;
962
+ }
963
+ #endif
964
+
817
965
  upb_alloc* upb_Arena_GetUpbAlloc(upb_Arena* a) {
818
- UPB_TSAN_CHECK_READ(a->UPB_ONLYBITS(ptr));
966
+ UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(a));
819
967
  upb_ArenaInternal* ai = upb_Arena_Internal(a);
820
968
  return _upb_ArenaInternal_BlockAlloc(ai);
821
969
  }
822
970
 
823
971
  void UPB_PRIVATE(_upb_Arena_SwapIn)(upb_Arena* des, const upb_Arena* src) {
972
+ memcpy(des, src, offsetof(upb_ArenaState, body.space_allocated));
824
973
  upb_ArenaInternal* desi = upb_Arena_Internal(des);
825
974
  upb_ArenaInternal* srci = upb_Arena_Internal(src);
826
-
827
- *des = *src;
828
- desi->block_alloc = srci->block_alloc;
829
- desi->blocks = srci->blocks;
975
+ uintptr_t new_space_allocated =
976
+ upb_Atomic_Load(&srci->space_allocated, memory_order_relaxed);
977
+ upb_Atomic_Store(&desi->space_allocated, new_space_allocated,
978
+ memory_order_relaxed);
830
979
  }
831
980
 
832
981
  void UPB_PRIVATE(_upb_Arena_SwapOut)(upb_Arena* des, const upb_Arena* src) {
833
- upb_ArenaInternal* desi = upb_Arena_Internal(des);
834
- upb_ArenaInternal* srci = upb_Arena_Internal(src);
835
-
836
- *des = *src;
837
- desi->blocks = srci->blocks;
982
+ UPB_PRIVATE(_upb_Arena_SwapIn)(des, src);
838
983
  }
839
984
 
840
985
  bool _upb_Arena_WasLastAlloc(struct upb_Arena* a, void* ptr, size_t oldsize) {
841
986
  upb_ArenaInternal* ai = upb_Arena_Internal(a);
842
987
  upb_MemBlock* block = ai->blocks;
843
988
  if (block == NULL) return false;
989
+ // Skip any arena refs.
990
+ while (block != NULL && block->size == 0) {
991
+ block = block->next;
992
+ }
993
+ if (block == NULL) return false;
844
994
  block = block->next;
845
995
  if (block == NULL) return false;
846
996
  char* start = UPB_PTR_AT(block, kUpb_MemblockReserve, char);
847
- return ptr == start && oldsize == block->size_or_hint - kUpb_MemblockReserve;
997
+ return UPB_PRIVATE(upb_Xsan_PtrEq)(ptr, start) &&
998
+ UPB_PRIVATE(_upb_Arena_AllocSpan)(oldsize) ==
999
+ block->size - kUpb_MemblockReserve;
848
1000
  }
@@ -72,11 +72,67 @@ bool upb_Arena_IncRefFor(const upb_Arena* a, const void* owner);
72
72
  // This operation is safe to use concurrently from multiple threads.
73
73
  void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner);
74
74
 
75
+ // Creates a reference between the arenas `from` and `to`, guaranteeing that
76
+ // the latter will not be freed until `from` is freed.
77
+ //
78
+ // Users must avoid all of the following error conditions, which will be
79
+ // checked in debug mode but are UB in opt:
80
+ //
81
+ // - Creating reference cycles between arenas.
82
+ // - Creating a reference between two arenas that are fused, either now
83
+ // or in the future.
84
+ //
85
+ // Creating a reference multiple times between the same two arenas is not UB but
86
+ // is considered wasteful and may be disallowed in the future.
87
+ //
88
+ // Note that fuses can participate in reference cycles. The following set of
89
+ // calls creates a cycle A -> B -> C -> A
90
+ // Fuse(A, B);
91
+ // Ref(B, C);
92
+ // Ref(C, A);
93
+ //
94
+ // From this perspective, the second rule is just a special-case of the first.
95
+ // This set of calls is disallowed because it is effectively creating a
96
+ // cycle A -> B -> A
97
+ // Fuse(A, B);
98
+ // Ref(B, A);
99
+ //
100
+ // Fuse is special because it creates what is effectively a bidirectional
101
+ // ref, but it is not considered a cycle and will be collected correctly.
102
+ //
103
+ // Note that `from` is not `const`, so it may not be called concurrently
104
+ // with any other function on `from`.
105
+ //
106
+ // Returns whether the reference was created successfully.
107
+ bool upb_Arena_RefArena(upb_Arena* from, const upb_Arena* to);
108
+
109
+ #ifndef NDEBUG
110
+ // Returns true if upb_Arena_RefArena(from, to) was previously called.
111
+ // Note that this does not take fuses into account, and it does not follow
112
+ // chains of references; it must have been these two arenas exactly that
113
+ // created a reference.
114
+ bool upb_Arena_HasRef(const upb_Arena* from, const upb_Arena* to);
115
+ #endif
116
+
75
117
  // This operation is safe to use concurrently from multiple threads.
76
118
  uintptr_t upb_Arena_SpaceAllocated(const upb_Arena* a, size_t* fused_count);
77
119
  // This operation is safe to use concurrently from multiple threads.
78
120
  uint32_t upb_Arena_DebugRefCount(const upb_Arena* a);
79
121
 
122
+ #if UPB_ENABLE_REF_CYCLE_CHECKS
123
+ // Returns true if there is a chain of arena refs that spans `from` -> `to`.
124
+ // Fused arenas are taken into account; for example, this series of calls
125
+ // will cause the function to return true:
126
+ //
127
+ // 1. upb_Arena_Fuse(a, b)
128
+ // 2. upb_Arena_RefArena(from, a)
129
+ // 3. upb_Arena_RefArena(b, to)
130
+ //
131
+ // However this function does not return true if `from` and `to` are directly
132
+ // fused.
133
+ bool upb_Arena_HasRefChain(const upb_Arena* from, const upb_Arena* to);
134
+ #endif
135
+
80
136
  UPB_API_INLINE upb_Arena* upb_Arena_New(void) {
81
137
  return upb_Arena_Init(NULL, 0, &upb_alloc_global);
82
138
  }
@@ -36,6 +36,12 @@ class Arena {
36
36
  // block.
37
37
  bool Fuse(Arena& other) { return upb_Arena_Fuse(ptr(), other.ptr()); }
38
38
 
39
+ bool IsFused(Arena& other) const {
40
+ return upb_Arena_IsFused(ptr(), other.ptr());
41
+ }
42
+
43
+ void RefArena(const Arena& to) { upb_Arena_RefArena(ptr(), to.ptr()); }
44
+
39
45
  protected:
40
46
  std::unique_ptr<upb_Arena, decltype(&upb_Arena_Free)> ptr_;
41
47
  };