grpc/test/cpp/server
Yijie Ma ac7faf75ba
Fix a race on vptr for UnimplementedAsyncRequest (#32547)
It is reported in https://github.com/grpc/grpc/issues/32356 that there
is a race on vptr for `UnimplementedAsyncRequest` which would cause
crashes for multi-threaded server if clients send unimplemented RPC
request to the server.

The cause is that the server requests a call for
`UnimplementedAsyncRequest` in its base class `GenericAsyncRequest` when
the `vptr` still points to the base class's `vtable`. If the call went
in and another server thread picks up the tag before the `vptr` points
back to the derived class's `vtable`, it would call the wrong virtual
function and also this is a data race. This fix makes the request of the
call inside the derived class's constructor.

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-03-10 13:00:56 -08:00
..
load_reporter Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
BUILD [build] Add test/core/util, test/core/event_engine to auto build deps (#30364) 2022-07-25 21:59:25 -07:00
authorization_policy_provider_test.cc [c++14] absl::make_unique --> std::make_unique (#31159) 2022-09-29 06:45:17 -07:00
credentials_test.cc Refactor end2end tests to exercise each EventEngine (#29202) 2022-03-30 15:43:05 -07:00
server_builder_test.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
server_builder_with_socket_mutator_test.cc Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
server_request_call_test.cc Fix a race on vptr for UnimplementedAsyncRequest (#32547) 2023-03-10 13:00:56 -08:00