Title: [240070] branches/safari-607-branch/Source/WTF
Revision
240070
Author
[email protected]
Date
2019-01-16 15:27:38 -0800 (Wed, 16 Jan 2019)

Log Message

Cherry-pick r239873. rdar://problem/47260353

    WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
    https://bugs.webkit.org/show_bug.cgi?id=191350

    Reviewed by Brent Fulgham.

    The non COCOA version of WorkQueue::concurrentApply() creates a temporary
    String for the threadName and passes the raw pointer of this String to
    Thread::create(). After freeing this String, Thread::entryPoint() uses
    the raw char pointer to internally initialize the thread.

    The fix is to use a single literal string for all the threads' names since
    they are created for a thread-pool.

    * wtf/WorkQueue.cpp:
    (WTF::WorkQueue::concurrentApply):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239873 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-607-branch/Source/WTF/ChangeLog (240069 => 240070)


--- branches/safari-607-branch/Source/WTF/ChangeLog	2019-01-16 23:27:36 UTC (rev 240069)
+++ branches/safari-607-branch/Source/WTF/ChangeLog	2019-01-16 23:27:38 UTC (rev 240070)
@@ -1,5 +1,46 @@
 2019-01-15  Alan Coon  <[email protected]>
 
+        Cherry-pick r239873. rdar://problem/47260353
+
+    WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
+    https://bugs.webkit.org/show_bug.cgi?id=191350
+    
+    Reviewed by Brent Fulgham.
+    
+    The non COCOA version of WorkQueue::concurrentApply() creates a temporary
+    String for the threadName and passes the raw pointer of this String to
+    Thread::create(). After freeing this String, Thread::entryPoint() uses
+    the raw char pointer to internally initialize the thread.
+    
+    The fix is to use a single literal string for all the threads' names since
+    they are created for a thread-pool.
+    
+    * wtf/WorkQueue.cpp:
+    (WTF::WorkQueue::concurrentApply):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-01-11  Said Abou-Hallawa  <[email protected]>
+
+            WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
+            https://bugs.webkit.org/show_bug.cgi?id=191350
+
+            Reviewed by Brent Fulgham.
+
+            The non COCOA version of WorkQueue::concurrentApply() creates a temporary
+            String for the threadName and passes the raw pointer of this String to
+            Thread::create(). After freeing this String, Thread::entryPoint() uses
+            the raw char pointer to internally initialize the thread.
+
+            The fix is to use a single literal string for all the threads' names since
+            they are created for a thread-pool.
+
+            * wtf/WorkQueue.cpp:
+            (WTF::WorkQueue::concurrentApply):
+
+2019-01-15  Alan Coon  <[email protected]>
+
         Cherry-pick r239832. rdar://problem/47260343
 
     Override the session configuration for cookieAcceptPolicy

Modified: branches/safari-607-branch/Source/WTF/wtf/WorkQueue.cpp (240069 => 240070)


--- branches/safari-607-branch/Source/WTF/wtf/WorkQueue.cpp	2019-01-16 23:27:36 UTC (rev 240069)
+++ branches/safari-607-branch/Source/WTF/wtf/WorkQueue.cpp	2019-01-16 23:27:38 UTC (rev 240070)
@@ -75,7 +75,7 @@
 
             m_workers.reserveInitialCapacity(threadCount);
             for (unsigned i = 0; i < threadCount; ++i) {
-                m_workers.append(Thread::create(String::format("ThreadPool Worker %u", i).utf8().data(), [this] {
+                m_workers.append(Thread::create("ThreadPool Worker", [this] {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
                     threadBody();
                 }));
             }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to