WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread...
authorsaid@apple.com <said@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Jan 2019 22:01:07 +0000 (22:01 +0000)
committersaid@apple.com <said@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Jan 2019 22:01:07 +0000 (22:01 +0000)
commit927aa2ae5b5f6a11dd08cf763c5cc8feac3570a9
tree693d3078859c6d86aee5254602529f67fe032490
parent06e59a5b688df77738e47e79a797f270c691fc2a
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
Source/WTF/ChangeLog
Source/WTF/wtf/WorkQueue.cpp