grpc/include
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
..
grpc Switch linux RBE to ubuntu18.04, get rid of rbe_autoconfig (#32559) 2023-03-10 09:34:53 +01:00
grpc++ Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
grpcpp Fix a race on vptr for UnimplementedAsyncRequest (#32547) 2023-03-10 13:00:56 -08:00