diff options
Diffstat (limited to 'test/core/bad_client/bad_client.c')
-rw-r--r-- | test/core/bad_client/bad_client.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index 433ecf69df..95b079768c 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -34,12 +34,15 @@ #include "test/core/bad_client/bad_client.h" #include <grpc/support/alloc.h> +#include <grpc/support/string_util.h> #include <grpc/support/sync.h> #include <grpc/support/thd.h> +#include <stdio.h> #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/http_server_filter.h" #include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/support/murmur_hash.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/completion_queue.h" #include "src/core/lib/surface/server.h" @@ -86,6 +89,15 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator, grpc_closure done_write_closure; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + uint32_t hash = gpr_murmur_hash3(client_payload, client_payload_length, 0); + char *fn; + gpr_asprintf(&fn, "test/core/end2end/fuzzers/server_fuzzer_corpus/%08x.bin", + hash); + FILE *f = fopen(fn, "w"); + fwrite(client_payload, 1, client_payload_length, f); + fclose(f); + gpr_free(fn); + hex = gpr_dump(client_payload, client_payload_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); |