grpc 1.33.0.pre1 → 1.34.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (533) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +342 -134
  3. data/include/grpc/grpc.h +1 -2
  4. data/include/grpc/grpc_security.h +149 -172
  5. data/include/grpc/impl/codegen/grpc_types.h +9 -2
  6. data/include/grpc/impl/codegen/port_platform.h +22 -55
  7. data/src/core/ext/filters/client_channel/client_channel.cc +11 -34
  8. data/src/core/ext/filters/client_channel/config_selector.h +2 -3
  9. data/src/core/ext/filters/client_channel/health/health_check_client.cc +4 -1
  10. data/src/core/ext/filters/client_channel/health/health_check_client.h +2 -2
  11. data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +1 -1
  12. data/src/core/ext/filters/client_channel/lb_policy.cc +5 -1
  13. data/src/core/ext/filters/client_channel/lb_policy.h +3 -3
  14. data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +1 -1
  15. data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +1 -1
  16. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +80 -71
  17. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +3 -1
  18. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +2 -2
  19. data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +47 -17
  20. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +2 -2
  21. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +8 -5
  22. data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +3 -3
  23. data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +1 -1
  24. data/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc +16 -243
  25. data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +53 -17
  26. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +809 -0
  27. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +20 -25
  28. data/src/core/ext/filters/client_channel/resolver.cc +3 -1
  29. data/src/core/ext/filters/client_channel/resolver.h +4 -1
  30. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +1 -1
  31. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +1 -1
  32. data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +1 -1
  33. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +1 -1
  34. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +1 -1
  35. data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +20 -0
  36. data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +66 -7
  37. data/src/core/ext/filters/client_channel/resolver_registry.cc +4 -4
  38. data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +13 -25
  39. data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +1 -1
  40. data/src/core/ext/filters/client_channel/resolving_lb_policy.h +2 -2
  41. data/src/core/ext/filters/client_channel/retry_throttle.h +1 -1
  42. data/src/core/ext/filters/client_channel/server_address.h +0 -4
  43. data/src/core/ext/filters/client_channel/service_config.cc +3 -1
  44. data/src/core/ext/filters/client_channel/service_config.h +1 -1
  45. data/src/core/ext/filters/client_channel/subchannel.cc +18 -15
  46. data/src/core/ext/filters/client_channel/subchannel.h +2 -2
  47. data/src/core/ext/filters/client_channel/subchannel_interface.h +7 -15
  48. data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +6 -2
  49. data/src/core/ext/filters/deadline/deadline_filter.cc +83 -77
  50. data/src/core/ext/filters/deadline/deadline_filter.h +7 -11
  51. data/src/core/ext/filters/http/client/http_client_filter.cc +1 -1
  52. data/src/core/ext/filters/http/server/http_server_filter.cc +3 -3
  53. data/src/core/ext/filters/max_age/max_age_filter.cc +1 -1
  54. data/src/core/ext/transport/chttp2/client/chttp2_connector.h +1 -1
  55. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +17 -3
  56. data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +7 -7
  57. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +4 -24
  58. data/src/core/ext/transport/chttp2/transport/flow_control.h +2 -2
  59. data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +2 -1
  60. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +12 -8
  61. data/src/core/ext/transport/chttp2/transport/internal.h +0 -1
  62. data/src/core/ext/transport/chttp2/transport/parsing.cc +2 -1
  63. data/src/core/ext/transport/chttp2/transport/writing.cc +1 -2
  64. data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +38 -0
  65. data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h +30 -0
  66. data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c +41 -0
  67. data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h +35 -0
  68. data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +254 -0
  69. data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h +105 -0
  70. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +100 -0
  71. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h +45 -0
  72. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +558 -0
  73. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +145 -0
  74. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c +53 -0
  75. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h +35 -0
  76. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c +133 -0
  77. data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h +35 -0
  78. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +127 -0
  79. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +65 -0
  80. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c +56 -0
  81. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h +35 -0
  82. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +266 -0
  83. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +125 -0
  84. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +143 -0
  85. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h +55 -0
  86. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c +56 -0
  87. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h +35 -0
  88. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c +66 -0
  89. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h +40 -0
  90. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c +263 -0
  91. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h +100 -0
  92. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +233 -0
  93. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h +70 -0
  94. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c +56 -0
  95. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h +35 -0
  96. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +228 -0
  97. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +80 -0
  98. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c +46 -0
  99. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h +35 -0
  100. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +59 -0
  101. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +35 -0
  102. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +55 -0
  103. data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h +35 -0
  104. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c +110 -0
  105. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h +50 -0
  106. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +113 -0
  107. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +50 -0
  108. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c +146 -0
  109. data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h +55 -0
  110. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c +50 -0
  111. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h +35 -0
  112. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +190 -0
  113. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +55 -0
  114. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +185 -0
  115. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h +65 -0
  116. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +62 -0
  117. data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h +40 -0
  118. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +97 -0
  119. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +40 -0
  120. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +915 -0
  121. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +280 -0
  122. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c +71 -0
  123. data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h +45 -0
  124. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c +64 -0
  125. data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h +40 -0
  126. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +511 -0
  127. data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +115 -0
  128. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c +48 -0
  129. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h +30 -0
  130. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +166 -0
  131. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +55 -0
  132. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +105 -0
  133. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h +45 -0
  134. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +249 -0
  135. data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h +60 -0
  136. data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c +72 -0
  137. data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h +35 -0
  138. data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c +60 -0
  139. data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h +35 -0
  140. data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +152 -0
  141. data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h +60 -0
  142. data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c +83 -0
  143. data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h +35 -0
  144. data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c +82 -0
  145. data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h +35 -0
  146. data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c +83 -0
  147. data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h +40 -0
  148. data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c +86 -0
  149. data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h +35 -0
  150. data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c +74 -0
  151. data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h +35 -0
  152. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c +64 -0
  153. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h +40 -0
  154. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c +54 -0
  155. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h +35 -0
  156. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c +53 -0
  157. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h +35 -0
  158. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +73 -0
  159. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h +45 -0
  160. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c +72 -0
  161. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h +40 -0
  162. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c +81 -0
  163. data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h +45 -0
  164. data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c +92 -0
  165. data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h +65 -0
  166. data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c +95 -0
  167. data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h +55 -0
  168. data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c +34 -0
  169. data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h +30 -0
  170. data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c +59 -0
  171. data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h +40 -0
  172. data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c +54 -0
  173. data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h +45 -0
  174. data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c +47 -0
  175. data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h +35 -0
  176. data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c +40 -0
  177. data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h +30 -0
  178. data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c +61 -0
  179. data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h +45 -0
  180. data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c +38 -0
  181. data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h +35 -0
  182. data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +386 -0
  183. data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h +165 -0
  184. data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c +39 -0
  185. data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h +35 -0
  186. data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c +37 -0
  187. data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h +35 -0
  188. data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c +65 -0
  189. data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h +50 -0
  190. data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c +39 -0
  191. data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h +35 -0
  192. data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c +66 -0
  193. data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h +75 -0
  194. data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +42 -0
  195. data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h +35 -0
  196. data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c +70 -0
  197. data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h +45 -0
  198. data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c +56 -0
  199. data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h +35 -0
  200. data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c +33 -0
  201. data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h +30 -0
  202. data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c +49 -0
  203. data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h +35 -0
  204. data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c +43 -0
  205. data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h +35 -0
  206. data/src/core/ext/upbdefs-generated/udpa/core/v1/authority.upbdefs.c +42 -0
  207. data/src/core/ext/upbdefs-generated/udpa/core/v1/authority.upbdefs.h +35 -0
  208. data/src/core/ext/upbdefs-generated/udpa/core/v1/collection_entry.upbdefs.c +62 -0
  209. data/src/core/ext/upbdefs-generated/udpa/core/v1/collection_entry.upbdefs.h +40 -0
  210. data/src/core/ext/upbdefs-generated/udpa/core/v1/context_params.upbdefs.c +45 -0
  211. data/src/core/ext/upbdefs-generated/udpa/core/v1/context_params.upbdefs.h +40 -0
  212. data/src/core/ext/upbdefs-generated/udpa/core/v1/resource.upbdefs.c +49 -0
  213. data/src/core/ext/upbdefs-generated/udpa/core/v1/resource.upbdefs.h +35 -0
  214. data/src/core/ext/upbdefs-generated/udpa/core/v1/resource_locator.upbdefs.c +68 -0
  215. data/src/core/ext/upbdefs-generated/udpa/core/v1/resource_locator.upbdefs.h +40 -0
  216. data/src/core/ext/upbdefs-generated/udpa/core/v1/resource_name.upbdefs.c +51 -0
  217. data/src/core/ext/upbdefs-generated/udpa/core/v1/resource_name.upbdefs.h +35 -0
  218. data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +307 -0
  219. data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h +145 -0
  220. data/src/core/ext/xds/certificate_provider_factory.h +7 -5
  221. data/src/core/ext/xds/certificate_provider_store.cc +84 -0
  222. data/src/core/ext/xds/certificate_provider_store.h +65 -8
  223. data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +119 -0
  224. data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +72 -0
  225. data/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc +28 -140
  226. data/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h +6 -4
  227. data/src/core/ext/xds/xds_api.cc +241 -718
  228. data/src/core/ext/xds/xds_api.h +50 -9
  229. data/src/core/ext/xds/xds_bootstrap.cc +172 -25
  230. data/src/core/ext/xds/xds_bootstrap.h +23 -7
  231. data/src/core/ext/xds/xds_certificate_provider.cc +240 -0
  232. data/src/core/ext/xds/xds_certificate_provider.h +74 -0
  233. data/src/core/ext/xds/xds_client.cc +161 -128
  234. data/src/core/ext/xds/xds_client.h +12 -11
  235. data/src/core/ext/xds/xds_client_stats.cc +41 -4
  236. data/src/core/ext/xds/xds_client_stats.h +2 -2
  237. data/src/core/lib/channel/channel_args.cc +2 -1
  238. data/src/core/lib/channel/channel_trace.cc +4 -2
  239. data/src/core/lib/channel/channelz.h +2 -2
  240. data/src/core/lib/channel/handshaker.h +2 -2
  241. data/src/core/lib/compression/compression.cc +8 -4
  242. data/src/core/lib/compression/compression_internal.cc +10 -5
  243. data/src/core/lib/compression/compression_internal.h +2 -1
  244. data/src/core/lib/compression/stream_compression_identity.cc +1 -3
  245. data/src/core/lib/debug/stats_data.cc +1 -0
  246. data/src/core/lib/gpr/cpu_iphone.cc +10 -2
  247. data/src/core/lib/gpr/log_linux.cc +17 -3
  248. data/src/core/lib/gpr/log_posix.cc +13 -1
  249. data/src/core/lib/gpr/log_windows.cc +16 -4
  250. data/src/core/lib/gpr/murmur_hash.cc +1 -1
  251. data/src/core/lib/gpr/string.cc +1 -1
  252. data/src/core/lib/gpr/time_precise.cc +3 -2
  253. data/src/core/lib/gpr/tls.h +4 -0
  254. data/src/core/lib/gpr/tls_msvc.h +2 -0
  255. data/src/core/lib/gpr/tls_stdcpp.h +48 -0
  256. data/src/core/lib/gpr/useful.h +5 -4
  257. data/src/core/lib/gprpp/dual_ref_counted.h +44 -49
  258. data/src/core/lib/gprpp/examine_stack.cc +43 -0
  259. data/src/core/lib/gprpp/examine_stack.h +46 -0
  260. data/src/core/lib/gprpp/fork.cc +2 -2
  261. data/src/core/lib/gprpp/manual_constructor.h +1 -1
  262. data/src/core/lib/gprpp/orphanable.h +4 -8
  263. data/src/core/lib/gprpp/ref_counted.h +40 -46
  264. data/src/core/lib/gprpp/ref_counted_ptr.h +9 -11
  265. data/src/core/lib/{security/authorization/mock_cel/statusor.h → gprpp/stat.h} +13 -25
  266. data/src/core/lib/gprpp/stat_posix.cc +49 -0
  267. data/src/core/lib/gprpp/stat_windows.cc +48 -0
  268. data/src/core/lib/gprpp/thd.h +2 -2
  269. data/src/core/lib/gprpp/thd_posix.cc +36 -36
  270. data/src/core/lib/http/parser.cc +46 -25
  271. data/src/core/lib/iomgr/error.cc +2 -1
  272. data/src/core/lib/iomgr/ev_epollex_linux.cc +8 -4
  273. data/src/core/lib/iomgr/exec_ctx.cc +1 -1
  274. data/src/core/lib/iomgr/executor/mpmcqueue.h +5 -5
  275. data/src/core/lib/iomgr/executor/threadpool.h +3 -3
  276. data/src/core/lib/iomgr/parse_address.cc +84 -6
  277. data/src/core/lib/iomgr/parse_address.h +20 -0
  278. data/src/core/lib/iomgr/poller/eventmanager_libuv.cc +2 -1
  279. data/src/core/lib/iomgr/python_util.h +3 -3
  280. data/src/core/lib/iomgr/resolve_address_posix.cc +1 -5
  281. data/src/core/lib/iomgr/tcp_posix.cc +3 -2
  282. data/src/core/lib/iomgr/timer_custom.cc +2 -2
  283. data/src/core/lib/iomgr/unix_sockets_posix.cc +27 -15
  284. data/src/core/lib/iomgr/unix_sockets_posix.h +5 -0
  285. data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +7 -0
  286. data/src/core/lib/iomgr/wakeup_fd_pipe.cc +2 -2
  287. data/src/core/lib/json/json.h +2 -2
  288. data/src/core/lib/json/json_reader.cc +8 -4
  289. data/src/core/lib/json/json_util.h +167 -0
  290. data/src/core/lib/json/json_writer.cc +2 -1
  291. data/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h +3 -1
  292. data/src/core/lib/security/authorization/mock_cel/cel_expression.h +5 -4
  293. data/src/core/lib/security/authorization/mock_cel/cel_value.h +4 -0
  294. data/src/core/lib/security/authorization/mock_cel/evaluator_core.h +6 -6
  295. data/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h +10 -9
  296. data/src/core/lib/security/context/security_context.h +3 -1
  297. data/src/core/lib/security/credentials/credentials.cc +1 -1
  298. data/src/core/lib/security/credentials/credentials.h +3 -3
  299. data/src/core/lib/security/credentials/external/aws_request_signer.cc +208 -0
  300. data/src/core/lib/security/credentials/external/aws_request_signer.h +73 -0
  301. data/src/core/lib/security/credentials/external/external_account_credentials.cc +311 -0
  302. data/src/core/lib/security/credentials/external/external_account_credentials.h +118 -0
  303. data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +136 -0
  304. data/src/core/lib/security/credentials/external/file_external_account_credentials.h +49 -0
  305. data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +211 -0
  306. data/src/core/lib/security/credentials/external/url_external_account_credentials.h +59 -0
  307. data/src/core/lib/security/credentials/insecure/insecure_credentials.cc +51 -0
  308. data/src/core/lib/security/credentials/jwt/json_token.cc +5 -2
  309. data/src/core/lib/security/credentials/jwt/jwt_credentials.h +4 -3
  310. data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +5 -1
  311. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +2 -2
  312. data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +35 -5
  313. data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +12 -8
  314. data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +78 -0
  315. data/src/core/lib/security/{certificate_provider.h → credentials/tls/grpc_tls_certificate_provider.h} +32 -18
  316. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +77 -149
  317. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +58 -187
  318. data/src/core/lib/security/credentials/tls/tls_credentials.cc +16 -12
  319. data/src/core/lib/security/credentials/tls/tls_credentials.h +2 -2
  320. data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +2 -2
  321. data/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +88 -0
  322. data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +70 -0
  323. data/src/core/lib/security/security_connector/load_system_roots.h +4 -0
  324. data/src/core/lib/security/security_connector/load_system_roots_linux.h +2 -0
  325. data/src/core/lib/security/security_connector/local/local_security_connector.cc +2 -2
  326. data/src/core/lib/security/security_connector/security_connector.cc +1 -1
  327. data/src/core/lib/security/security_connector/security_connector.h +4 -2
  328. data/src/core/lib/security/security_connector/ssl_utils.h +4 -2
  329. data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +293 -275
  330. data/src/core/lib/security/security_connector/tls/tls_security_connector.h +106 -61
  331. data/src/core/lib/security/transport/security_handshaker.cc +1 -1
  332. data/src/core/lib/security/transport/server_auth_filter.cc +2 -1
  333. data/src/core/lib/security/util/json_util.h +1 -0
  334. data/src/core/lib/slice/slice.cc +7 -4
  335. data/src/core/lib/slice/slice_buffer.cc +2 -1
  336. data/src/core/lib/slice/slice_intern.cc +2 -2
  337. data/src/core/lib/surface/call.cc +9 -8
  338. data/src/core/lib/surface/completion_queue.cc +7 -6
  339. data/src/core/lib/surface/server.cc +4 -2
  340. data/src/core/lib/surface/server.h +2 -2
  341. data/src/core/lib/surface/validate_metadata.h +3 -0
  342. data/src/core/lib/surface/version.cc +2 -2
  343. data/src/core/lib/transport/authority_override.h +2 -0
  344. data/src/core/lib/transport/bdp_estimator.cc +1 -1
  345. data/src/core/lib/transport/byte_stream.h +3 -3
  346. data/src/core/lib/transport/connectivity_state.h +3 -3
  347. data/src/core/lib/transport/metadata.h +2 -2
  348. data/src/core/lib/transport/timeout_encoding.cc +4 -4
  349. data/src/core/lib/transport/transport.cc +5 -3
  350. data/src/core/lib/transport/transport.h +1 -1
  351. data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -4
  352. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +4 -3
  353. data/src/core/tsi/fake_transport_security.cc +1 -0
  354. data/src/core/tsi/local_transport_security.cc +5 -1
  355. data/src/core/tsi/local_transport_security.h +6 -7
  356. data/src/core/tsi/ssl/session_cache/ssl_session.h +3 -0
  357. data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +4 -1
  358. data/src/core/tsi/ssl_transport_security.cc +14 -7
  359. data/src/core/tsi/ssl_transport_security.h +3 -0
  360. data/src/core/tsi/transport_security.cc +4 -2
  361. data/src/ruby/ext/grpc/extconf.rb +1 -1
  362. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +22 -14
  363. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +36 -24
  364. data/src/ruby/lib/grpc/version.rb +1 -1
  365. data/third_party/abseil-cpp/absl/algorithm/container.h +59 -22
  366. data/third_party/abseil-cpp/absl/base/attributes.h +99 -38
  367. data/third_party/abseil-cpp/absl/base/call_once.h +1 -1
  368. data/third_party/abseil-cpp/absl/base/casts.h +9 -6
  369. data/third_party/abseil-cpp/absl/base/config.h +60 -17
  370. data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +428 -335
  371. data/third_party/abseil-cpp/absl/base/internal/bits.h +17 -16
  372. data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +5 -0
  373. data/third_party/abseil-cpp/absl/base/internal/dynamic_annotations.h +398 -0
  374. data/third_party/abseil-cpp/absl/base/internal/invoke.h +4 -4
  375. data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +1 -1
  376. data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +29 -1
  377. data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +2 -2
  378. data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +7 -5
  379. data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +25 -38
  380. data/third_party/abseil-cpp/absl/base/internal/spinlock.h +19 -25
  381. data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +8 -0
  382. data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +28 -5
  383. data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +8 -0
  384. data/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +3 -1
  385. data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +2 -2
  386. data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +3 -3
  387. data/third_party/abseil-cpp/absl/base/macros.h +36 -109
  388. data/third_party/abseil-cpp/absl/base/optimization.h +61 -1
  389. data/third_party/abseil-cpp/absl/base/options.h +31 -4
  390. data/third_party/abseil-cpp/absl/base/policy_checks.h +1 -1
  391. data/third_party/abseil-cpp/absl/base/thread_annotations.h +94 -39
  392. data/third_party/abseil-cpp/absl/container/fixed_array.h +42 -25
  393. data/third_party/abseil-cpp/absl/container/flat_hash_set.h +2 -1
  394. data/third_party/abseil-cpp/absl/container/inlined_vector.h +33 -36
  395. data/third_party/abseil-cpp/absl/container/internal/common.h +6 -2
  396. data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +33 -8
  397. data/third_party/abseil-cpp/absl/container/internal/container_memory.h +49 -29
  398. data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +15 -0
  399. data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +24 -7
  400. data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +2 -1
  401. data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +35 -11
  402. data/third_party/abseil-cpp/absl/container/internal/have_sse.h +10 -9
  403. data/third_party/abseil-cpp/absl/container/internal/layout.h +7 -5
  404. data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +55 -34
  405. data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +5 -4
  406. data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +66 -16
  407. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +4 -0
  408. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +13 -4
  409. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +43 -24
  410. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +12 -3
  411. data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +10 -2
  412. data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +22 -1
  413. data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +0 -21
  414. data/third_party/abseil-cpp/absl/debugging/symbolize.cc +12 -1
  415. data/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +101 -0
  416. data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +100 -20
  417. data/third_party/abseil-cpp/absl/functional/bind_front.h +184 -0
  418. data/third_party/abseil-cpp/absl/functional/function_ref.h +1 -1
  419. data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +95 -0
  420. data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +2 -2
  421. data/third_party/abseil-cpp/absl/hash/hash.h +6 -5
  422. data/third_party/abseil-cpp/absl/hash/internal/hash.h +73 -65
  423. data/third_party/abseil-cpp/absl/memory/memory.h +4 -0
  424. data/third_party/abseil-cpp/absl/meta/type_traits.h +2 -8
  425. data/third_party/abseil-cpp/absl/numeric/int128.cc +13 -27
  426. data/third_party/abseil-cpp/absl/numeric/int128.h +16 -15
  427. data/third_party/abseil-cpp/absl/status/internal/status_internal.h +51 -0
  428. data/third_party/abseil-cpp/absl/status/status.cc +4 -6
  429. data/third_party/abseil-cpp/absl/status/status.h +502 -113
  430. data/third_party/abseil-cpp/absl/status/status_payload_printer.cc +5 -10
  431. data/third_party/abseil-cpp/absl/strings/charconv.cc +2 -2
  432. data/third_party/abseil-cpp/absl/strings/cord.cc +91 -112
  433. data/third_party/abseil-cpp/absl/strings/cord.h +360 -205
  434. data/third_party/abseil-cpp/absl/strings/escaping.cc +9 -9
  435. data/third_party/abseil-cpp/absl/strings/internal/char_map.h +1 -1
  436. data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +1 -1
  437. data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +2 -2
  438. data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +2 -2
  439. data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +45 -23
  440. data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +222 -136
  441. data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +136 -64
  442. data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +1 -1
  443. data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +14 -21
  444. data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +7 -14
  445. data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +31 -7
  446. data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +147 -135
  447. data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +999 -87
  448. data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +3 -3
  449. data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +4 -12
  450. data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +8 -6
  451. data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +13 -11
  452. data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +2 -2
  453. data/third_party/abseil-cpp/absl/strings/str_cat.cc +4 -4
  454. data/third_party/abseil-cpp/absl/strings/str_cat.h +1 -1
  455. data/third_party/abseil-cpp/absl/strings/str_format.h +289 -13
  456. data/third_party/abseil-cpp/absl/strings/str_split.cc +2 -2
  457. data/third_party/abseil-cpp/absl/strings/str_split.h +1 -0
  458. data/third_party/abseil-cpp/absl/strings/string_view.h +26 -19
  459. data/third_party/abseil-cpp/absl/strings/substitute.cc +5 -5
  460. data/third_party/abseil-cpp/absl/strings/substitute.h +32 -29
  461. data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +3 -3
  462. data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +3 -3
  463. data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +28 -28
  464. data/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.inc +4 -16
  465. data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +1 -1
  466. data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +8 -0
  467. data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +2 -2
  468. data/third_party/abseil-cpp/absl/synchronization/mutex.cc +75 -64
  469. data/third_party/abseil-cpp/absl/synchronization/mutex.h +15 -6
  470. data/third_party/abseil-cpp/absl/time/civil_time.cc +9 -9
  471. data/third_party/abseil-cpp/absl/time/clock.cc +3 -3
  472. data/third_party/abseil-cpp/absl/time/duration.cc +90 -59
  473. data/third_party/abseil-cpp/absl/time/format.cc +43 -36
  474. data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +26 -16
  475. data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +4 -2
  476. data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h +1 -1
  477. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +136 -29
  478. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc +13 -21
  479. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.h +1 -1
  480. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +136 -129
  481. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h +4 -5
  482. data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc +8 -7
  483. data/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +6 -6
  484. data/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +2 -1
  485. data/third_party/abseil-cpp/absl/time/time.h +15 -16
  486. data/third_party/abseil-cpp/absl/types/internal/variant.h +4 -4
  487. data/third_party/abseil-cpp/absl/types/optional.h +9 -9
  488. data/third_party/abseil-cpp/absl/types/span.h +49 -36
  489. data/third_party/abseil-cpp/absl/utility/utility.h +2 -2
  490. data/third_party/address_sorting/include/address_sorting/address_sorting.h +2 -0
  491. data/third_party/boringssl-with-bazel/err_data.c +340 -336
  492. data/third_party/boringssl-with-bazel/src/crypto/bio/bio.c +2 -0
  493. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +173 -35
  494. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +46 -7
  495. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +8 -2
  496. data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +90 -63
  497. data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +60 -60
  498. data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c +179 -47
  499. data/third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.c +766 -0
  500. data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +10 -0
  501. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +5 -3
  502. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +14 -14
  503. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +1 -1
  504. data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +24 -0
  505. data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +7 -5
  506. data/third_party/boringssl-with-bazel/src/include/openssl/base.h +5 -2
  507. data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +4 -0
  508. data/third_party/boringssl-with-bazel/src/include/openssl/des.h +6 -0
  509. data/third_party/boringssl-with-bazel/src/include/openssl/opensslconf.h +3 -0
  510. data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +202 -134
  511. data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +55 -1
  512. data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +4 -0
  513. data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +31 -23
  514. data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +435 -394
  515. data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +18 -5
  516. data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +35 -0
  517. data/third_party/boringssl-with-bazel/src/ssl/internal.h +36 -1
  518. data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +42 -1
  519. data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +67 -0
  520. data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +11 -14
  521. data/third_party/boringssl-with-bazel/src/ssl/t1_lib.cc +216 -11
  522. data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +53 -11
  523. data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +133 -39
  524. data/third_party/upb/upb/def.c +2169 -0
  525. data/third_party/upb/upb/def.h +330 -0
  526. data/third_party/upb/upb/def.hpp +525 -0
  527. data/third_party/upb/upb/reflection.c +391 -0
  528. data/third_party/upb/upb/reflection.h +168 -0
  529. data/third_party/upb/upb/text_encode.c +398 -0
  530. data/third_party/upb/upb/text_encode.h +35 -0
  531. metadata +227 -37
  532. data/src/core/ext/filters/client_channel/lb_policy/xds/eds_drop.cc +0 -571
  533. data/third_party/abseil-cpp/absl/base/dynamic_annotations.cc +0 -129
@@ -449,42 +449,54 @@ extern grpc_local_credentials_create_type grpc_local_credentials_create_import;
449
449
  typedef grpc_server_credentials*(*grpc_local_server_credentials_create_type)(grpc_local_connect_type type);
450
450
  extern grpc_local_server_credentials_create_type grpc_local_server_credentials_create_import;
451
451
  #define grpc_local_server_credentials_create grpc_local_server_credentials_create_import
452
+ typedef grpc_tls_identity_pairs*(*grpc_tls_identity_pairs_create_type)();
453
+ extern grpc_tls_identity_pairs_create_type grpc_tls_identity_pairs_create_import;
454
+ #define grpc_tls_identity_pairs_create grpc_tls_identity_pairs_create_import
455
+ typedef void(*grpc_tls_identity_pairs_add_pair_type)(grpc_tls_identity_pairs* pairs, const char* private_key, const char* cert_chain);
456
+ extern grpc_tls_identity_pairs_add_pair_type grpc_tls_identity_pairs_add_pair_import;
457
+ #define grpc_tls_identity_pairs_add_pair grpc_tls_identity_pairs_add_pair_import
458
+ typedef void(*grpc_tls_identity_pairs_destroy_type)(grpc_tls_identity_pairs* pairs);
459
+ extern grpc_tls_identity_pairs_destroy_type grpc_tls_identity_pairs_destroy_import;
460
+ #define grpc_tls_identity_pairs_destroy grpc_tls_identity_pairs_destroy_import
461
+ typedef grpc_tls_certificate_provider*(*grpc_tls_certificate_provider_static_data_create_type)(const char* root_certificate, grpc_tls_identity_pairs* pem_key_cert_pairs);
462
+ extern grpc_tls_certificate_provider_static_data_create_type grpc_tls_certificate_provider_static_data_create_import;
463
+ #define grpc_tls_certificate_provider_static_data_create grpc_tls_certificate_provider_static_data_create_import
464
+ typedef void(*grpc_tls_certificate_provider_release_type)(grpc_tls_certificate_provider* provider);
465
+ extern grpc_tls_certificate_provider_release_type grpc_tls_certificate_provider_release_import;
466
+ #define grpc_tls_certificate_provider_release grpc_tls_certificate_provider_release_import
452
467
  typedef grpc_tls_credentials_options*(*grpc_tls_credentials_options_create_type)(void);
453
468
  extern grpc_tls_credentials_options_create_type grpc_tls_credentials_options_create_import;
454
469
  #define grpc_tls_credentials_options_create grpc_tls_credentials_options_create_import
455
- typedef int(*grpc_tls_credentials_options_set_cert_request_type_type)(grpc_tls_credentials_options* options, grpc_ssl_client_certificate_request_type type);
470
+ typedef void(*grpc_tls_credentials_options_set_cert_request_type_type)(grpc_tls_credentials_options* options, grpc_ssl_client_certificate_request_type type);
456
471
  extern grpc_tls_credentials_options_set_cert_request_type_type grpc_tls_credentials_options_set_cert_request_type_import;
457
472
  #define grpc_tls_credentials_options_set_cert_request_type grpc_tls_credentials_options_set_cert_request_type_import
458
- typedef int(*grpc_tls_credentials_options_set_server_verification_option_type)(grpc_tls_credentials_options* options, grpc_tls_server_verification_option server_verification_option);
473
+ typedef void(*grpc_tls_credentials_options_set_server_verification_option_type)(grpc_tls_credentials_options* options, grpc_tls_server_verification_option server_verification_option);
459
474
  extern grpc_tls_credentials_options_set_server_verification_option_type grpc_tls_credentials_options_set_server_verification_option_import;
460
475
  #define grpc_tls_credentials_options_set_server_verification_option grpc_tls_credentials_options_set_server_verification_option_import
461
- typedef int(*grpc_tls_credentials_options_set_key_materials_config_type)(grpc_tls_credentials_options* options, grpc_tls_key_materials_config* config);
462
- extern grpc_tls_credentials_options_set_key_materials_config_type grpc_tls_credentials_options_set_key_materials_config_import;
463
- #define grpc_tls_credentials_options_set_key_materials_config grpc_tls_credentials_options_set_key_materials_config_import
464
- typedef int(*grpc_tls_credentials_options_set_credential_reload_config_type)(grpc_tls_credentials_options* options, grpc_tls_credential_reload_config* config);
465
- extern grpc_tls_credentials_options_set_credential_reload_config_type grpc_tls_credentials_options_set_credential_reload_config_import;
466
- #define grpc_tls_credentials_options_set_credential_reload_config grpc_tls_credentials_options_set_credential_reload_config_import
467
- typedef int(*grpc_tls_credentials_options_set_server_authorization_check_config_type)(grpc_tls_credentials_options* options, grpc_tls_server_authorization_check_config* config);
476
+ typedef void(*grpc_tls_credentials_options_set_certificate_provider_type)(grpc_tls_credentials_options* options, grpc_tls_certificate_provider* provider);
477
+ extern grpc_tls_credentials_options_set_certificate_provider_type grpc_tls_credentials_options_set_certificate_provider_import;
478
+ #define grpc_tls_credentials_options_set_certificate_provider grpc_tls_credentials_options_set_certificate_provider_import
479
+ typedef void(*grpc_tls_credentials_options_watch_root_certs_type)(grpc_tls_credentials_options* options);
480
+ extern grpc_tls_credentials_options_watch_root_certs_type grpc_tls_credentials_options_watch_root_certs_import;
481
+ #define grpc_tls_credentials_options_watch_root_certs grpc_tls_credentials_options_watch_root_certs_import
482
+ typedef void(*grpc_tls_credentials_options_set_root_cert_name_type)(grpc_tls_credentials_options* options, const char* root_cert_name);
483
+ extern grpc_tls_credentials_options_set_root_cert_name_type grpc_tls_credentials_options_set_root_cert_name_import;
484
+ #define grpc_tls_credentials_options_set_root_cert_name grpc_tls_credentials_options_set_root_cert_name_import
485
+ typedef void(*grpc_tls_credentials_options_watch_identity_key_cert_pairs_type)(grpc_tls_credentials_options* options);
486
+ extern grpc_tls_credentials_options_watch_identity_key_cert_pairs_type grpc_tls_credentials_options_watch_identity_key_cert_pairs_import;
487
+ #define grpc_tls_credentials_options_watch_identity_key_cert_pairs grpc_tls_credentials_options_watch_identity_key_cert_pairs_import
488
+ typedef void(*grpc_tls_credentials_options_set_identity_cert_name_type)(grpc_tls_credentials_options* options, const char* identity_cert_name);
489
+ extern grpc_tls_credentials_options_set_identity_cert_name_type grpc_tls_credentials_options_set_identity_cert_name_import;
490
+ #define grpc_tls_credentials_options_set_identity_cert_name grpc_tls_credentials_options_set_identity_cert_name_import
491
+ typedef void(*grpc_tls_credentials_options_set_server_authorization_check_config_type)(grpc_tls_credentials_options* options, grpc_tls_server_authorization_check_config* config);
468
492
  extern grpc_tls_credentials_options_set_server_authorization_check_config_type grpc_tls_credentials_options_set_server_authorization_check_config_import;
469
493
  #define grpc_tls_credentials_options_set_server_authorization_check_config grpc_tls_credentials_options_set_server_authorization_check_config_import
470
- typedef grpc_tls_key_materials_config*(*grpc_tls_key_materials_config_create_type)(void);
471
- extern grpc_tls_key_materials_config_create_type grpc_tls_key_materials_config_create_import;
472
- #define grpc_tls_key_materials_config_create grpc_tls_key_materials_config_create_import
473
- typedef int(*grpc_tls_key_materials_config_set_key_materials_type)(grpc_tls_key_materials_config* config, const char* pem_root_certs, const grpc_ssl_pem_key_cert_pair** pem_key_cert_pairs, size_t num_key_cert_pairs);
474
- extern grpc_tls_key_materials_config_set_key_materials_type grpc_tls_key_materials_config_set_key_materials_import;
475
- #define grpc_tls_key_materials_config_set_key_materials grpc_tls_key_materials_config_set_key_materials_import
476
- typedef int(*grpc_tls_key_materials_config_set_version_type)(grpc_tls_key_materials_config* config, int version);
477
- extern grpc_tls_key_materials_config_set_version_type grpc_tls_key_materials_config_set_version_import;
478
- #define grpc_tls_key_materials_config_set_version grpc_tls_key_materials_config_set_version_import
479
- typedef int(*grpc_tls_key_materials_config_get_version_type)(grpc_tls_key_materials_config* config);
480
- extern grpc_tls_key_materials_config_get_version_type grpc_tls_key_materials_config_get_version_import;
481
- #define grpc_tls_key_materials_config_get_version grpc_tls_key_materials_config_get_version_import
482
- typedef grpc_tls_credential_reload_config*(*grpc_tls_credential_reload_config_create_type)(const void* config_user_data, int (*schedule)(void* config_user_data, grpc_tls_credential_reload_arg* arg), void (*cancel)(void* config_user_data, grpc_tls_credential_reload_arg* arg), void (*destruct)(void* config_user_data));
483
- extern grpc_tls_credential_reload_config_create_type grpc_tls_credential_reload_config_create_import;
484
- #define grpc_tls_credential_reload_config_create grpc_tls_credential_reload_config_create_import
485
494
  typedef grpc_tls_server_authorization_check_config*(*grpc_tls_server_authorization_check_config_create_type)(const void* config_user_data, int (*schedule)(void* config_user_data, grpc_tls_server_authorization_check_arg* arg), void (*cancel)(void* config_user_data, grpc_tls_server_authorization_check_arg* arg), void (*destruct)(void* config_user_data));
486
495
  extern grpc_tls_server_authorization_check_config_create_type grpc_tls_server_authorization_check_config_create_import;
487
496
  #define grpc_tls_server_authorization_check_config_create grpc_tls_server_authorization_check_config_create_import
497
+ typedef void(*grpc_tls_server_authorization_check_config_release_type)(grpc_tls_server_authorization_check_config* config);
498
+ extern grpc_tls_server_authorization_check_config_release_type grpc_tls_server_authorization_check_config_release_import;
499
+ #define grpc_tls_server_authorization_check_config_release grpc_tls_server_authorization_check_config_release_import
488
500
  typedef grpc_channel_credentials*(*grpc_xds_credentials_create_type)(grpc_channel_credentials* fallback_credentials);
489
501
  extern grpc_xds_credentials_create_type grpc_xds_credentials_create_import;
490
502
  #define grpc_xds_credentials_create grpc_xds_credentials_create_import
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.33.0.pre1'
17
+ VERSION = '1.34.0'
18
18
  end
@@ -340,24 +340,45 @@ container_algorithm_internal::ContainerDifferenceType<const C> c_count_if(
340
340
  // c_mismatch()
341
341
  //
342
342
  // Container-based version of the <algorithm> `std::mismatch()` function to
343
- // return the first element where two ordered containers differ.
343
+ // return the first element where two ordered containers differ. Applies `==` to
344
+ // the first N elements of `c1` and `c2`, where N = min(size(c1), size(c2)).
344
345
  template <typename C1, typename C2>
345
346
  container_algorithm_internal::ContainerIterPairType<C1, C2>
346
347
  c_mismatch(C1& c1, C2& c2) {
347
- return std::mismatch(container_algorithm_internal::c_begin(c1),
348
- container_algorithm_internal::c_end(c1),
349
- container_algorithm_internal::c_begin(c2));
348
+ auto first1 = container_algorithm_internal::c_begin(c1);
349
+ auto last1 = container_algorithm_internal::c_end(c1);
350
+ auto first2 = container_algorithm_internal::c_begin(c2);
351
+ auto last2 = container_algorithm_internal::c_end(c2);
352
+
353
+ for (; first1 != last1 && first2 != last2; ++first1, (void)++first2) {
354
+ // Negates equality because Cpp17EqualityComparable doesn't require clients
355
+ // to overload both `operator==` and `operator!=`.
356
+ if (!(*first1 == *first2)) {
357
+ break;
358
+ }
359
+ }
360
+
361
+ return std::make_pair(first1, first2);
350
362
  }
351
363
 
352
364
  // Overload of c_mismatch() for using a predicate evaluation other than `==` as
353
- // the function's test condition.
365
+ // the function's test condition. Applies `pred`to the first N elements of `c1`
366
+ // and `c2`, where N = min(size(c1), size(c2)).
354
367
  template <typename C1, typename C2, typename BinaryPredicate>
355
368
  container_algorithm_internal::ContainerIterPairType<C1, C2>
356
- c_mismatch(C1& c1, C2& c2, BinaryPredicate&& pred) {
357
- return std::mismatch(container_algorithm_internal::c_begin(c1),
358
- container_algorithm_internal::c_end(c1),
359
- container_algorithm_internal::c_begin(c2),
360
- std::forward<BinaryPredicate>(pred));
369
+ c_mismatch(C1& c1, C2& c2, BinaryPredicate pred) {
370
+ auto first1 = container_algorithm_internal::c_begin(c1);
371
+ auto last1 = container_algorithm_internal::c_end(c1);
372
+ auto first2 = container_algorithm_internal::c_begin(c2);
373
+ auto last2 = container_algorithm_internal::c_end(c2);
374
+
375
+ for (; first1 != last1 && first2 != last2; ++first1, (void)++first2) {
376
+ if (!pred(*first1, *first2)) {
377
+ break;
378
+ }
379
+ }
380
+
381
+ return std::make_pair(first1, first2);
361
382
  }
362
383
 
363
384
  // c_equal()
@@ -539,12 +560,20 @@ BidirectionalIterator c_move_backward(C&& src, BidirectionalIterator dest) {
539
560
  // c_swap_ranges()
540
561
  //
541
562
  // Container-based version of the <algorithm> `std::swap_ranges()` function to
542
- // swap a container's elements with another container's elements.
563
+ // swap a container's elements with another container's elements. Swaps the
564
+ // first N elements of `c1` and `c2`, where N = min(size(c1), size(c2)).
543
565
  template <typename C1, typename C2>
544
566
  container_algorithm_internal::ContainerIter<C2> c_swap_ranges(C1& c1, C2& c2) {
545
- return std::swap_ranges(container_algorithm_internal::c_begin(c1),
546
- container_algorithm_internal::c_end(c1),
547
- container_algorithm_internal::c_begin(c2));
567
+ auto first1 = container_algorithm_internal::c_begin(c1);
568
+ auto last1 = container_algorithm_internal::c_end(c1);
569
+ auto first2 = container_algorithm_internal::c_begin(c2);
570
+ auto last2 = container_algorithm_internal::c_end(c2);
571
+
572
+ using std::swap;
573
+ for (; first1 != last1 && first2 != last2; ++first1, (void)++first2) {
574
+ swap(*first1, *first2);
575
+ }
576
+ return first2;
548
577
  }
549
578
 
550
579
  // c_transform()
@@ -562,16 +591,23 @@ OutputIterator c_transform(const InputSequence& input, OutputIterator output,
562
591
  }
563
592
 
564
593
  // Overload of c_transform() for performing a transformation using a binary
565
- // predicate.
594
+ // predicate. Applies `binary_op` to the first N elements of `c1` and `c2`,
595
+ // where N = min(size(c1), size(c2)).
566
596
  template <typename InputSequence1, typename InputSequence2,
567
597
  typename OutputIterator, typename BinaryOp>
568
598
  OutputIterator c_transform(const InputSequence1& input1,
569
599
  const InputSequence2& input2, OutputIterator output,
570
600
  BinaryOp&& binary_op) {
571
- return std::transform(container_algorithm_internal::c_begin(input1),
572
- container_algorithm_internal::c_end(input1),
573
- container_algorithm_internal::c_begin(input2), output,
574
- std::forward<BinaryOp>(binary_op));
601
+ auto first1 = container_algorithm_internal::c_begin(input1);
602
+ auto last1 = container_algorithm_internal::c_end(input1);
603
+ auto first2 = container_algorithm_internal::c_begin(input2);
604
+ auto last2 = container_algorithm_internal::c_end(input2);
605
+ for (; first1 != last1 && first2 != last2;
606
+ ++first1, (void)++first2, ++output) {
607
+ *output = binary_op(*first1, *first2);
608
+ }
609
+
610
+ return output;
575
611
  }
576
612
 
577
613
  // c_replace()
@@ -943,9 +979,10 @@ void c_partial_sort(
943
979
  // c_partial_sort_copy()
944
980
  //
945
981
  // Container-based version of the <algorithm> `std::partial_sort_copy()`
946
- // function to sort elements within a container such that elements before
947
- // `middle` are sorted in ascending order, and return the result within an
948
- // iterator.
982
+ // function to sort the elements in the given range `result` within the larger
983
+ // `sequence` in ascending order (and using `result` as the output parameter).
984
+ // At most min(result.last - result.first, sequence.last - sequence.first)
985
+ // elements from the sequence will be stored in the result.
949
986
  template <typename C, typename RandomAccessContainer>
950
987
  container_algorithm_internal::ContainerIter<RandomAccessContainer>
951
988
  c_partial_sort_copy(const C& sequence, RandomAccessContainer& result) {
@@ -32,34 +32,12 @@
32
32
  // of them are not supported in older version of Clang. Thus, we check
33
33
  // `__has_attribute()` first. If the check fails, we check if we are on GCC and
34
34
  // assume the attribute exists on GCC (which is verified on GCC 4.7).
35
- //
36
- // -----------------------------------------------------------------------------
37
- // Sanitizer Attributes
38
- // -----------------------------------------------------------------------------
39
- //
40
- // Sanitizer-related attributes are not "defined" in this file (and indeed
41
- // are not defined as such in any file). To utilize the following
42
- // sanitizer-related attributes within your builds, define the following macros
43
- // within your build using a `-D` flag, along with the given value for
44
- // `-fsanitize`:
45
- //
46
- // * `ADDRESS_SANITIZER` + `-fsanitize=address` (Clang, GCC 4.8)
47
- // * `MEMORY_SANITIZER` + `-fsanitize=memory` (Clang-only)
48
- // * `THREAD_SANITIZER + `-fsanitize=thread` (Clang, GCC 4.8+)
49
- // * `UNDEFINED_BEHAVIOR_SANITIZER` + `-fsanitize=undefined` (Clang, GCC 4.9+)
50
- // * `CONTROL_FLOW_INTEGRITY` + -fsanitize=cfi (Clang-only)
51
- //
52
- // Example:
53
- //
54
- // // Enable branches in the Abseil code that are tagged for ASan:
55
- // $ bazel build --copt=-DADDRESS_SANITIZER --copt=-fsanitize=address
56
- // --linkopt=-fsanitize=address *target*
57
- //
58
- // Since these macro names are only supported by GCC and Clang, we only check
59
- // for `__GNUC__` (GCC or Clang) and the above macros.
35
+
60
36
  #ifndef ABSL_BASE_ATTRIBUTES_H_
61
37
  #define ABSL_BASE_ATTRIBUTES_H_
62
38
 
39
+ #include "absl/base/config.h"
40
+
63
41
  // ABSL_HAVE_ATTRIBUTE
64
42
  //
65
43
  // A function-like feature checking macro that is a wrapper around
@@ -234,7 +212,7 @@
234
212
  // out of bounds or does other scary things with memory.
235
213
  // NOTE: GCC supports AddressSanitizer(asan) since 4.8.
236
214
  // https://gcc.gnu.org/gcc-4.8/changes.html
237
- #if defined(__GNUC__)
215
+ #if ABSL_HAVE_ATTRIBUTE(no_sanitize_address)
238
216
  #define ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
239
217
  #else
240
218
  #define ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS
@@ -242,13 +220,13 @@
242
220
 
243
221
  // ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY
244
222
  //
245
- // Tells the MemorySanitizer to relax the handling of a given function. All
246
- // "Use of uninitialized value" warnings from such functions will be suppressed,
247
- // and all values loaded from memory will be considered fully initialized.
248
- // This attribute is similar to the ADDRESS_SANITIZER attribute above, but deals
249
- // with initialized-ness rather than addressability issues.
223
+ // Tells the MemorySanitizer to relax the handling of a given function. All "Use
224
+ // of uninitialized value" warnings from such functions will be suppressed, and
225
+ // all values loaded from memory will be considered fully initialized. This
226
+ // attribute is similar to the ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS attribute
227
+ // above, but deals with initialized-ness rather than addressability issues.
250
228
  // NOTE: MemorySanitizer(msan) is supported by Clang but not GCC.
251
- #if defined(__clang__)
229
+ #if ABSL_HAVE_ATTRIBUTE(no_sanitize_memory)
252
230
  #define ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY __attribute__((no_sanitize_memory))
253
231
  #else
254
232
  #define ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY
@@ -259,7 +237,7 @@
259
237
  // Tells the ThreadSanitizer to not instrument a given function.
260
238
  // NOTE: GCC supports ThreadSanitizer(tsan) since 4.8.
261
239
  // https://gcc.gnu.org/gcc-4.8/changes.html
262
- #if defined(__GNUC__)
240
+ #if ABSL_HAVE_ATTRIBUTE(no_sanitize_thread)
263
241
  #define ABSL_ATTRIBUTE_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread))
264
242
  #else
265
243
  #define ABSL_ATTRIBUTE_NO_SANITIZE_THREAD
@@ -271,8 +249,10 @@
271
249
  // where certain behavior (eg. division by zero) is being used intentionally.
272
250
  // NOTE: GCC supports UndefinedBehaviorSanitizer(ubsan) since 4.9.
273
251
  // https://gcc.gnu.org/gcc-4.9/changes.html
274
- #if defined(__GNUC__) && \
275
- (defined(UNDEFINED_BEHAVIOR_SANITIZER) || defined(ADDRESS_SANITIZER))
252
+ #if ABSL_HAVE_ATTRIBUTE(no_sanitize_undefined)
253
+ #define ABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED \
254
+ __attribute__((no_sanitize_undefined))
255
+ #elif ABSL_HAVE_ATTRIBUTE(no_sanitize)
276
256
  #define ABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED \
277
257
  __attribute__((no_sanitize("undefined")))
278
258
  #else
@@ -283,7 +263,7 @@
283
263
  //
284
264
  // Tells the ControlFlowIntegrity sanitizer to not instrument a given function.
285
265
  // See https://clang.llvm.org/docs/ControlFlowIntegrity.html for details.
286
- #if defined(__GNUC__) && defined(CONTROL_FLOW_INTEGRITY)
266
+ #if ABSL_HAVE_ATTRIBUTE(no_sanitize)
287
267
  #define ABSL_ATTRIBUTE_NO_SANITIZE_CFI __attribute__((no_sanitize("cfi")))
288
268
  #else
289
269
  #define ABSL_ATTRIBUTE_NO_SANITIZE_CFI
@@ -293,7 +273,7 @@
293
273
  //
294
274
  // Tells the SafeStack to not instrument a given function.
295
275
  // See https://clang.llvm.org/docs/SafeStack.html for details.
296
- #if defined(__GNUC__) && defined(SAFESTACK_SANITIZER)
276
+ #if ABSL_HAVE_ATTRIBUTE(no_sanitize)
297
277
  #define ABSL_ATTRIBUTE_NO_SANITIZE_SAFESTACK \
298
278
  __attribute__((no_sanitize("safe-stack")))
299
279
  #else
@@ -507,8 +487,10 @@
507
487
  // packages/targets, as this may lead to conflicting definitions of functions at
508
488
  // link-time.
509
489
  //
490
+ // XRay isn't currently supported on Android:
491
+ // https://github.com/android/ndk/issues/368
510
492
  #if ABSL_HAVE_CPP_ATTRIBUTE(clang::xray_always_instrument) && \
511
- !defined(ABSL_NO_XRAY_ATTRIBUTES)
493
+ !defined(ABSL_NO_XRAY_ATTRIBUTES) && !defined(__ANDROID__)
512
494
  #define ABSL_XRAY_ALWAYS_INSTRUMENT [[clang::xray_always_instrument]]
513
495
  #define ABSL_XRAY_NEVER_INSTRUMENT [[clang::xray_never_instrument]]
514
496
  #if ABSL_HAVE_CPP_ATTRIBUTE(clang::xray_log_args)
@@ -592,6 +574,85 @@
592
574
  #define ABSL_ATTRIBUTE_FUNC_ALIGN(bytes)
593
575
  #endif
594
576
 
577
+ // ABSL_FALLTHROUGH_INTENDED
578
+ //
579
+ // Annotates implicit fall-through between switch labels, allowing a case to
580
+ // indicate intentional fallthrough and turn off warnings about any lack of a
581
+ // `break` statement. The ABSL_FALLTHROUGH_INTENDED macro should be followed by
582
+ // a semicolon and can be used in most places where `break` can, provided that
583
+ // no statements exist between it and the next switch label.
584
+ //
585
+ // Example:
586
+ //
587
+ // switch (x) {
588
+ // case 40:
589
+ // case 41:
590
+ // if (truth_is_out_there) {
591
+ // ++x;
592
+ // ABSL_FALLTHROUGH_INTENDED; // Use instead of/along with annotations
593
+ // // in comments
594
+ // } else {
595
+ // return x;
596
+ // }
597
+ // case 42:
598
+ // ...
599
+ //
600
+ // Notes: when compiled with clang in C++11 mode, the ABSL_FALLTHROUGH_INTENDED
601
+ // macro is expanded to the [[clang::fallthrough]] attribute, which is analysed
602
+ // when performing switch labels fall-through diagnostic
603
+ // (`-Wimplicit-fallthrough`). See clang documentation on language extensions
604
+ // for details:
605
+ // https://clang.llvm.org/docs/AttributeReference.html#fallthrough-clang-fallthrough
606
+ //
607
+ // When used with unsupported compilers, the ABSL_FALLTHROUGH_INTENDED macro
608
+ // has no effect on diagnostics. In any case this macro has no effect on runtime
609
+ // behavior and performance of code.
610
+ #ifdef ABSL_FALLTHROUGH_INTENDED
611
+ #error "ABSL_FALLTHROUGH_INTENDED should not be defined."
612
+ #endif
613
+
614
+ // TODO(zhangxy): Use c++17 standard [[fallthrough]] macro, when supported.
615
+ #if defined(__clang__) && defined(__has_warning)
616
+ #if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
617
+ #define ABSL_FALLTHROUGH_INTENDED [[clang::fallthrough]]
618
+ #endif
619
+ #elif defined(__GNUC__) && __GNUC__ >= 7
620
+ #define ABSL_FALLTHROUGH_INTENDED [[gnu::fallthrough]]
621
+ #endif
622
+
623
+ #ifndef ABSL_FALLTHROUGH_INTENDED
624
+ #define ABSL_FALLTHROUGH_INTENDED \
625
+ do { \
626
+ } while (0)
627
+ #endif
628
+
629
+ // ABSL_DEPRECATED()
630
+ //
631
+ // Marks a deprecated class, struct, enum, function, method and variable
632
+ // declarations. The macro argument is used as a custom diagnostic message (e.g.
633
+ // suggestion of a better alternative).
634
+ //
635
+ // Examples:
636
+ //
637
+ // class ABSL_DEPRECATED("Use Bar instead") Foo {...};
638
+ //
639
+ // ABSL_DEPRECATED("Use Baz() instead") void Bar() {...}
640
+ //
641
+ // template <typename T>
642
+ // ABSL_DEPRECATED("Use DoThat() instead")
643
+ // void DoThis();
644
+ //
645
+ // Every usage of a deprecated entity will trigger a warning when compiled with
646
+ // clang's `-Wdeprecated-declarations` option. This option is turned off by
647
+ // default, but the warnings will be reported by clang-tidy.
648
+ #if defined(__clang__) && __cplusplus >= 201103L
649
+ #define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
650
+ #endif
651
+
652
+ #ifndef ABSL_DEPRECATED
653
+ #define ABSL_DEPRECATED(message)
654
+ #endif
655
+
595
656
  // ABSL_CONST_INIT
596
657
  //
597
658
  // A variable declaration annotated with the `ABSL_CONST_INIT` attribute will
@@ -175,7 +175,7 @@ void CallOnceImpl(std::atomic<uint32_t>* control,
175
175
  std::memory_order_relaxed) ||
176
176
  base_internal::SpinLockWait(control, ABSL_ARRAYSIZE(trans), trans,
177
177
  scheduling_mode) == kOnceInit) {
178
- base_internal::Invoke(std::forward<Callable>(fn),
178
+ base_internal::invoke(std::forward<Callable>(fn),
179
179
  std::forward<Args>(args)...);
180
180
  // The call to SpinLockWake below is an optimization, because the waiter
181
181
  // in SpinLockWait is waiting with a short timeout. The atomic load/store
@@ -159,16 +159,19 @@ inline Dest bit_cast(const Source& source) {
159
159
  return dest;
160
160
  }
161
161
 
162
- // NOTE: This overload is only picked if the requirements of bit_cast are not
163
- // met. It is therefore UB, but is provided temporarily as previous versions of
164
- // this function template were unchecked. Do not use this in new code.
162
+ // NOTE: This overload is only picked if the requirements of bit_cast are
163
+ // not met. It is therefore UB, but is provided temporarily as previous
164
+ // versions of this function template were unchecked. Do not use this in
165
+ // new code.
165
166
  template <
166
167
  typename Dest, typename Source,
167
168
  typename std::enable_if<
168
- !internal_casts::is_bitcastable<Dest, Source>::value, int>::type = 0>
169
+ !internal_casts::is_bitcastable<Dest, Source>::value,
170
+ int>::type = 0>
169
171
  ABSL_DEPRECATED(
170
- "absl::bit_cast type requirements were violated. Update the types being "
171
- "used such that they are the same size and are both TriviallyCopyable.")
172
+ "absl::bit_cast type requirements were violated. Update the types "
173
+ "being used such that they are the same size and are both "
174
+ "TriviallyCopyable.")
172
175
  inline Dest bit_cast(const Source& source) {
173
176
  static_assert(sizeof(Dest) == sizeof(Source),
174
177
  "Source and destination types should have equal sizes.");
@@ -154,6 +154,12 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
154
154
  #define ABSL_INTERNAL_HAS_KEYWORD(x) 0
155
155
  #endif
156
156
 
157
+ #ifdef __has_feature
158
+ #define ABSL_HAVE_FEATURE(f) __has_feature(f)
159
+ #else
160
+ #define ABSL_HAVE_FEATURE(f) 0
161
+ #endif
162
+
157
163
  // ABSL_HAVE_TLS is defined to 1 when __thread should be supported.
158
164
  // We assume __thread is supported on Linux when compiled with Clang or compiled
159
165
  // against libstdc++ with _GLIBCXX_HAVE_TLS defined.
@@ -226,11 +232,9 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
226
232
  // * Xcode 9.3 started disallowing `thread_local` for 32-bit iOS simulator
227
233
  // targeting iOS 9.x.
228
234
  // * Xcode 10 moves the deployment target check for iOS < 9.0 to link time
229
- // making __has_feature unreliable there.
235
+ // making ABSL_HAVE_FEATURE unreliable there.
230
236
  //
231
- // Otherwise, `__has_feature` is only supported by Clang so it has be inside
232
- // `defined(__APPLE__)` check.
233
- #if __has_feature(cxx_thread_local) && \
237
+ #if ABSL_HAVE_FEATURE(cxx_thread_local) && \
234
238
  !(TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0)
235
239
  #define ABSL_HAVE_THREAD_LOCAL 1
236
240
  #endif
@@ -262,13 +266,6 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
262
266
  #endif
263
267
  #endif // defined(__ANDROID__) && defined(__clang__)
264
268
 
265
- // Emscripten doesn't yet support `thread_local` or `__thread`.
266
- // https://github.com/emscripten-core/emscripten/issues/3502
267
- #if defined(__EMSCRIPTEN__)
268
- #undef ABSL_HAVE_TLS
269
- #undef ABSL_HAVE_THREAD_LOCAL
270
- #endif // defined(__EMSCRIPTEN__)
271
-
272
269
  // ABSL_HAVE_INTRINSIC_INT128
273
270
  //
274
271
  // Checks whether the __int128 compiler extension for a 128-bit integral type is
@@ -319,15 +316,15 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
319
316
 
320
317
  #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6)
321
318
  // Clang >= 3.6
322
- #if __has_feature(cxx_exceptions)
319
+ #if ABSL_HAVE_FEATURE(cxx_exceptions)
323
320
  #define ABSL_HAVE_EXCEPTIONS 1
324
- #endif // __has_feature(cxx_exceptions)
321
+ #endif // ABSL_HAVE_FEATURE(cxx_exceptions)
325
322
  #else
326
323
  // Clang < 3.6
327
324
  // http://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html#the-exceptions-macro
328
- #if defined(__EXCEPTIONS) && __has_feature(cxx_exceptions)
325
+ #if defined(__EXCEPTIONS) && ABSL_HAVE_FEATURE(cxx_exceptions)
329
326
  #define ABSL_HAVE_EXCEPTIONS 1
330
- #endif // defined(__EXCEPTIONS) && __has_feature(cxx_exceptions)
327
+ #endif // defined(__EXCEPTIONS) && ABSL_HAVE_FEATURE(cxx_exceptions)
331
328
  #endif // __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6)
332
329
 
333
330
  // Handle remaining special cases and default to exceptions being supported.
@@ -477,9 +474,9 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
477
474
  (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \
478
475
  __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 120000) || \
479
476
  (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && \
480
- __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 120000) || \
477
+ __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000) || \
481
478
  (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && \
482
- __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 50000))
479
+ __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 120000))
483
480
  #define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 1
484
481
  #else
485
482
  #define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 0
@@ -668,4 +665,50 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
668
665
  #define ABSL_DLL
669
666
  #endif // defined(_MSC_VER)
670
667
 
668
+ // ABSL_HAVE_MEMORY_SANITIZER
669
+ //
670
+ // MemorySanitizer (MSan) is a detector of uninitialized reads. It consists of
671
+ // a compiler instrumentation module and a run-time library.
672
+ #ifdef ABSL_HAVE_MEMORY_SANITIZER
673
+ #error "ABSL_HAVE_MEMORY_SANITIZER cannot be directly set."
674
+ #elif defined(MEMORY_SANITIZER)
675
+ // The MEMORY_SANITIZER macro is deprecated but we will continue to honor it
676
+ // for now.
677
+ #define ABSL_HAVE_MEMORY_SANITIZER 1
678
+ #elif defined(__SANITIZE_MEMORY__)
679
+ #define ABSL_HAVE_MEMORY_SANITIZER 1
680
+ #elif !defined(__native_client__) && ABSL_HAVE_FEATURE(memory_sanitizer)
681
+ #define ABSL_HAVE_MEMORY_SANITIZER 1
682
+ #endif
683
+
684
+ // ABSL_HAVE_THREAD_SANITIZER
685
+ //
686
+ // ThreadSanitizer (TSan) is a fast data race detector.
687
+ #ifdef ABSL_HAVE_THREAD_SANITIZER
688
+ #error "ABSL_HAVE_THREAD_SANITIZER cannot be directly set."
689
+ #elif defined(THREAD_SANITIZER)
690
+ // The THREAD_SANITIZER macro is deprecated but we will continue to honor it
691
+ // for now.
692
+ #define ABSL_HAVE_THREAD_SANITIZER 1
693
+ #elif defined(__SANITIZE_THREAD__)
694
+ #define ABSL_HAVE_THREAD_SANITIZER 1
695
+ #elif ABSL_HAVE_FEATURE(thread_sanitizer)
696
+ #define ABSL_HAVE_THREAD_SANITIZER 1
697
+ #endif
698
+
699
+ // ABSL_HAVE_ADDRESS_SANITIZER
700
+ //
701
+ // AddressSanitizer (ASan) is a fast memory error detector.
702
+ #ifdef ABSL_HAVE_ADDRESS_SANITIZER
703
+ #error "ABSL_HAVE_ADDRESS_SANITIZER cannot be directly set."
704
+ #elif defined(ADDRESS_SANITIZER)
705
+ // The ADDRESS_SANITIZER macro is deprecated but we will continue to honor it
706
+ // for now.
707
+ #define ABSL_HAVE_ADDRESS_SANITIZER 1
708
+ #elif defined(__SANITIZE_ADDRESS__)
709
+ #define ABSL_HAVE_ADDRESS_SANITIZER 1
710
+ #elif ABSL_HAVE_FEATURE(address_sanitizer)
711
+ #define ABSL_HAVE_ADDRESS_SANITIZER 1
712
+ #endif
713
+
671
714
  #endif // ABSL_BASE_CONFIG_H_