Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Issue 274079: Prevent thread creation if Join has already been called.... (Closed)

Created:
11 years, 2 months ago by Zachary Kuznia
Modified:
9 years, 7 months ago
Reviewers:
chron_chromium.org
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Prevent thread creation if Join has already been called. Tracking the thread id in the constructor, destructor and Start() shows that the thread object can be started and stopped on different threads. This means that there is a race condition if Stop() or Join() gets called during Start(), which could cause the thread to start with a pointer to a deleted object. BUG=23251 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29356

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -0 lines) Patch
M third_party/libjingle/files/talk/base/thread.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/libjingle/files/talk/base/thread.cc View 4 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Zachary Kuznia
11 years, 2 months ago (2009-10-16 18:54:48 UTC) #1
chron_chromium.org
Test? And add a note about why this is necessary.
11 years, 2 months ago (2009-10-16 18:57:52 UTC) #2
zork
The description has been updated to better explain it. There's no test because I don't ...
11 years, 2 months ago (2009-10-16 21:40:01 UTC) #3
chron_chromium.org
11 years, 2 months ago (2009-10-16 23:31:50 UTC) #4
LGTM, but I wish we had a test for this.

On Fri, Oct 16, 2009 at 2:39 PM, Zach Kuznia <zork@google.com> wrote:
> The description has been updated to better explain it. =A0There's no test
> because I don't have a way to reliably reproduce the race condition.
>
> On Fri, Oct 16, 2009 at 11:57 AM, <chron@chromium.org> wrote:
>>
>> Test?
>> And add a note about why this is necessary.
>>
>> http://codereview.chromium.org/274079
>
>



--=20
As seen on TV

Powered by Google App Engine
This is Rietveld 408576698