Changeset 90939 in webkit


Ignore:
Timestamp:
Jul 13, 2011 12:19:23 PM (13 years ago)
Author:
levin@chromium.org
Message:

Possible race condition in ThreadIdentifierData::initializeKeyOnce and shouldCallRealDebugger.
https://bugs.webkit.org/show_bug.cgi?id=64465

Reviewed by Dmitry Titov.

There isn't a good way to test this as it is very highly unlikely to occur.

Source/JavaScriptCore:

  • wtf/ThreadIdentifierDataPthreads.cpp:

(WTF::ThreadIdentifierData::initializeKeyOnce): Since scoped static initialization
isn't thread-safe, change the initialization to be global.

Source/WebKit2:

  • PluginProcess/mac/PluginProcessMac.mm:

(WebKit::shouldCallRealDebugger): :Since scoped static initialization
isn't thread-safe, change the initialization to be global.

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r90938 r90939  
     12011-07-13  David Levin  <levin@chromium.org>
     2
     3        Possible race condition in ThreadIdentifierData::initializeKeyOnce and shouldCallRealDebugger.
     4        https://bugs.webkit.org/show_bug.cgi?id=64465
     5
     6        Reviewed by Dmitry Titov.
     7
     8        There isn't a good way to test this as it is very highly unlikely to occur.
     9
     10        * wtf/ThreadIdentifierDataPthreads.cpp:
     11        (WTF::ThreadIdentifierData::initializeKeyOnce): Since scoped static initialization
     12        isn't thread-safe, change the initialization to be global.
     13
    1142011-07-12  Gavin Barraclough  <barraclough@apple.com>
    215
  • trunk/Source/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp

    r53714 r90939  
    11/*
    2  * Copyright (C) 2009 Google Inc. All rights reserved.
     2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4040
    4141pthread_key_t ThreadIdentifierData::m_key;
     42static pthread_once_t onceControl = PTHREAD_ONCE_INIT;
    4243
    4344void clearPthreadHandleForIdentifier(ThreadIdentifier);
     
    8788void ThreadIdentifierData::initializeKeyOnce()
    8889{
    89     static pthread_once_t onceControl = PTHREAD_ONCE_INIT;
    9090    if (pthread_once(&onceControl, initializeKeyOnceHelper))
    9191        CRASH();
  • trunk/Source/WebKit2/ChangeLog

    r90909 r90939  
     12011-07-13  David Levin  <levin@chromium.org>
     2
     3        Possible race condition in ThreadIdentifierData::initializeKeyOnce and shouldCallRealDebugger.
     4        https://bugs.webkit.org/show_bug.cgi?id=64465
     5
     6        Reviewed by Dmitry Titov.
     7
     8        There isn't a good way to test this as it is very highly unlikely to occur.
     9
     10        * PluginProcess/mac/PluginProcessMac.mm:
     11        (WebKit::shouldCallRealDebugger): :Since scoped static initialization
     12        isn't thread-safe, change the initialization to be global.
     13
    1142011-07-13  Andreas Kling  <kling@webkit.org>
    215
  • trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm

    r84997 r90939  
    11/*
    22 * Copyright (C) 2010 Apple Inc. All rights reserved.
     3 * Copyright (C) 2011 Google Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    4041namespace WebKit {
    4142
     43static pthread_once_t shouldCallRealDebuggerOnce = PTHREAD_ONCE_INIT;
     44
    4245class FullscreenWindowTracker {
    4346    WTF_MAKE_NONCOPYABLE(FullscreenWindowTracker);
     
    133136static bool shouldCallRealDebugger()
    134137{
    135     static pthread_once_t shouldCallRealDebuggerOnce = PTHREAD_ONCE_INIT;
    136138    pthread_once(&shouldCallRealDebuggerOnce, initShouldCallRealDebugger);
    137139   
Note: See TracChangeset for help on using the changeset viewer.