New issue
Advanced search Search tips

Issue 663970 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Nov 2016
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 2
Type: Bug



Sign in to add a comment

TCPEngineTransport uses PostTask unsafely.

Project Member Reported by w...@chromium.org, Nov 10 2016

Issue description

TCPEngineTransport::Connect() uses PostTask to complete asynchronously in the case of the underlying TCP Accept() call completely synchronously, but posts the completion-callback directly as the task.  This means that tearing down the Transport may still leave the completion callback in-flight, which callers would not typically expect to be the case.
 
Labels: -M-56 M-57
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58b2a9cbdd3184364a2fd9173c95e2a907296b77

commit 58b2a9cbdd3184364a2fd9173c95e2a907296b77
Author: kmarshall <kmarshall@chromium.org>
Date: Fri Nov 18 19:24:59 2016

Fix potential teardown race conditions with TCPEngineTransport's PostTasks.

* Use a weak pointer to ensure that TCPEngineTransport is alive when we invoke the completion callback on sync connection completion.
* Replace use Unretained() with a weak pointer on async connection completion.

R=wez@chromium.org
BUG= 663970 

Review-Url: https://codereview.chromium.org/2511773003
Cr-Commit-Position: refs/heads/master@{#433260}

[modify] https://crrev.com/58b2a9cbdd3184364a2fd9173c95e2a907296b77/blimp/net/tcp_engine_transport.cc
[modify] https://crrev.com/58b2a9cbdd3184364a2fd9173c95e2a907296b77/blimp/net/tcp_engine_transport.h

Status: Verified (was: Assigned)
Labels: Archive-Blimp

Sign in to add a comment