From 11c1c47fe95e6ec8c9ff97d1e702561eee36434e Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Mon, 20 Nov 2017 21:41:51 -0800 Subject: Fix real TSAN/ASAN bug --- src/core/lib/channel/channel_stack.h | 2 +- src/core/lib/iomgr/error.cc | 2 +- src/core/lib/surface/call.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 41851382ae..6419f1ac48 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -84,7 +84,7 @@ typedef struct { typedef struct { grpc_call_stats stats; grpc_status_code final_status; - const char* error_string; + const char** error_string; } grpc_call_final_info; /* Channel filters specify: diff --git a/src/core/lib/iomgr/error.cc b/src/core/lib/iomgr/error.cc index 5fe6514802..581b903f1a 100644 --- a/src/core/lib/iomgr/error.cc +++ b/src/core/lib/iomgr/error.cc @@ -754,7 +754,7 @@ const char* grpc_error_string(grpc_error* err) { if (!gpr_atm_rel_cas(&err->atomics.error_string, 0, (gpr_atm)out)) { gpr_free(out); - out = (char*)gpr_atm_acq_load(&err->atomics.error_string); + out = (char*)gpr_atm_no_barrier_load(&err->atomics.error_string); } GPR_TIMER_END("grpc_error_string", 0); diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index c67b577ba1..d9185ec81e 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -551,7 +551,7 @@ static void destroy_call(grpc_exec_ctx* exec_ctx, void* call, get_final_status(exec_ctx, c, set_status_value_directly, &c->final_info.final_status, nullptr, - &c->final_info.error_string); + c->final_info.error_string); c->final_info.stats.latency = gpr_time_sub(gpr_now(GPR_CLOCK_MONOTONIC), c->start_time); -- cgit v1.2.3