Title: [239950] releases/WebKitGTK/webkit-2.22/Source/WTF
- Revision
- 239950
- Author
- [email protected]
- Date
- 2019-01-14 14:23:30 -0800 (Mon, 14 Jan 2019)
Log Message
Merge r239873 - 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):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.22/Source/WTF/ChangeLog (239949 => 239950)
--- releases/WebKitGTK/webkit-2.22/Source/WTF/ChangeLog 2019-01-14 22:23:26 UTC (rev 239949)
+++ releases/WebKitGTK/webkit-2.22/Source/WTF/ChangeLog 2019-01-14 22:23:30 UTC (rev 239950)
@@ -1,3 +1,21 @@
+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):
+
2018-12-14 Darin Adler <[email protected]>
Verify size is valid in USE_SYSTEM_MALLOC version of tryAllocateZeroedVirtualPages
Modified: releases/WebKitGTK/webkit-2.22/Source/WTF/wtf/WorkQueue.cpp (239949 => 239950)
--- releases/WebKitGTK/webkit-2.22/Source/WTF/wtf/WorkQueue.cpp 2019-01-14 22:23:26 UTC (rev 239949)
+++ releases/WebKitGTK/webkit-2.22/Source/WTF/wtf/WorkQueue.cpp 2019-01-14 22:23:30 UTC (rev 239950)
@@ -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