Commit 619792fa authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

Fix potential use-after-free bugs in the worker with DeleteWorkerSession.

Previously, DeleteWorkerSession was responsible for freeing the
WorkerSession owned by the SessionMgr. However, it is possible for
other requests to be in-flight on the same session, and requests from
the master to be delivered out of order, which leads to the potential
for a request to use a WorkerSession after it has been freed. Revise
the SessionMgr interface to handle std::shared_ptr<WorkerSession>
instead of raw pointers to avoid this risk.

PiperOrigin-RevId: 181975078
parent 975afd7f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment