aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/client_channel
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-01-18 17:13:57 -0800
committerGravatar GitHub <noreply@github.com>2018-01-18 17:13:57 -0800
commit98f22c7a95936b0560feffe07efbfb1921542e1b (patch)
tree6f62e7fb2d82b1b7224a14e83653175a70ce0484 /test/core/client_channel
parent9db1691c85a720ec661266dcdcc2cbf20f7146f2 (diff)
parent45e754a5afe955526b9309f362953c8258da1cca (diff)
Merge pull request #14078 from yashykt/asan_sockaddr
Solve a stack_use_after_scope issue in sockaddr_resolver_test
Diffstat (limited to 'test/core/client_channel')
-rw-r--r--test/core/client_channel/resolvers/sockaddr_resolver_test.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/core/client_channel/resolvers/sockaddr_resolver_test.cc b/test/core/client_channel/resolvers/sockaddr_resolver_test.cc
index 4d16a77924..07ee133ee3 100644
--- a/test/core/client_channel/resolvers/sockaddr_resolver_test.cc
+++ b/test/core/client_channel/resolvers/sockaddr_resolver_test.cc
@@ -63,8 +63,10 @@ static void test_succeeds(grpc_resolver_factory* factory, const char* string) {
grpc_resolver_next_locked(resolver, &on_res_arg.resolver_result,
on_resolution);
GRPC_RESOLVER_UNREF(resolver, "test_succeeds");
-
grpc_uri_destroy(uri);
+ /* Flush ExecCtx to avoid stack-use-after-scope on on_res_arg which is
+ * accessed in the closure on_resolution_cb */
+ grpc_core::ExecCtx::Get()->Flush();
}
static void test_fails(grpc_resolver_factory* factory, const char* string) {