diff options
author | Craig Tiller <ctiller@google.com> | 2017-02-13 12:44:14 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-02-13 12:44:14 -0800 |
commit | 4dde8b277d5196962f5c08afd39db94f50242c29 (patch) | |
tree | fb39dd7c5621ae3bbc3f2cf441df831e3e501fd2 /test | |
parent | 96f8728b06740dd6b63ab463319b4795209dbec4 (diff) |
Fix stack corruption
Diffstat (limited to 'test')
-rw-r--r-- | test/cpp/microbenchmarks/bm_closure.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/cpp/microbenchmarks/bm_closure.cc b/test/cpp/microbenchmarks/bm_closure.cc index dac7d9c677..80d6610e13 100644 --- a/test/cpp/microbenchmarks/bm_closure.cc +++ b/test/cpp/microbenchmarks/bm_closure.cc @@ -324,7 +324,8 @@ class Rescheduler { static void BM_ClosureReschedOnExecCtx(benchmark::State& state) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - Rescheduler(state, grpc_schedule_on_exec_ctx).ScheduleFirst(&exec_ctx); + Rescheduler r(state, grpc_schedule_on_exec_ctx); + r.ScheduleFirst(&exec_ctx); grpc_exec_ctx_finish(&exec_ctx); } BENCHMARK(BM_ClosureReschedOnExecCtx); @@ -332,8 +333,8 @@ BENCHMARK(BM_ClosureReschedOnExecCtx); static void BM_ClosureReschedOnCombiner(benchmark::State& state) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_combiner* combiner = grpc_combiner_create(NULL); - Rescheduler(state, grpc_combiner_scheduler(combiner, false)) - .ScheduleFirst(&exec_ctx); + Rescheduler r(state, grpc_combiner_scheduler(combiner, false)); + r.ScheduleFirst(&exec_ctx); grpc_exec_ctx_flush(&exec_ctx); GRPC_COMBINER_UNREF(&exec_ctx, combiner, "finished"); grpc_exec_ctx_finish(&exec_ctx); @@ -343,9 +344,9 @@ BENCHMARK(BM_ClosureReschedOnCombiner); static void BM_ClosureReschedOnCombinerFinally(benchmark::State& state) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_combiner* combiner = grpc_combiner_create(NULL); - Rescheduler(state, grpc_combiner_finally_scheduler(combiner, false)) - .ScheduleFirstAgainstDifferentScheduler( - &exec_ctx, grpc_combiner_scheduler(combiner, false)); + Rescheduler r(state, grpc_combiner_finally_scheduler(combiner, false)); + r.ScheduleFirstAgainstDifferentScheduler( + &exec_ctx, grpc_combiner_scheduler(combiner, false)); grpc_exec_ctx_flush(&exec_ctx); GRPC_COMBINER_UNREF(&exec_ctx, combiner, "finished"); grpc_exec_ctx_finish(&exec_ctx); |