diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-12-06 09:47:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-06 09:47:54 -0800 |
commit | 8cf1470a51ea276ca84825e7495d4ee24743540d (patch) | |
tree | 72385cc865094115bc08cb813201d48cb09840bb /test/core/client_channel/uri_fuzzer_test.cc | |
parent | 1d4e99508409be052bd129ba507bae1fbe7eb7fa (diff) |
Revert "Revert "All instances of exec_ctx being passed around in src/core removed""
Diffstat (limited to 'test/core/client_channel/uri_fuzzer_test.cc')
-rw-r--r-- | test/core/client_channel/uri_fuzzer_test.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/test/core/client_channel/uri_fuzzer_test.cc b/test/core/client_channel/uri_fuzzer_test.cc index ba31793ff3..ee38453166 100644 --- a/test/core/client_channel/uri_fuzzer_test.cc +++ b/test/core/client_channel/uri_fuzzer_test.cc @@ -20,6 +20,7 @@ #include <stdint.h> #include <string.h> +#include <grpc/grpc.h> #include <grpc/support/alloc.h> #include "src/core/ext/filters/client_channel/uri_parser.h" @@ -33,12 +34,18 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { memcpy(s, data, size); s[size] = 0; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_uri* x; - if ((x = grpc_uri_parse(&exec_ctx, s, 1))) { - grpc_uri_destroy(x); + grpc_init(); + + { + grpc_core::ExecCtx exec_ctx; + grpc_uri* x; + if ((x = grpc_uri_parse(s, 1))) { + grpc_uri_destroy(x); + } + + gpr_free(s); } - grpc_exec_ctx_finish(&exec_ctx); - gpr_free(s); + + grpc_shutdown(); return 0; } |