api_fuzzer.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2016 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #include <string.h>
20 
21 #include <memory>
22 
23 #include <grpc/grpc.h>
24 #include <grpc/grpc_security.h>
25 #include <grpc/support/alloc.h>
26 #include <grpc/support/log.h>
28 
34 #include "src/core/lib/gpr/env.h"
44 #include "src/libfuzzer/libfuzzer_macro.h"
46 #include "test/core/end2end/fuzzers/api_fuzzer.pb.h"
49 
50 // Applicable when simulating channel actions. Prevents overflows.
51 static constexpr uint64_t kMaxWaitMs =
52  31536000000; // 1 year (24 * 365 * 3600 * 1000)
53 // Applicable when simulating channel actions. Prevents overflows.
54 static constexpr uint64_t kMaxAddNReadableBytes = (2 * 1024 * 1024); // 2GB
55 // Applicable when simulating channel actions. Prevents overflows.
56 static constexpr uint64_t kMaxAddNWritableBytes = (2 * 1024 * 1024); // 2GB
57 
59 // logging
60 
61 bool squelch = true;
62 bool leak_check = true;
63 
64 static void dont_log(gpr_log_func_args* /*args*/) {}
65 
67 // global state
68 
72 static std::vector<grpc_passthru_endpoint_channel_action> g_channel_actions;
73 static std::atomic<bool> g_channel_force_delete{false};
74 
76 // dns resolution
77 
78 typedef struct addr_req {
80  char* addr;
82  std::unique_ptr<grpc_core::ServerAddressList>* addresses;
83 } addr_req;
84 
86  addr_req* r = static_cast<addr_req*>(arg);
87 
88  if (GRPC_ERROR_IS_NONE(error) && 0 == strcmp(r->addr, "server")) {
89  *r->addresses = absl::make_unique<grpc_core::ServerAddressList>();
90  grpc_resolved_address fake_resolved_address;
91  GPR_ASSERT(
92  grpc_parse_ipv4_hostport("1.2.3.4:5", &fake_resolved_address, false));
93  (*r->addresses)->emplace_back(fake_resolved_address, nullptr);
95  } else {
98  "Resolution failed", &error, 1));
99  }
100 
101  gpr_free(r->addr);
102  delete r;
103 }
104 
105 namespace {
106 
107 class FuzzerDNSResolver : public grpc_core::DNSResolver {
108  public:
109  class FuzzerDNSRequest {
110  public:
111  FuzzerDNSRequest(
113  std::function<void(absl::StatusOr<std::vector<grpc_resolved_address>>)>
114  on_done)
115  : name_(std::string(name)), on_done_(std::move(on_done)) {
117  &timer_,
119  GRPC_CLOSURE_CREATE(FinishResolve, this, grpc_schedule_on_exec_ctx));
120  }
121 
122  private:
123  static void FinishResolve(void* arg, grpc_error_handle error) {
124  FuzzerDNSRequest* self = static_cast<FuzzerDNSRequest*>(arg);
125  if (GRPC_ERROR_IS_NONE(error) && self->name_ == "server") {
126  std::vector<grpc_resolved_address> addrs;
128  addr.len = 0;
129  addrs.push_back(addr);
130  self->on_done_(std::move(addrs));
131  } else {
132  self->on_done_(absl::UnknownError("Resolution failed"));
133  }
134  delete self;
135  }
136 
137  const std::string name_;
138  const std::function<void(
139  absl::StatusOr<std::vector<grpc_resolved_address>>)>
140  on_done_;
142  };
143 
144  // Gets the singleton instance, possibly creating it first
145  static FuzzerDNSResolver* GetOrCreate() {
146  static FuzzerDNSResolver* instance = new FuzzerDNSResolver();
147  return instance;
148  }
149 
150  TaskHandle ResolveName(
151  absl::string_view name, absl::string_view /* default_port */,
152  grpc_pollset_set* /* interested_parties */,
153  std::function<void(absl::StatusOr<std::vector<grpc_resolved_address>>)>
154  on_done) override {
155  new FuzzerDNSRequest(name, std::move(on_done));
156  return kNullHandle;
157  }
158 
160  absl::string_view /* name */,
161  absl::string_view /* default_port */) override {
162  GPR_ASSERT(0);
163  }
164 
165  // FuzzerDNSResolver does not support cancellation.
166  bool Cancel(TaskHandle /*handle*/) override { return false; }
167 };
168 
169 } // namespace
170 
172  const char* /*dns_server*/, const char* addr, const char* /*default_port*/,
173  grpc_pollset_set* /*interested_parties*/, grpc_closure* on_done,
174  std::unique_ptr<grpc_core::ServerAddressList>* addresses,
175  std::unique_ptr<grpc_core::ServerAddressList>* /*balancer_addresses*/,
176  char** /*service_config_json*/, int /*query_timeout*/) {
177  addr_req* r = new addr_req();
178  r->addr = gpr_strdup(addr);
179  r->on_done = on_done;
180  r->addresses = addresses;
182  &r->timer,
184  GRPC_CLOSURE_CREATE(finish_resolve, r, grpc_schedule_on_exec_ctx));
185  return nullptr;
186 }
187 
189  GPR_ASSERT(request == nullptr);
190 }
192 // client connection
193 
195  gpr_timespec deadline);
196 
197 typedef struct {
203 
204 static void do_connect(void* arg, grpc_error_handle error) {
205  future_connect* fc = static_cast<future_connect*>(arg);
206  if (!GRPC_ERROR_IS_NONE(error)) {
207  *fc->ep = nullptr;
209  } else if (g_server != nullptr) {
212  grpc_passthru_endpoint_create(&client, &server, nullptr, true);
213  *fc->ep = client;
216 
219  core_server->channel_args(), server, false);
221  "SetupTransport",
222  core_server->SetupTransport(transport, nullptr,
223  core_server->channel_args(), nullptr)));
224  grpc_chttp2_transport_start_reading(transport, nullptr, nullptr, nullptr);
225 
227  } else {
228  sched_connect(fc->closure, fc->ep, fc->deadline);
229  }
230  gpr_free(fc);
231 }
232 
234  gpr_timespec deadline) {
235  if (gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) < 0) {
236  *ep = nullptr;
239  GRPC_ERROR_CREATE_FROM_STATIC_STRING("Connect deadline exceeded"));
240  return;
241  }
242 
243  future_connect* fc = static_cast<future_connect*>(gpr_malloc(sizeof(*fc)));
244  fc->closure = closure;
245  fc->ep = ep;
246  fc->deadline = deadline;
248  &fc->timer,
250  GRPC_CLOSURE_CREATE(do_connect, fc, grpc_schedule_on_exec_ctx));
251 }
252 
254  grpc_pollset_set* /*interested_parties*/,
255  const grpc_channel_args* /*channel_args*/,
256  const grpc_resolved_address* /*addr*/,
257  grpc_core::Timestamp deadline) {
259  return 0;
260 }
261 
262 static bool my_tcp_cancel_connect(int64_t /*connection_handle*/) {
263  return false;
264 }
265 
268 
270 // test driver
271 
272 class Validator {
273  public:
274  explicit Validator(std::function<void(bool)> impl) : impl_(std::move(impl)) {}
275 
276  virtual ~Validator() {}
277  void Run(bool success) {
278  impl_(success);
279  delete this;
280  }
281 
282  private:
283  std::function<void(bool)> impl_;
284 };
285 
287  return new Validator(std::move(impl));
288 }
289 
291  return MakeValidator([counter](bool success) {
292  GPR_ASSERT(success);
293  --*counter;
294  });
295 }
296 
297 static Validator* Decrement(int* counter) {
298  return MakeValidator([counter](bool) { --*counter; });
299 }
300 
302  int* counter) {
303  return MakeValidator([deadline, counter](bool success) {
304  if (!success) {
305  auto now = gpr_now(deadline.clock_type);
306  GPR_ASSERT(gpr_time_cmp(now, deadline) >= 0);
307  }
308  --*counter;
309  });
310 }
311 
312 static void free_non_null(void* p) {
313  GPR_ASSERT(p != nullptr);
314  gpr_free(p);
315 }
316 
318 
319 class Call : public std::enable_shared_from_this<Call> {
320  public:
321  explicit Call(CallType type) : type_(type) {
325  }
326 
327  ~Call();
328 
329  CallType type() const { return type_; }
330 
331  bool done() const {
332  if ((type_ == CallType::TOMBSTONED || call_closed_) && pending_ops_ == 0) {
333  return true;
334  }
335  if (call_ == nullptr && type() != CallType::PENDING_SERVER) return true;
336  return false;
337  }
338 
339  void Shutdown() {
340  if (call_ != nullptr) {
341  grpc_call_cancel(call_, nullptr);
343  }
344  }
345 
347  GPR_ASSERT(call_ == nullptr);
348  call_ = call;
349  }
350 
351  grpc_call* call() const { return call_; }
352 
354  auto* v = FinishedRequestCall();
357  if (error != GRPC_CALL_OK) {
358  v->Run(false);
359  }
360  }
361 
362  void* Allocate(size_t size) {
363  void* p = gpr_malloc(size);
364  free_pointers_.push_back(p);
365  return p;
366  }
367 
368  template <typename T>
369  T* AllocArray(size_t elems) {
370  return static_cast<T*>(Allocate(sizeof(T) * elems));
371  }
372 
373  template <typename T>
375  T* p = AllocArray<T>(1);
376  new (p) T(value);
377  return p;
378  }
379 
380  template <typename T>
381  grpc_slice ReadSlice(const T& s) {
383  unref_slices_.push_back(slice);
384  return slice;
385  }
386 
387  template <typename M>
389  grpc_metadata* m = AllocArray<grpc_metadata>(metadata.size());
390  for (int i = 0; i < metadata.size(); ++i) {
391  m[i].key = ReadSlice(metadata[i].key());
392  m[i].value = ReadSlice(metadata[i].value());
393  }
394  return grpc_metadata_array{static_cast<size_t>(metadata.size()),
395  static_cast<size_t>(metadata.size()), m};
396  }
397 
399  const api_fuzzer::BatchOp& batch_op, bool* batch_is_ok,
400  uint8_t* batch_ops, std::vector<std::function<void()>>* unwinders) {
401  grpc_op op;
402  memset(&op, 0, sizeof(op));
403  switch (batch_op.op_case()) {
404  case api_fuzzer::BatchOp::OP_NOT_SET:
405  /* invalid value */
406  return {};
407  case api_fuzzer::BatchOp::kSendInitialMetadata:
409  *batch_is_ok = false;
410  } else {
411  sent_initial_metadata_ = true;
413  *batch_ops |= 1 << GRPC_OP_SEND_INITIAL_METADATA;
414  auto ary = ReadMetadata(batch_op.send_initial_metadata().metadata());
415  op.data.send_initial_metadata.count = ary.count;
416  op.data.send_initial_metadata.metadata = ary.metadata;
417  }
418  break;
419  case api_fuzzer::BatchOp::kSendMessage:
421  if (send_message_ != nullptr) {
422  *batch_is_ok = false;
423  } else {
424  *batch_ops |= 1 << GRPC_OP_SEND_MESSAGE;
425  std::vector<grpc_slice> slices;
426  for (const auto& m : batch_op.send_message().message()) {
427  slices.push_back(ReadSlice(m));
428  }
430  grpc_raw_byte_buffer_create(slices.data(), slices.size());
431  unwinders->push_back([this]() {
433  send_message_ = nullptr;
434  });
435  }
436  break;
437  case api_fuzzer::BatchOp::kSendCloseFromClient:
439  *batch_ops |= 1 << GRPC_OP_SEND_CLOSE_FROM_CLIENT;
440  break;
441  case api_fuzzer::BatchOp::kSendStatusFromServer: {
443  *batch_ops |= 1 << GRPC_OP_SEND_STATUS_FROM_SERVER;
444  auto ary = ReadMetadata(batch_op.send_status_from_server().metadata());
448  batch_op.send_status_from_server().status_code());
450  batch_op.send_status_from_server().has_status_details()
451  ? NewCopy(ReadSlice(
452  batch_op.send_status_from_server().status_details()))
453  : nullptr;
454  } break;
455  case api_fuzzer::BatchOp::kReceiveInitialMetadata:
457  *batch_is_ok = false;
458  } else {
461  *batch_ops |= 1 << GRPC_OP_RECV_INITIAL_METADATA;
464  }
465  break;
466  case api_fuzzer::BatchOp::kReceiveMessage:
467  // Allow only one active pending_recv_message_op to exist. Otherwise if
468  // the previous enqueued recv_message_op is not complete by the time
469  // we get here, then under certain conditions, enqueing this op will
470  // over-write the internal call->receiving_buffer maintained by grpc
471  // leading to a memory leak.
473  *batch_is_ok = false;
474  } else {
476  *batch_ops |= 1 << GRPC_OP_RECV_MESSAGE;
479  unwinders->push_back([this]() { pending_recv_message_op_ = false; });
480  }
481  break;
482  case api_fuzzer::BatchOp::kReceiveStatusOnClient:
488  *batch_ops |= 1 << GRPC_OP_RECV_STATUS_ON_CLIENT;
489  break;
490  case api_fuzzer::BatchOp::kReceiveCloseOnServer:
492  *batch_ops |= 1 << GRPC_OP_RECV_CLOSE_ON_SERVER;
494  break;
495  }
496  op.reserved = nullptr;
497  op.flags = batch_op.flags();
498  return op;
499  }
500 
502  ++pending_ops_;
503  auto self = shared_from_this();
504  return MakeValidator([self, has_ops](bool /*success*/) {
505  --self->pending_ops_;
506  if (has_ops & (1u << GRPC_OP_RECV_MESSAGE)) {
507  self->pending_recv_message_op_ = false;
508  if (self->recv_message_ != nullptr) {
509  grpc_byte_buffer_destroy(self->recv_message_);
510  self->recv_message_ = nullptr;
511  }
512  }
513  if ((has_ops & (1u << GRPC_OP_SEND_MESSAGE))) {
514  grpc_byte_buffer_destroy(self->send_message_);
515  self->send_message_ = nullptr;
516  }
517  if ((has_ops & (1u << GRPC_OP_RECV_STATUS_ON_CLIENT)) ||
518  (has_ops & (1u << GRPC_OP_RECV_CLOSE_ON_SERVER))) {
519  self->call_closed_ = true;
520  }
521  });
522  }
523 
525  ++pending_ops_;
526  auto self = shared_from_this();
527  return MakeValidator([self](bool success) {
528  GPR_ASSERT(self->pending_ops_ > 0);
529  --self->pending_ops_;
530  if (success) {
531  GPR_ASSERT(self->call_ != nullptr);
532  self->type_ = CallType::SERVER;
533  } else {
534  self->type_ = CallType::TOMBSTONED;
535  }
536  });
537  }
538 
539  private:
541  grpc_call* call_ = nullptr;
547  // set by receive close on server, unset here to trigger
548  // msan if misused
550  int pending_ops_ = 0;
555  bool call_closed_ = false;
557 
558  std::vector<void*> free_pointers_;
559  std::vector<grpc_slice> unref_slices_;
560 };
561 
562 static std::vector<std::shared_ptr<Call>> g_calls;
563 static size_t g_active_call = 0;
564 
565 static Call* ActiveCall() {
566  while (!g_calls.empty()) {
567  if (g_active_call >= g_calls.size()) {
568  g_active_call = 0;
569  }
570  if (g_calls[g_active_call] != nullptr && !g_calls[g_active_call]->done()) {
571  return g_calls[g_active_call].get();
572  }
573  g_calls.erase(g_calls.begin() + g_active_call);
574  }
575  return nullptr;
576 }
577 
579  if (call_ != nullptr) {
581  }
584 
585  for (auto* p : free_pointers_) {
586  gpr_free(p);
587  }
588  for (auto s : unref_slices_) {
589  grpc_slice_unref(s);
590  }
591 
592  if (recv_message_ != nullptr) {
594  recv_message_ = nullptr;
595  }
596 
599 }
600 
601 template <typename ChannelArgContainer>
602 grpc_channel_args* ReadArgs(const ChannelArgContainer& args) {
603  grpc_channel_args* res =
604  static_cast<grpc_channel_args*>(gpr_malloc(sizeof(grpc_channel_args)));
605  res->args =
606  static_cast<grpc_arg*>(gpr_malloc(sizeof(grpc_arg) * args.size()));
607  int j = 0;
608  for (int i = 0; i < args.size(); i++) {
609  switch (args[i].value_case()) {
610  case api_fuzzer::ChannelArg::kStr:
611  res->args[j].type = GRPC_ARG_STRING;
612  res->args[j].value.string = gpr_strdup(args[i].str().c_str());
613  break;
614  case api_fuzzer::ChannelArg::kI:
615  res->args[j].type = GRPC_ARG_INTEGER;
616  res->args[j].value.integer = args[i].i();
617  break;
618  case api_fuzzer::ChannelArg::kResourceQuota:
619  if (args[i].key() != GRPC_ARG_RESOURCE_QUOTA) continue;
621  res->args[j].type = GRPC_ARG_POINTER;
622  res->args[j].value.pointer.p = g_resource_quota;
624  break;
625  case api_fuzzer::ChannelArg::VALUE_NOT_SET:
626  res->args[j].type = GRPC_ARG_INTEGER;
627  res->args[j].value.integer = 0;
628  break;
629  }
630  res->args[j].key = gpr_strdup(args[i].key().c_str());
631  ++j;
632  }
633  res->num_args = j;
634  return res;
635 }
636 
637 static const char* ReadCredArtifact(
638  const api_fuzzer::CredArtifact& artifact,
639  std::initializer_list<const char*> builtins) {
640  switch (artifact.type_case()) {
641  case api_fuzzer::CredArtifact::kCustom:
642  return artifact.custom().c_str();
643  case api_fuzzer::CredArtifact::kBuiltin:
644  if (artifact.builtin() < 0) return nullptr;
645  if (artifact.builtin() < static_cast<int>(builtins.size())) {
646  return *(builtins.begin() + artifact.builtin());
647  }
648  return nullptr;
649  case api_fuzzer::CredArtifact::TYPE_NOT_SET:
650  return nullptr;
651  }
652 }
653 
655  const api_fuzzer::SslChannelCreds& creds) {
656  const char* root_certs =
657  creds.has_root_certs()
658  ? ReadCredArtifact(creds.root_certs(), {test_root_cert})
659  : nullptr;
660  const char* private_key =
661  creds.has_private_key()
662  ? ReadCredArtifact(creds.private_key(),
663  {test_server1_key, test_self_signed_client_key,
664  test_signed_client_key})
665  : nullptr;
666  const char* certs =
667  creds.has_certs()
668  ? ReadCredArtifact(creds.certs(),
669  {test_server1_cert, test_self_signed_client_cert,
670  test_signed_client_cert})
671  : nullptr;
672  grpc_ssl_pem_key_cert_pair key_cert_pair = {private_key, certs};
674  root_certs,
675  private_key != nullptr && certs != nullptr ? &key_cert_pair : nullptr,
676  nullptr, nullptr);
677 }
678 
680  const api_fuzzer::CallCreds& creds) {
681  switch (creds.type_case()) {
682  case api_fuzzer::CallCreds::TYPE_NOT_SET:
683  return nullptr;
685  return nullptr;
686  case api_fuzzer::CallCreds::kCompositeCallCreds: {
687  grpc_call_credentials* out = nullptr;
688  for (const auto& child_creds :
689  creds.composite_call_creds().call_creds()) {
690  grpc_call_credentials* child = ReadCallCreds(child_creds);
691  if (child != nullptr) {
692  if (out == nullptr) {
693  out = child;
694  } else {
695  auto* composed =
699  out = composed;
700  }
701  }
702  }
703  return out;
704  }
705  case api_fuzzer::CallCreds::kAccessToken:
706  return grpc_access_token_credentials_create(creds.access_token().c_str(),
707  nullptr);
708  case api_fuzzer::CallCreds::kIam:
710  creds.iam().auth_token().c_str(), creds.iam().auth_selector().c_str(),
711  nullptr);
712  /* TODO(ctiller): more cred types here */
713  }
714 }
715 
717  const api_fuzzer::ChannelCreds& creds) {
718  switch (creds.type_case()) {
719  case api_fuzzer::ChannelCreds::TYPE_NOT_SET:
720  return nullptr;
721  case api_fuzzer::ChannelCreds::kSslChannelCreds:
722  return ReadSslChannelCreds(creds.ssl_channel_creds());
723  case api_fuzzer::ChannelCreds::kCompositeChannelCreds: {
724  const auto& comp = creds.composite_channel_creds();
726  comp.has_channel_creds() ? ReadChannelCreds(comp.channel_creds())
727  : nullptr;
729  comp.has_call_creds() ? ReadCallCreds(comp.call_creds()) : nullptr;
730  if (c1 != nullptr && c2 != nullptr) {
735  return out;
736  } else if (c1 != nullptr) {
737  return c1;
738  } else if (c2 != nullptr) {
740  return nullptr;
741  } else {
742  return nullptr;
743  }
744  GPR_UNREACHABLE_CODE(return nullptr);
745  }
747  return nullptr;
748  }
749 }
750 
751 DEFINE_PROTO_FUZZER(const api_fuzzer::Msg& msg) {
754  char* grpc_trace_fuzzer = gpr_getenv("GRPC_TRACE_FUZZER");
755  if (squelch && grpc_trace_fuzzer == nullptr) gpr_set_log_function(dont_log);
756  gpr_free(grpc_trace_fuzzer);
759  [actions = msg.event_engine_actions()]() {
760  return absl::make_unique<
761  grpc_event_engine::experimental::FuzzingEventEngine>(
762  grpc_event_engine::experimental::FuzzingEventEngine::Options(),
763  actions);
764  });
766  grpc_init();
768  {
771  }
772  grpc_core::SetDNSResolver(FuzzerDNSResolver::GetOrCreate());
775 
776  GPR_ASSERT(g_channel == nullptr);
777  GPR_ASSERT(g_server == nullptr);
778 
779  bool server_shutdown = false;
780  int pending_server_shutdowns = 0;
781  int pending_channel_watches = 0;
782  int pending_pings = 0;
783 
785 
787 
788  int action_index = 0;
789  auto no_more_actions = [&]() { action_index = msg.actions_size(); };
790  auto poll_cq = [&]() -> bool {
792  cq, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
793  switch (ev.type) {
794  case GRPC_OP_COMPLETE: {
795  static_cast<Validator*>(ev.tag)->Run(ev.success);
796  break;
797  }
798  case GRPC_QUEUE_TIMEOUT:
799  break;
800  case GRPC_QUEUE_SHUTDOWN:
801  return true;
802  }
803  return false;
804  };
805 
806  while (action_index < msg.actions_size() || g_channel != nullptr ||
807  g_server != nullptr || pending_channel_watches > 0 ||
808  pending_pings > 0 || ActiveCall() != nullptr) {
811  ->Tick();
812 
813  if (action_index == msg.actions_size()) {
816  ->FuzzingDone();
817  if (g_channel != nullptr) {
819  g_channel = nullptr;
820  }
821  if (g_server != nullptr) {
822  if (!server_shutdown) {
824  g_server, cq,
825  AssertSuccessAndDecrement(&pending_server_shutdowns));
826  server_shutdown = true;
827  pending_server_shutdowns++;
828  } else if (pending_server_shutdowns == 0) {
830  g_server = nullptr;
831  }
832  }
833  for (auto& call : g_calls) {
834  if (call == nullptr) continue;
835  if (call->type() == CallType::PENDING_SERVER) continue;
836  call->Shutdown();
837  }
838 
840  GPR_ASSERT(!poll_cq());
841  continue;
842  }
843 
845 
846  if (g_channel_force_delete.exchange(false) && g_channel) {
848  g_channel = nullptr;
849  g_channel_actions.clear();
850  }
851 
852  const api_fuzzer::Action& action = msg.actions(action_index);
853  action_index++;
854  switch (action.type_case()) {
855  case api_fuzzer::Action::TYPE_NOT_SET:
856  no_more_actions();
857  break;
858  // tickle completion queue
859  case api_fuzzer::Action::kPollCq: {
860  GPR_ASSERT(!poll_cq());
861  break;
862  }
863  // create an insecure channel
864  case api_fuzzer::Action::kCreateChannel: {
865  if (!action.create_channel().channel_actions_size() ||
866  g_channel != nullptr) {
867  no_more_actions();
868  } else {
870  ReadArgs(action.create_channel().channel_args());
871  grpc_channel_credentials* creds =
872  action.create_channel().has_channel_creds()
873  ? ReadChannelCreds(action.create_channel().channel_creds())
876  action.create_channel().target().c_str(), creds, args);
878  g_channel_actions.clear();
879  for (int i = 0; i < action.create_channel().channel_actions_size();
880  i++) {
881  const api_fuzzer::ChannelAction& channel_action =
882  action.create_channel().channel_actions(i);
883  g_channel_actions.push_back({
884  std::min(channel_action.wait_ms(), kMaxWaitMs),
885  std::min(channel_action.add_n_bytes_writable(),
887  std::min(channel_action.add_n_bytes_readable(),
889  });
890  }
891  GPR_ASSERT(g_channel != nullptr);
892  g_channel_force_delete = false;
893  {
896  }
897  }
898  break;
899  }
900  // destroy a channel
901  case api_fuzzer::Action::kCloseChannel: {
902  if (g_channel != nullptr) {
904  g_channel = nullptr;
905  } else {
906  no_more_actions();
907  }
908  break;
909  }
910  // bring up a server
911  case api_fuzzer::Action::kCreateServer: {
912  if (g_server == nullptr) {
914  ReadArgs(action.create_server().channel_args());
915  g_server = grpc_server_create(args, nullptr);
916  GPR_ASSERT(g_server != nullptr);
917  {
920  }
923  server_shutdown = false;
924  GPR_ASSERT(pending_server_shutdowns == 0);
925  } else {
926  no_more_actions();
927  }
928  break;
929  }
930  // begin server shutdown
931  case api_fuzzer::Action::kShutdownServer: {
932  if (g_server != nullptr) {
934  g_server, cq,
935  AssertSuccessAndDecrement(&pending_server_shutdowns));
936  pending_server_shutdowns++;
937  server_shutdown = true;
938  } else {
939  no_more_actions();
940  }
941  break;
942  }
943  // cancel all calls if shutdown
944  case api_fuzzer::Action::kCancelAllCallsIfShutdown: {
945  if (g_server != nullptr && server_shutdown) {
947  } else {
948  no_more_actions();
949  }
950  break;
951  }
952  // destroy server
953  case api_fuzzer::Action::kDestroyServerIfReady: {
954  if (g_server != nullptr && server_shutdown &&
955  pending_server_shutdowns == 0) {
957  g_server = nullptr;
958  } else {
959  no_more_actions();
960  }
961  break;
962  }
963  // check connectivity
964  case api_fuzzer::Action::kCheckConnectivity: {
965  if (g_channel != nullptr) {
967  action.check_connectivity());
968  } else {
969  no_more_actions();
970  }
971  break;
972  }
973  // watch connectivity
974  case api_fuzzer::Action::kWatchConnectivity: {
975  if (g_channel != nullptr) {
978  if (st != GRPC_CHANNEL_SHUTDOWN) {
979  gpr_timespec deadline =
981  gpr_time_from_micros(action.watch_connectivity(),
982  GPR_TIMESPAN));
984  g_channel, st, deadline, cq,
985  ValidateConnectivityWatch(deadline, &pending_channel_watches));
986  pending_channel_watches++;
987  }
988  } else {
989  no_more_actions();
990  }
991  break;
992  }
993  // create a call
994  case api_fuzzer::Action::kCreateCall: {
995  bool ok = true;
996  if (g_channel == nullptr) ok = false;
997  // If the active call is a server call, then use it as the parent call
998  // to exercise the propagation logic.
999  Call* parent_call = ActiveCall();
1000  if (parent_call != nullptr && parent_call->type() != CallType::SERVER) {
1001  parent_call = nullptr;
1002  }
1003  g_calls.emplace_back(new Call(CallType::CLIENT));
1004  grpc_slice method =
1005  g_calls.back()->ReadSlice(action.create_call().method());
1006  if (GRPC_SLICE_LENGTH(method) == 0) {
1007  ok = false;
1008  }
1009  grpc_slice host =
1010  g_calls.back()->ReadSlice(action.create_call().host());
1011  gpr_timespec deadline = gpr_time_add(
1013  gpr_time_from_micros(action.create_call().timeout(), GPR_TIMESPAN));
1014 
1015  if (ok) {
1016  g_calls.back()->SetCall(grpc_channel_create_call(
1017  g_channel, parent_call == nullptr ? nullptr : parent_call->call(),
1018  action.create_call().propagation_mask(), cq, method, &host,
1019  deadline, nullptr));
1020  } else {
1021  g_calls.pop_back();
1022  no_more_actions();
1023  }
1024  break;
1025  }
1026  // switch the 'current' call
1027  case api_fuzzer::Action::kChangeActiveCall: {
1028  g_active_call++;
1029  ActiveCall();
1030  break;
1031  }
1032  // queue some ops on a call
1033  case api_fuzzer::Action::kQueueBatch: {
1034  auto* active_call = ActiveCall();
1035  if (active_call == nullptr ||
1036  active_call->type() == CallType::PENDING_SERVER ||
1037  active_call->call() == nullptr) {
1038  no_more_actions();
1039  break;
1040  }
1041  const auto& batch = action.queue_batch().operations();
1042  if (batch.size() > 6) {
1043  no_more_actions();
1044  break;
1045  }
1046  std::vector<grpc_op> ops;
1047  bool ok = true;
1048  uint8_t has_ops = 0;
1049  std::vector<std::function<void()>> unwinders;
1050  for (const auto& batch_op : batch) {
1051  auto op = active_call->ReadOp(batch_op, &ok, &has_ops, &unwinders);
1052  if (!op.has_value()) continue;
1053  ops.push_back(*op);
1054  }
1055 
1056  if (g_channel == nullptr) ok = false;
1057  if (ok) {
1058  auto* v = active_call->FinishedBatchValidator(has_ops);
1060  active_call->call(), ops.data(), ops.size(), v, nullptr);
1061  if (error != GRPC_CALL_OK) {
1062  v->Run(false);
1063  }
1064  } else {
1065  no_more_actions();
1066  for (auto& unwind : unwinders) {
1067  unwind();
1068  }
1069  }
1070  break;
1071  }
1072  // cancel current call
1073  case api_fuzzer::Action::kCancelCall: {
1074  auto* active_call = ActiveCall();
1075  if (active_call != nullptr && active_call->call() != nullptr) {
1076  grpc_call_cancel(active_call->call(), nullptr);
1077  } else {
1078  no_more_actions();
1079  }
1080  break;
1081  }
1082  // get a calls peer
1083  case api_fuzzer::Action::kGetPeer: {
1084  auto* active_call = ActiveCall();
1085  if (active_call != nullptr && active_call->call() != nullptr) {
1086  free_non_null(grpc_call_get_peer(active_call->call()));
1087  } else {
1088  no_more_actions();
1089  }
1090  break;
1091  }
1092  // get a channels target
1093  case api_fuzzer::Action::kGetTarget: {
1094  if (g_channel != nullptr) {
1096  } else {
1097  no_more_actions();
1098  }
1099  break;
1100  }
1101  // send a ping on a channel
1102  case api_fuzzer::Action::kPing: {
1103  if (g_channel != nullptr) {
1104  pending_pings++;
1105  grpc_channel_ping(g_channel, cq, Decrement(&pending_pings), nullptr);
1106  } else {
1107  no_more_actions();
1108  }
1109  break;
1110  }
1111  // enable a tracer
1112  case api_fuzzer::Action::kEnableTracer: {
1113  grpc_tracer_set_enabled(action.enable_tracer().c_str(), 1);
1114  break;
1115  }
1116  // disable a tracer
1117  case api_fuzzer::Action::kDisableTracer: {
1118  grpc_tracer_set_enabled(action.disable_tracer().c_str(), 0);
1119  break;
1120  }
1121  // request a server call
1122  case api_fuzzer::Action::kRequestCall: {
1123  if (g_server == nullptr) {
1124  no_more_actions();
1125  break;
1126  }
1127  g_calls.emplace_back(new Call(CallType::PENDING_SERVER));
1128  g_calls.back()->RequestCall(g_server, cq);
1129  break;
1130  }
1131  // destroy a call
1132  case api_fuzzer::Action::kDestroyCall: {
1133  auto* active_call = ActiveCall();
1134  if (active_call != nullptr &&
1135  active_call->type() != CallType::PENDING_SERVER &&
1136  active_call->call() != nullptr) {
1137  g_calls[g_active_call]->Shutdown();
1138  } else {
1139  no_more_actions();
1140  }
1141  break;
1142  }
1143  // resize the buffer pool
1144  case api_fuzzer::Action::kResizeResourceQuota: {
1146  action.resize_resource_quota());
1147  break;
1148  }
1149  }
1150  }
1151 
1152  GPR_ASSERT(g_channel == nullptr);
1153  GPR_ASSERT(g_server == nullptr);
1154  GPR_ASSERT(ActiveCall() == nullptr);
1155  GPR_ASSERT(g_calls.empty());
1156 
1158  GPR_ASSERT(poll_cq());
1160 
1163 }
Validator::Run
void Run(bool success)
Definition: api_fuzzer.cc:277
grpc_arg
Definition: grpc_types.h:103
xds_interop_client.str
str
Definition: xds_interop_client.py:487
grpc_core::Server::SetupTransport
grpc_error_handle SetupTransport(grpc_transport *transport, grpc_pollset *accepting_pollset, const grpc_channel_args *args, const RefCountedPtr< channelz::SocketNode > &socket_node)
Definition: src/core/lib/surface/server.cc:605
GPR_TIMESPAN
@ GPR_TIMESPAN
Definition: gpr_types.h:45
grpc_slice_unref
GPRAPI void grpc_slice_unref(grpc_slice s)
Definition: slice_api.cc:32
Call::type
CallType type() const
Definition: api_fuzzer.cc:329
grpc_op::grpc_op_data::grpc_op_send_message::send_message
struct grpc_byte_buffer * send_message
Definition: grpc_types.h:668
grpc_op::flags
uint32_t flags
Definition: grpc_types.h:644
grpc_call_error
grpc_call_error
Definition: grpc_types.h:464
future_connect::closure
grpc_closure * closure
Definition: api_fuzzer.cc:199
Call::SetCall
void SetCall(grpc_call *call)
Definition: api_fuzzer.cc:346
gen_build_yaml.out
dictionary out
Definition: src/benchmark/gen_build_yaml.py:24
grpc_call_cancel
GRPCAPI grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved)
Definition: call.cc:1782
timer_
grpc_timer timer_
Definition: channel_connectivity.cc:218
grpc_call_details_destroy
GRPCAPI void grpc_call_details_destroy(grpc_call_details *details)
Definition: call_details.cc:36
now
static double now(void)
Definition: test/core/fling/client.cc:130
grpc_call_details_init
GRPCAPI void grpc_call_details_init(grpc_call_details *details)
Definition: call_details.cc:30
grpc_op::grpc_op_data::grpc_op_recv_status_on_client::trailing_metadata
grpc_metadata_array * trailing_metadata
Definition: grpc_types.h:701
GRPC_ERROR_NONE
#define GRPC_ERROR_NONE
Definition: error.h:234
g_resource_quota
static grpc_resource_quota * g_resource_quota
Definition: api_fuzzer.cc:71
log.h
grpc_op::grpc_op_data::grpc_op_recv_status_on_client::status
grpc_status_code * status
Definition: grpc_types.h:702
my_dns_lookup_ares
grpc_ares_request * my_dns_lookup_ares(const char *, const char *addr, const char *, grpc_pollset_set *, grpc_closure *on_done, std::unique_ptr< grpc_core::ServerAddressList > *addresses, std::unique_ptr< grpc_core::ServerAddressList > *, char **, int)
Definition: api_fuzzer.cc:171
dont_log
static void dont_log(gpr_log_func_args *)
Definition: api_fuzzer.cc:64
grpc_raw_byte_buffer_create
GRPCAPI grpc_byte_buffer * grpc_raw_byte_buffer_create(grpc_slice *slices, size_t nslices)
Definition: byte_buffer.cc:34
g_active_call
static size_t g_active_call
Definition: api_fuzzer.cc:563
metadata
Definition: cq_verifier.cc:48
Call::unref_slices_
std::vector< grpc_slice > unref_slices_
Definition: api_fuzzer.cc:559
Call::call
grpc_call * call() const
Definition: api_fuzzer.cc:351
GRPC_ARG_INTEGER
@ GRPC_ARG_INTEGER
Definition: grpc_types.h:81
grpc_arg::value
union grpc_arg::grpc_arg_value value
memset
return memset(p, 0, total)
Call::sent_initial_metadata_
bool sent_initial_metadata_
Definition: api_fuzzer.cc:551
grpc_arg::grpc_arg_value::pointer
struct grpc_arg::grpc_arg_value::grpc_arg_pointer pointer
grpc_event_engine::experimental::SetDefaultEventEngineFactory
void SetDefaultEventEngineFactory(std::function< std::unique_ptr< EventEngine >()> factory)
Definition: event_engine.cc:34
Call::recv_message_
grpc_byte_buffer * recv_message_
Definition: api_fuzzer.cc:542
grpc_resource_quota
struct grpc_resource_quota grpc_resource_quota
Definition: grpc_types.h:729
Call::recv_initial_metadata_
grpc_metadata_array recv_initial_metadata_
Definition: api_fuzzer.cc:544
GRPC_ARG_STRING
@ GRPC_ARG_STRING
Definition: grpc_types.h:80
Call::NewCopy
T * NewCopy(T value)
Definition: api_fuzzer.cc:374
ActiveCall
static Call * ActiveCall()
Definition: api_fuzzer.cc:565
grpc_op::grpc_op_data::send_initial_metadata
struct grpc_op::grpc_op_data::grpc_op_send_initial_metadata send_initial_metadata
grpc_shutdown_blocking
GRPCAPI void grpc_shutdown_blocking(void)
Definition: init.cc:238
Call::cancelled_
int cancelled_
Definition: api_fuzzer.cc:549
grpc_create_chttp2_transport
grpc_transport * grpc_create_chttp2_transport(const grpc_channel_args *channel_args, grpc_endpoint *ep, bool is_client)
Definition: chttp2_transport.cc:3122
grpc_timer_manager_set_threading
void grpc_timer_manager_set_threading(bool enabled)
Definition: iomgr/timer_manager.cc:346
grpc_core::Server::channel_args
const grpc_channel_args * channel_args() const
Definition: src/core/lib/surface/server.h:132
Call::done
bool done() const
Definition: api_fuzzer.cc:331
timer_manager.h
CallType
CallType
Definition: api_fuzzer.cc:317
GRPC_ARG_RESOURCE_QUOTA
#define GRPC_ARG_RESOURCE_QUOTA
Definition: grpc_types.h:299
grpc_call_get_peer
GRPCAPI char * grpc_call_get_peer(grpc_call *call)
Definition: call.cc:1774
grpc_metadata_array
Definition: grpc_types.h:579
client
Definition: examples/python/async_streaming/client.py:1
grpc_call_details
Definition: grpc_types.h:585
Call::RequestCall
void RequestCall(grpc_server *server, grpc_completion_queue *cq)
Definition: api_fuzzer.cc:353
grpc_pollset_set
struct grpc_pollset_set grpc_pollset_set
Definition: iomgr_fwd.h:23
grpc_op::reserved
void * reserved
Definition: grpc_types.h:646
grpc_core::DNSResolver
Definition: resolve_address.h:42
string.h
addr_req::timer
grpc_timer timer
Definition: api_fuzzer.cc:79
grpc_google_iam_credentials_create
GRPCAPI grpc_call_credentials * grpc_google_iam_credentials_create(const char *authorization_token, const char *authority_selector, void *reserved)
Definition: iam_credentials.cc:70
benchmark.request
request
Definition: benchmark.py:77
Call::recv_trailing_metadata_
grpc_metadata_array recv_trailing_metadata_
Definition: api_fuzzer.cc:545
grpc_channel_check_connectivity_state
GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state(grpc_channel *channel, int try_to_connect)
Definition: channel_connectivity.cc:56
my_tcp_client_connect
static int64_t my_tcp_client_connect(grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *, const grpc_channel_args *, const grpc_resolved_address *, grpc_core::Timestamp deadline)
Definition: api_fuzzer.cc:253
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
grpc_core::Timestamp
Definition: src/core/lib/gprpp/time.h:62
grpc_channel_ping
void grpc_channel_ping(grpc_channel *channel, grpc_completion_queue *cq, void *tag, void *reserved)
Definition: channel_ping.cc:52
gpr_free
GPRAPI void gpr_free(void *ptr)
Definition: alloc.cc:51
Call::ReadSlice
grpc_slice ReadSlice(const T &s)
Definition: api_fuzzer.cc:381
resolve_address.h
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
error
grpc_error_handle error
Definition: retry_filter.cc:499
grpc_status_code
grpc_status_code
Definition: include/grpc/impl/codegen/status.h:28
GRPC_QUEUE_SHUTDOWN
@ GRPC_QUEUE_SHUTDOWN
Definition: grpc_types.h:554
Validator::~Validator
virtual ~Validator()
Definition: api_fuzzer.cc:276
GRPC_OP_COMPLETE
@ GRPC_OP_COMPLETE
Definition: grpc_types.h:558
Call::call_
grpc_call * call_
Definition: api_fuzzer.cc:541
future_connect::deadline
gpr_timespec deadline
Definition: api_fuzzer.cc:201
grpc_resolved_address
Definition: resolved_address.h:34
grpc_server_create
GRPCAPI grpc_server * grpc_server_create(const grpc_channel_args *args, void *reserved)
Definition: src/core/lib/surface/server.cc:1456
gpr_malloc
GPRAPI void * gpr_malloc(size_t size)
Definition: alloc.cc:29
u
OPENSSL_EXPORT pem_password_cb void * u
Definition: pem.h:351
GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING
#define GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(desc, errs, count)
Definition: error.h:307
grpc_call_credentials
Definition: src/core/lib/security/credentials/credentials.h:189
grpc_channel_get_target
GRPCAPI char * grpc_channel_get_target(grpc_channel *channel)
Definition: channel.cc:256
GRPC_CALL_OK
@ GRPC_CALL_OK
Definition: grpc_types.h:466
instance
RefCountedPtr< grpc_tls_certificate_provider > instance
Definition: xds_server_config_fetcher.cc:224
Call::status_
grpc_status_code status_
Definition: api_fuzzer.cc:543
grpc_server_register_completion_queue
GRPCAPI void grpc_server_register_completion_queue(grpc_server *server, grpc_completion_queue *cq, void *reserved)
Definition: src/core/lib/surface/server.cc:1466
grpc_resource_quota_create
GRPCAPI grpc_resource_quota * grpc_resource_quota_create(const char *trace_name)
Definition: api.cc:66
grpc_call_credentials_release
GRPCAPI void grpc_call_credentials_release(grpc_call_credentials *creds)
Definition: credentials.cc:42
setup.name
name
Definition: setup.py:542
env.h
start_scheduling_grpc_passthru_endpoint_channel_effects
void start_scheduling_grpc_passthru_endpoint_channel_effects(grpc_endpoint *ep, const std::vector< grpc_passthru_endpoint_channel_action > &actions)
Definition: passthru_endpoint.cc:495
Validator
Definition: api_fuzzer.cc:272
GRPC_LOG_IF_ERROR
#define GRPC_LOG_IF_ERROR(what, error)
Definition: error.h:398
grpc_core::Executor::SetThreadingAll
static void SetThreadingAll(bool enable)
Definition: executor.cc:446
grpc_composite_call_credentials_create
GRPCAPI grpc_call_credentials * grpc_composite_call_credentials_create(grpc_call_credentials *creds1, grpc_call_credentials *creds2, void *reserved)
Definition: composite_credentials.cc:129
ValidateConnectivityWatch
static Validator * ValidateConnectivityWatch(gpr_timespec deadline, int *counter)
Definition: api_fuzzer.cc:301
xds_manager.p
p
Definition: xds_manager.py:60
GRPC_CLOSURE_CREATE
#define GRPC_CLOSURE_CREATE(cb, cb_arg, scheduler)
Definition: closure.h:160
grpc_security.h
ReadChannelCreds
static grpc_channel_credentials * ReadChannelCreds(const api_fuzzer::ChannelCreds &creds)
Definition: api_fuzzer.cc:716
Call::Shutdown
void Shutdown()
Definition: api_fuzzer.cc:339
name_
const std::string name_
Definition: priority.cc:233
grpc_timer_manager_tick
void grpc_timer_manager_tick()
Definition: iomgr/timer_manager.cc:96
grpc_timer
Definition: iomgr/timer.h:33
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
addr_req
struct addr_req addr_req
grpc_channel_args
Definition: grpc_types.h:132
on_done_
grpc_closure on_done_
Definition: google_c2p_resolver.cc:102
T
#define T(upbtypeconst, upbtype, ctype, default_value)
addr_req
Definition: api_fuzzer.cc:78
grpc_access_token_credentials_create
GRPCAPI grpc_call_credentials * grpc_access_token_credentials_create(const char *access_token, void *reserved)
Definition: oauth2_credentials.cc:744
grpc_op::grpc_op_data::recv_message
struct grpc_op::grpc_op_data::grpc_op_recv_message recv_message
grpc_connectivity_state
grpc_connectivity_state
Definition: include/grpc/impl/codegen/connectivity_state.h:30
gpr_log_func_args
Definition: include/grpc/impl/codegen/log.h:77
call
FilterStackCall * call
Definition: call.cc:750
grpc_ssl_credentials_create
GRPCAPI grpc_channel_credentials * grpc_ssl_credentials_create(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, const verify_peer_options *verify_options, void *reserved)
Definition: ssl_credentials.cc:132
grpc_op::data
union grpc_op::grpc_op_data data
Validator::Validator
Validator(std::function< void(bool)> impl)
Definition: api_fuzzer.cc:274
client
static uv_tcp_t client
Definition: test-callback-stack.c:33
grpc_metadata_array_destroy
GRPCAPI void grpc_metadata_array_destroy(grpc_metadata_array *array)
Definition: metadata_array.cc:35
kMaxWaitMs
static constexpr uint64_t kMaxWaitMs
Definition: api_fuzzer.cc:51
future_connect
Definition: api_fuzzer.cc:197
DEBUG_LOCATION
#define DEBUG_LOCATION
Definition: debug_location.h:41
grpc_op::grpc_op_data::grpc_op_recv_message::recv_message
struct grpc_byte_buffer ** recv_message
Definition: grpc_types.h:693
string_util.h
grpc_server_request_call
GRPCAPI grpc_call_error grpc_server_request_call(grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new)
Definition: src/core/lib/surface/server.cc:1526
grpc_metadata
Definition: grpc_types.h:537
server
std::unique_ptr< Server > server
Definition: channelz_service_test.cc:330
grpc_passthru_endpoint_create
void grpc_passthru_endpoint_create(grpc_endpoint **client, grpc_endpoint **server, grpc_passthru_endpoint_stats *stats, bool simulate_channel_actions)
Definition: passthru_endpoint.cc:413
g_channel_actions
static std::vector< grpc_passthru_endpoint_channel_action > g_channel_actions
Definition: api_fuzzer.cc:72
do_connect
static void do_connect(void *arg, grpc_error_handle error)
Definition: api_fuzzer.cc:204
parse_address.h
grpc_test_only_set_slice_hash_seed
void grpc_test_only_set_slice_hash_seed(uint32_t seed)
Definition: slice_refcount.cc:33
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
gpr_getenv
char * gpr_getenv(const char *name)
GRPC_OP_RECV_INITIAL_METADATA
@ GRPC_OP_RECV_INITIAL_METADATA
Definition: grpc_types.h:617
grpc_arg::grpc_arg_value::string
char * string
Definition: grpc_types.h:107
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
GPR_ASSERT
#define GPR_ASSERT(x)
Definition: include/grpc/impl/codegen/log.h:94
MakeValidator
Validator * MakeValidator(std::function< void(bool)> impl)
Definition: api_fuzzer.cc:286
int64_t
signed __int64 int64_t
Definition: stdint-msvc2008.h:89
GRPC_OP_SEND_STATUS_FROM_SERVER
@ GRPC_OP_SEND_STATUS_FROM_SERVER
Definition: grpc_types.h:612
grpc_arg::grpc_arg_value::grpc_arg_pointer::vtable
const grpc_arg_pointer_vtable * vtable
Definition: grpc_types.h:111
gpr_time_cmp
GPRAPI int gpr_time_cmp(gpr_timespec a, gpr_timespec b)
Definition: src/core/lib/gpr/time.cc:30
gen_stats_data.c_str
def c_str(s, encoding='ascii')
Definition: gen_stats_data.py:38
grpc_core::DNSResolver::kNullHandle
static constexpr TaskHandle kNullHandle
Definition: resolve_address.h:46
fuzzing_event_engine.h
grpc_resource_quota_arg_vtable
const GRPCAPI grpc_arg_pointer_vtable * grpc_resource_quota_arg_vtable(void)
Definition: api.cc:62
free_non_null
static void free_non_null(void *p)
Definition: api_fuzzer.cc:312
grpc_call_unref
GRPCAPI void grpc_call_unref(grpc_call *call)
Definition: call.cc:1770
grpc_op::grpc_op_data::grpc_op_send_status_from_server::status
grpc_status_code status
Definition: grpc_types.h:673
grpc_set_tcp_client_impl
void grpc_set_tcp_client_impl(grpc_tcp_client_vtable *impl)
Definition: tcp_client.cc:39
grpc_ares_wrapper.h
slice
grpc_slice slice
Definition: src/core/lib/surface/server.cc:467
setup.v
v
Definition: third_party/bloaty/third_party/capstone/bindings/python/setup.py:42
grpc_event
Definition: grpc_types.h:564
Call::send_message_
grpc_byte_buffer * send_message_
Definition: api_fuzzer.cc:554
Call::type_
CallType type_
Definition: api_fuzzer.cc:540
grpc_completion_queue
Definition: completion_queue.cc:347
transport
grpc_transport transport
Definition: filter_fuzzer.cc:146
AssertSuccessAndDecrement
static Validator * AssertSuccessAndDecrement(int *counter)
Definition: api_fuzzer.cc:290
closure
grpc_closure closure
Definition: src/core/lib/surface/server.cc:466
Call::FinishedRequestCall
Validator * FinishedRequestCall()
Definition: api_fuzzer.cc:524
absl::UnknownError
Status UnknownError(absl::string_view message)
Definition: third_party/abseil-cpp/absl/status/status.cc:383
grpc.h
grpc_call
struct grpc_call grpc_call
Definition: grpc_types.h:70
CallType::TOMBSTONED
@ TOMBSTONED
grpc_byte_buffer
Definition: grpc_types.h:43
CallType::PENDING_SERVER
@ PENDING_SERVER
uint64_t
unsigned __int64 uint64_t
Definition: stdint-msvc2008.h:90
absl::optional
Definition: abseil-cpp/absl/types/internal/optional.h:61
grpc_insecure_credentials_create
GRPCAPI grpc_channel_credentials * grpc_insecure_credentials_create()
Definition: core/lib/security/credentials/insecure/insecure_credentials.cc:64
done
struct tab * done
Definition: bloaty/third_party/zlib/examples/enough.c:176
grpc_op
Definition: grpc_types.h:640
GRPC_OP_SEND_MESSAGE
@ GRPC_OP_SEND_MESSAGE
Definition: grpc_types.h:602
counter
static int counter
Definition: abseil-cpp/absl/flags/reflection_test.cc:131
grpc_channel_args_destroy
void grpc_channel_args_destroy(grpc_channel_args *a)
Definition: channel_args.cc:360
grpc_channel_args::num_args
size_t num_args
Definition: grpc_types.h:133
ReadSslChannelCreds
static grpc_channel_credentials * ReadSslChannelCreds(const api_fuzzer::SslChannelCreds &creds)
Definition: api_fuzzer.cc:654
arg
Definition: cmdline.cc:40
server_address.h
grpc_op::grpc_op_data::grpc_op_send_status_from_server::trailing_metadata
grpc_metadata * trailing_metadata
Definition: grpc_types.h:672
grpc_empty_slice
GPRAPI grpc_slice grpc_empty_slice(void)
Definition: slice/slice.cc:42
Call
Definition: api_fuzzer.cc:319
grpc_slice
Definition: include/grpc/impl/codegen/slice.h:65
grpc_arg::grpc_arg_value::grpc_arg_pointer::p
void * p
Definition: grpc_types.h:110
GPR_CLOCK_MONOTONIC
@ GPR_CLOCK_MONOTONIC
Definition: gpr_types.h:36
grpc_server
struct grpc_server grpc_server
Definition: grpc_types.h:65
googletest-filter-unittest.child
child
Definition: bloaty/third_party/googletest/googletest/test/googletest-filter-unittest.py:62
grpc_server_destroy
GRPCAPI void grpc_server_destroy(grpc_server *server)
Definition: src/core/lib/surface/server.cc:1519
batch
grpc_transport_stream_op_batch * batch
Definition: retry_filter.cc:243
grpc_composite_channel_credentials_create
GRPCAPI grpc_channel_credentials * grpc_composite_channel_credentials_create(grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds, void *reserved)
Definition: composite_credentials.cc:164
slice_internal.h
g_channel
static grpc_channel * g_channel
Definition: api_fuzzer.cc:70
ReadCredArtifact
static const char * ReadCredArtifact(const api_fuzzer::CredArtifact &artifact, std::initializer_list< const char * > builtins)
Definition: api_fuzzer.cc:637
GPR_UNREACHABLE_CODE
#define GPR_UNREACHABLE_CODE(STATEMENT)
Definition: impl/codegen/port_platform.h:652
min
#define min(a, b)
Definition: qsort.h:83
Call::call_closed_
bool call_closed_
Definition: api_fuzzer.cc:555
gpr_now
GPRAPI gpr_timespec gpr_now(gpr_clock_type clock)
grpc_event_engine::experimental::ResetDefaultEventEngine
void ResetDefaultEventEngine()
Reset the default event engine.
Definition: event_engine.cc:62
grpc_core::ExecCtx
Definition: exec_ctx.h:97
tcp_client.h
sched_connect
static void sched_connect(grpc_closure *closure, grpc_endpoint **ep, gpr_timespec deadline)
Definition: api_fuzzer.cc:233
msg
std::string msg
Definition: client_interceptors_end2end_test.cc:372
executor.h
grpc_op::op
grpc_op_type op
Definition: grpc_types.h:642
GRPC_ERROR_CREATE_FROM_STATIC_STRING
#define GRPC_ERROR_CREATE_FROM_STATIC_STRING(desc)
Definition: error.h:291
grpc_server_cancel_all_calls
GRPCAPI void grpc_server_cancel_all_calls(grpc_server *server)
Definition: src/core/lib/surface/server.cc:1512
kNull
static const int kNull
Definition: stack_test.cc:58
grpc_op::grpc_op_data::grpc_op_send_initial_metadata::count
size_t count
Definition: grpc_types.h:653
GRPC_SLICE_LENGTH
#define GRPC_SLICE_LENGTH(slice)
Definition: include/grpc/impl/codegen/slice.h:104
my_cancel_ares_request
static void my_cancel_ares_request(grpc_ares_request *request)
Definition: api_fuzzer.cc:188
grpc_op::grpc_op_data::grpc_op_recv_status_on_client::status_details
grpc_slice * status_details
Definition: grpc_types.h:703
future_connect::ep
grpc_endpoint ** ep
Definition: api_fuzzer.cc:200
gpr_timespec::clock_type
gpr_clock_type clock_type
Definition: gpr_types.h:55
grpc_ares_request
Definition: grpc_ares_wrapper.h:56
value
const char * value
Definition: hpack_parser_table.cc:165
grpc_channel_credentials_release
GRPCAPI void grpc_channel_credentials_release(grpc_channel_credentials *creds)
Definition: credentials.cc:36
grpc_channel_create_call
GRPCAPI grpc_call * grpc_channel_create_call(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, grpc_slice method, const grpc_slice *host, gpr_timespec deadline, void *reserved)
Definition: channel.cc:311
gpr_inf_past
GPRAPI gpr_timespec gpr_inf_past(gpr_clock_type type)
Definition: src/core/lib/gpr/time.cc:63
grpc_op::grpc_op_data::recv_close_on_server
struct grpc_op::grpc_op_data::grpc_op_recv_close_on_server recv_close_on_server
GRPC_OP_RECV_MESSAGE
@ GRPC_OP_RECV_MESSAGE
Definition: grpc_types.h:621
absl::hash_internal::c1
static const uint32_t c1
Definition: abseil-cpp/absl/hash/internal/city.cc:58
absl::Now
ABSL_NAMESPACE_BEGIN Time Now()
Definition: abseil-cpp/absl/time/clock.cc:39
Call::Allocate
void * Allocate(size_t size)
Definition: api_fuzzer.cc:362
kMaxAddNWritableBytes
static constexpr uint64_t kMaxAddNWritableBytes
Definition: api_fuzzer.cc:56
grpc_channel_create
GRPCAPI grpc_channel * grpc_channel_create(const char *target, grpc_channel_credentials *creds, const grpc_channel_args *args)
Definition: chttp2_connector.cc:366
grpc_core::Server
Definition: src/core/lib/surface/server.h:75
GRPC_ERROR_REF
#define GRPC_ERROR_REF(err)
Definition: error.h:261
grpc_op::grpc_op_data::send_status_from_server
struct grpc_op::grpc_op_data::grpc_op_send_status_from_server send_status_from_server
key
const char * key
Definition: hpack_parser_table.cc:164
grpc_resource_quota_resize
GRPCAPI void grpc_resource_quota_resize(grpc_resource_quota *resource_quota, size_t new_size)
Definition: api.cc:83
client.action
action
Definition: examples/python/xds/client.py:49
Call::call_details_
grpc_call_details call_details_
Definition: api_fuzzer.cc:553
gpr_time_add
GPRAPI gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b)
Definition: src/core/lib/gpr/time.cc:135
server
Definition: examples/python/async_streaming/server.py:1
Call::FinishedBatchValidator
Validator * FinishedBatchValidator(uint8_t has_ops)
Definition: api_fuzzer.cc:501
grpc_completion_queue_destroy
GRPCAPI void grpc_completion_queue_destroy(grpc_completion_queue *cq)
Definition: completion_queue.cc:1424
GRPC_OP_SEND_INITIAL_METADATA
@ GRPC_OP_SEND_INITIAL_METADATA
Definition: grpc_types.h:598
tests.unit._server_ssl_cert_config_test.Call
Call
Definition: _server_ssl_cert_config_test.py:70
DEFINE_PROTO_FUZZER
DEFINE_PROTO_FUZZER(const api_fuzzer::Msg &msg)
Definition: api_fuzzer.cc:751
exec_ctx
grpc_core::ExecCtx exec_ctx
Definition: end2end_binder_transport_test.cc:75
future_connect::timer
grpc_timer timer
Definition: api_fuzzer.cc:198
grpc_op::grpc_op_data::send_message
struct grpc_op::grpc_op_data::grpc_op_send_message send_message
Call::pending_recv_message_op_
bool pending_recv_message_op_
Definition: api_fuzzer.cc:556
CallType::CLIENT
@ CLIENT
grpc_resource_quota_unref
GRPCAPI void grpc_resource_quota_unref(grpc_resource_quota *resource_quota)
Definition: api.cc:79
passthru_endpoint.h
gpr_time_from_micros
GPRAPI gpr_timespec gpr_time_from_micros(int64_t us, gpr_clock_type clock_type)
Definition: src/core/lib/gpr/time.cc:115
alloc.h
private_key
Definition: hrss.c:1885
grpc_op::grpc_op_data::grpc_op_send_initial_metadata::metadata
grpc_metadata * metadata
Definition: grpc_types.h:654
Call::free_pointers_
std::vector< void * > free_pointers_
Definition: api_fuzzer.cc:558
grpc_op::grpc_op_data::recv_status_on_client
struct grpc_op::grpc_op_data::grpc_op_recv_status_on_client recv_status_on_client
fix_build_deps.r
r
Definition: fix_build_deps.py:491
squelch
bool squelch
Definition: api_fuzzer.cc:61
std
Definition: grpcpp/impl/codegen/async_unary_call.h:407
grpc_op::grpc_op_data::grpc_op_send_status_from_server::trailing_metadata_count
size_t trailing_metadata_count
Definition: grpc_types.h:671
grpc_arg::key
char * key
Definition: grpc_types.h:105
Call::pending_ops_
int pending_ops_
Definition: api_fuzzer.cc:550
g_server
static grpc_server * g_server
Definition: api_fuzzer.cc:69
grpc_core::Duration::Seconds
static constexpr Duration Seconds(int64_t seconds)
Definition: src/core/lib/gprpp/time.h:151
chttp2_transport.h
grpc_core::DNSResolver::ResolveName
virtual TaskHandle ResolveName(absl::string_view name, absl::string_view default_port, grpc_pollset_set *interested_parties, std::function< void(absl::StatusOr< std::vector< grpc_resolved_address >>)> on_done)=0
grpc_server_shutdown_and_notify
GRPCAPI void grpc_server_shutdown_and_notify(grpc_server *server, grpc_completion_queue *cq, void *tag)
Definition: src/core/lib/surface/server.cc:1503
addr_req::on_done
grpc_closure * on_done
Definition: api_fuzzer.cc:81
slices
SliceBuffer * slices
Definition: retry_filter.cc:631
grpc_byte_buffer_destroy
GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *bb)
Definition: byte_buffer.cc:81
grpc_completion_queue_next
GRPCAPI grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved)
Definition: completion_queue.cc:1133
grpc_completion_queue_shutdown
GRPCAPI void grpc_completion_queue_shutdown(grpc_completion_queue *cq)
Definition: completion_queue.cc:1416
ok
bool ok
Definition: async_end2end_test.cc:197
arg
struct arg arg
grpc_event_engine::experimental::GetDefaultEventEngine
EventEngine * GetDefaultEventEngine()
Definition: event_engine.cc:47
grpc_channel_destroy
GRPCAPI void grpc_channel_destroy(grpc_channel *channel)
Definition: channel.cc:437
ReadCallCreds
static grpc_call_credentials * ReadCallCreds(const api_fuzzer::CallCreds &creds)
Definition: api_fuzzer.cc:679
grpc_core::SetDNSResolver
void SetDNSResolver(DNSResolver *resolver)
Definition: resolve_address.cc:36
grpc_dns_lookup_ares
grpc_ares_request *(* grpc_dns_lookup_ares)(const char *dns_server, const char *name, const char *default_port, grpc_pollset_set *interested_parties, grpc_closure *on_done, std::unique_ptr< grpc_core::ServerAddressList > *addresses, std::unique_ptr< grpc_core::ServerAddressList > *balancer_addresses, char **service_config_json, int query_timeout_ms)
CallType::SERVER
@ SERVER
grpc_slice_from_cpp_string
grpc_slice grpc_slice_from_cpp_string(std::string str)
Definition: slice/slice.cc:202
kMaxAddNReadableBytes
static constexpr uint64_t kMaxAddNReadableBytes
Definition: api_fuzzer.cc:54
server.h
Call::recv_status_details_
grpc_slice recv_status_details_
Definition: api_fuzzer.cc:546
grpc_timer_init
void grpc_timer_init(grpc_timer *timer, grpc_core::Timestamp deadline, grpc_closure *closure)
Definition: iomgr/timer.cc:31
fc
StreamFlowControl fc
Definition: flow_control_fuzzer.cc:90
closure
Definition: proxy.cc:59
grpc_core::ExecCtx::Run
static void Run(const DebugLocation &location, grpc_closure *closure, grpc_error_handle error)
Definition: exec_ctx.cc:98
finish_resolve
static void finish_resolve(void *arg, grpc_error_handle error)
Definition: api_fuzzer.cc:85
g_calls
static std::vector< std::shared_ptr< Call > > g_calls
Definition: api_fuzzer.cc:562
grpc_channel
struct grpc_channel grpc_channel
Definition: grpc_types.h:62
grpc_transport
Definition: transport_impl.h:89
GRPC_OP_RECV_CLOSE_ON_SERVER
@ GRPC_OP_RECV_CLOSE_ON_SERVER
Definition: grpc_types.h:633
fuzz_tcp_client_vtable
grpc_tcp_client_vtable fuzz_tcp_client_vtable
Definition: api_fuzzer.cc:266
channel_args.h
timer.h
grpc_channel_watch_connectivity_state
GRPCAPI void grpc_channel_watch_connectivity_state(grpc_channel *channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue *cq, void *tag)
Definition: channel_connectivity.cc:227
Call::ReadMetadata
grpc_metadata_array ReadMetadata(const M &metadata)
Definition: api_fuzzer.cc:388
Validator::impl_
std::function< void(bool)> impl_
Definition: api_fuzzer.cc:283
grpc_core::DNSResolver::Cancel
virtual bool Cancel(TaskHandle handle)=0
grpc_tracer_set_enabled
GRPCAPI int grpc_tracer_set_enabled(const char *name, int enabled)
Definition: debug/trace.cc:153
ReadArgs
grpc_channel_args * ReadArgs(const ChannelArgContainer &args)
Definition: api_fuzzer.cc:602
Call::~Call
~Call()
Definition: api_fuzzer.cc:578
gpr_strdup
GPRAPI char * gpr_strdup(const char *src)
Definition: string.cc:39
grpc_parse_ipv4_hostport
bool grpc_parse_ipv4_hostport(absl::string_view hostport, grpc_resolved_address *addr, bool log_errors)
Definition: parse_address.cc:146
addr_req::addresses
std::unique_ptr< grpc_core::ServerAddressList > * addresses
Definition: api_fuzzer.cc:82
Call::ReadOp
absl::optional< grpc_op > ReadOp(const api_fuzzer::BatchOp &batch_op, bool *batch_is_ok, uint8_t *batch_ops, std::vector< std::function< void()>> *unwinders)
Definition: api_fuzzer.cc:398
grpc_tcp_client_vtable
Definition: tcp_client.h:32
grpc_resource_quota_ref
GRPCAPI void grpc_resource_quota_ref(grpc_resource_quota *resource_quota)
Definition: api.cc:75
grpc_completion_queue_create_for_next
GRPCAPI grpc_completion_queue * grpc_completion_queue_create_for_next(void *reserved)
Definition: completion_queue_factory.cc:62
GRPC_CHANNEL_SHUTDOWN
@ GRPC_CHANNEL_SHUTDOWN
Definition: include/grpc/impl/codegen/connectivity_state.h:40
grpc_op::grpc_op_data::recv_initial_metadata
struct grpc_op::grpc_op_data::grpc_op_recv_initial_metadata recv_initial_metadata
GRPC_ARG_POINTER
@ GRPC_ARG_POINTER
Definition: grpc_types.h:82
grpc_op::grpc_op_data::grpc_op_send_status_from_server::status_details
grpc_slice * status_details
Definition: grpc_types.h:677
ssl_test_data.h
absl::StatusOr
Definition: abseil-cpp/absl/status/statusor.h:187
Call::AllocArray
T * AllocArray(size_t elems)
Definition: api_fuzzer.cc:369
grpc_core::ExecCtx::Now
Timestamp Now()
Definition: exec_ctx.cc:90
gpr_timespec
Definition: gpr_types.h:50
grpc_event::type
grpc_completion_type type
Definition: grpc_types.h:566
grpc_arg::grpc_arg_value::integer
int integer
Definition: grpc_types.h:108
googletest-break-on-failure-unittest.Run
def Run(command)
Definition: bloaty/third_party/googletest/googletest/test/googletest-break-on-failure-unittest.py:76
gpr_set_log_function
GPRAPI void gpr_set_log_function(gpr_log_func func)
Definition: log.cc:143
grpc_init
GRPCAPI void grpc_init(void)
Definition: init.cc:146
grpc_server_start
GRPCAPI void grpc_server_start(grpc_server *server)
Definition: src/core/lib/surface/server.cc:1497
grpc_error
Definition: error_internal.h:42
function
std::function< bool(GrpcTool *, int, const char **, const CliCredentials &, GrpcToolOutputCallback)> function
Definition: grpc_tool.cc:250
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
GRPC_OP_RECV_STATUS_ON_CLIENT
@ GRPC_OP_RECV_STATUS_ON_CLIENT
Definition: grpc_types.h:627
event_engine_factory.h
leak_check
bool leak_check
Definition: api_fuzzer.cc:62
g_channel_force_delete
static std::atomic< bool > g_channel_force_delete
Definition: api_fuzzer.cc:73
grpc_op::grpc_op_data::grpc_op_recv_initial_metadata::recv_initial_metadata
grpc_metadata_array * recv_initial_metadata
Definition: grpc_types.h:685
self
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END intern self
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/map.c:543
tests.interop.resources.private_key
def private_key()
Definition: interop/resources.py:29
GPR_CLOCK_REALTIME
@ GPR_CLOCK_REALTIME
Definition: gpr_types.h:39
my_tcp_cancel_connect
static bool my_tcp_cancel_connect(int64_t)
Definition: api_fuzzer.cc:262
regress.m
m
Definition: regress/regress.py:25
method
NSString * method
Definition: ProtoMethod.h:28
grpc_core::CppImplOf< Server, grpc_server >::FromC
static Server * FromC(grpc_server *c_type)
Definition: cpp_impl_of.h:30
grpc_arg::type
grpc_arg_type type
Definition: grpc_types.h:104
grpc_channel_args::args
grpc_arg * args
Definition: grpc_types.h:134
grpc_closure
Definition: closure.h:56
grpc_event_engine::experimental::FuzzingEventEngine
Definition: fuzzing_event_engine.h:32
op
static grpc_op * op
Definition: test/core/fling/client.cc:47
Call::Call
Call(CallType type)
Definition: api_fuzzer.cc:321
grpc_event::success
int success
Definition: grpc_types.h:572
ops
static grpc_op ops[6]
Definition: test/core/fling/client.cc:39
GRPC_QUEUE_TIMEOUT
@ GRPC_QUEUE_TIMEOUT
Definition: grpc_types.h:556
grpc_call_start_batch
GRPCAPI grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, size_t nops, void *tag, void *reserved)
Definition: call.cc:1831
grpc_cancel_ares_request
void(* grpc_cancel_ares_request)(grpc_ares_request *request)
grpc_endpoint
Definition: endpoint.h:105
grpc_core::DNSResolver::ResolveNameBlocking
virtual absl::StatusOr< std::vector< grpc_resolved_address > > ResolveNameBlocking(absl::string_view name, absl::string_view default_port)=0
grpc_ssl_pem_key_cert_pair
Definition: grpc_security.h:173
grpc_channel_credentials
Definition: src/core/lib/security/credentials/credentials.h:96
addr
struct sockaddr_in addr
Definition: libuv/docs/code/tcp-echo-server/main.c:10
grpc_event::tag
void * tag
Definition: grpc_types.h:576
grpc_op::grpc_op_data::grpc_op_recv_close_on_server::cancelled
int * cancelled
Definition: grpc_types.h:714
cq
static grpc_completion_queue * cq
Definition: test/core/fling/client.cc:37
grpc_chttp2_transport_start_reading
void grpc_chttp2_transport_start_reading(grpc_transport *transport, grpc_slice_buffer *read_buffer, grpc_closure *notify_on_receive_settings, grpc_closure *notify_on_close)
Definition: chttp2_transport.cc:3128
grpc_core::ExecCtx::Get
static ExecCtx * Get()
Definition: exec_ctx.h:205
grpc_core::Timestamp::as_timespec
gpr_timespec as_timespec(gpr_clock_type type) const
Definition: src/core/lib/gprpp/time.cc:157
GRPC_OP_SEND_CLOSE_FROM_CLIENT
@ GRPC_OP_SEND_CLOSE_FROM_CLIENT
Definition: grpc_types.h:607
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
addr_req::addr
char * addr
Definition: api_fuzzer.cc:80
grpc_metadata_array_init
GRPCAPI void grpc_metadata_array_init(grpc_metadata_array *array)
Definition: metadata_array.cc:30
Decrement
static Validator * Decrement(int *counter)
Definition: api_fuzzer.cc:297
GRPC_ERROR_IS_NONE
#define GRPC_ERROR_IS_NONE(err)
Definition: error.h:241
absl::hash_internal::c2
static const uint32_t c2
Definition: abseil-cpp/absl/hash/internal/city.cc:59
channel.h
Call::enqueued_recv_initial_metadata_
bool enqueued_recv_initial_metadata_
Definition: api_fuzzer.cc:552


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:31