DescriptionFix ResumableTCPSocket destruction.
ResumableTCPSocket sets a read_callback_ that points to
TCPSocketEventDispatcher::ReadCallback. This callback gets called
from ~TCPSocket, when ~ResumableTCPSocket already completed,
and it calls ResumableTCPSocket methods (which are already illegal to call).
The fix just calls Disconnect from ~ResumableTCPSocket which clears the
callback and all the state that relies on ResumableTCPSocket members.
This fixes a bug found with UBSan Vptr.
BUG=617199
Committed: https://crrev.com/feeee3ad3750286671cf2ca5e90400fa745a13d6
Cr-Commit-Position: refs/heads/master@{#397829}
Patch Set 1 #
Messages
Total messages: 8 (3 generated)
|