aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-03-01 16:25:11 -0800
committerGravatar GitHub <noreply@github.com>2018-03-01 16:25:11 -0800
commitfa0c3314cff8e1b5f300645b5e8043a3f3aed330 (patch)
tree61823d969ceffbd24f6e7de65b065bfca5e06eb0
parent931b85609c8d6a3dc854a0c4c7412ba0e32adbd5 (diff)
parent7944865d43e6fa2b9496558453d84bfe8839f38e (diff)
Merge pull request #14564 from vjpai/retry_fix
Need to shrink stack frame size; add a todo
-rw-r--r--test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc b/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc
index a8d7f0851a..409fac4888 100644
--- a/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc
+++ b/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc
@@ -109,9 +109,11 @@ static void test_retry_exceeds_buffer_size_in_subsequent_batch(
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
grpc_call_details call_details;
- char buf[102401];
- memset(buf, 'a', sizeof(buf) - 1);
- buf[sizeof(buf) - 1] = '\0';
+ const size_t buf_size = 102401;
+ char* buf = static_cast<char*>(gpr_malloc(buf_size * sizeof(*buf)));
+ memset(buf, 'a', buf_size - 1);
+ buf[buf_size - 1] = '\0';
+ // TODO(markdroth): buf is not a static string, so fix the next line
grpc_slice request_payload_slice = grpc_slice_from_static_string(buf);
grpc_slice response_payload_slice = grpc_slice_from_static_string("bar");
grpc_byte_buffer* request_payload =
@@ -265,6 +267,7 @@ static void test_retry_exceeds_buffer_size_in_subsequent_batch(
end_test(&f);
config.tear_down_data(&f);
+ gpr_free(buf);
}
void retry_exceeds_buffer_size_in_subsequent_batch(