Merge pull request #14868 from dgquintas/fuzz_authority

Fix authority fuzzing failures
pull/14877/head
David G. Quintas 7 years ago committed by GitHub
commit 6bdfcc7d6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      src/core/ext/filters/http/client_authority_filter.cc
  2. 2
      src/core/lib/surface/channel.cc
  3. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-api_fuzzer-5406804084260864
  4. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-api_fuzzer-5471994809155584
  5. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-api_fuzzer-6609852341157888
  6. 69
      tools/run_tests/generated/tests.json

@ -91,14 +91,18 @@ grpc_error* init_channel_elem(grpc_channel_element* elem,
const grpc_arg* default_authority_arg =
grpc_channel_args_find(args->channel_args, GRPC_ARG_DEFAULT_AUTHORITY);
if (default_authority_arg == nullptr) {
gpr_log(
GPR_ERROR,
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"GRPC_ARG_DEFAULT_AUTHORITY channel arg. not found. Note that direct "
"channels must explicity specify a value for this argument.");
abort();
}
chand->default_authority = grpc_slice_from_copied_string(
grpc_channel_arg_get_string(default_authority_arg));
const char* default_authority_str =
grpc_channel_arg_get_string(default_authority_arg);
if (default_authority_str == nullptr) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"GRPC_ARG_DEFAULT_AUTHORITY channel arg. must be a string");
}
chand->default_authority =
grpc_slice_from_copied_string(default_authority_str);
GPR_ASSERT(!args->is_last);
return GRPC_ERROR_NONE;
}

@ -167,7 +167,7 @@ static grpc_core::UniquePtr<char> get_default_authority(
has_default_authority = true;
} else if (0 == strcmp(input_args->args[i].key,
GRPC_SSL_TARGET_NAME_OVERRIDE_ARG)) {
ssl_override = input_args->args[i].value.string;
ssl_override = grpc_channel_arg_get_string(&input_args->args[i]);
}
}
if (!has_default_authority && ssl_override != nullptr) {

@ -104488,6 +104488,75 @@
],
"uses_polling": false
},
{
"args": [
"test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-api_fuzzer-5406804084260864"
],
"ci_platforms": [
"linux"
],
"cpu_cost": 0.1,
"exclude_configs": [
"tsan"
],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "api_fuzzer_one_entry",
"platforms": [
"mac",
"linux"
],
"uses_polling": false
},
{
"args": [
"test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-api_fuzzer-5471994809155584"
],
"ci_platforms": [
"linux"
],
"cpu_cost": 0.1,
"exclude_configs": [
"tsan"
],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "api_fuzzer_one_entry",
"platforms": [
"mac",
"linux"
],
"uses_polling": false
},
{
"args": [
"test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-api_fuzzer-6609852341157888"
],
"ci_platforms": [
"linux"
],
"cpu_cost": 0.1,
"exclude_configs": [
"tsan"
],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "api_fuzzer_one_entry",
"platforms": [
"mac",
"linux"
],
"uses_polling": false
},
{
"args": [
"test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-4688823906729984"

Loading…
Cancel
Save