Changeset 239873 in webkit
- Timestamp:
- Jan 11, 2019, 2:01:07 PM (8 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
wtf/WorkQueue.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r239867 r239873 1 2019-01-11 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create(). 4 https://bugs.webkit.org/show_bug.cgi?id=191350 5 6 Reviewed by Brent Fulgham. 7 8 The non COCOA version of WorkQueue::concurrentApply() creates a temporary 9 String for the threadName and passes the raw pointer of this String to 10 Thread::create(). After freeing this String, Thread::entryPoint() uses 11 the raw char pointer to internally initialize the thread. 12 13 The fix is to use a single literal string for all the threads' names since 14 they are created for a thread-pool. 15 16 * wtf/WorkQueue.cpp: 17 (WTF::WorkQueue::concurrentApply): 18 1 19 2019-01-11 Dominik Infuehr <dinfuehr@igalia.com> 2 20 -
trunk/Source/WTF/wtf/WorkQueue.cpp
r239273 r239873 76 76 m_workers.reserveInitialCapacity(threadCount); 77 77 for (unsigned i = 0; i < threadCount; ++i) { 78 m_workers.append(Thread::create( String::format("ThreadPool Worker %u", i).utf8().data(), [this] {78 m_workers.append(Thread::create("ThreadPool Worker", [this] { 79 79 threadBody(); 80 80 }));
Note:
See TracChangeset
for help on using the changeset viewer.