Bug 165274

Summary: Always check the return value of pthread_key_create()
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: PlatformAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, dbates, ggaren
Priority: P2    
Version: Safari 10   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1
darin: review+, buildbot: commit-queue-
Archive of layout-test-results from ews117 for mac-yosemite none

Description David Kilzer (:ddkilzer) 2016-12-01 13:57:18 PST
WebKit should always check the return value of pthread_key_create().
Comment 1 David Kilzer (:ddkilzer) 2016-12-01 14:06:29 PST
Created attachment 295894 [details]
Patch v1
Comment 2 David Kilzer (:ddkilzer) 2016-12-01 14:10:37 PST
The other place that the return value of pthread_key_create() is currently checked is here:

Source/WTF/wtf/ThreadSpecific.h

The idiom used in this code has caught bugs recently (potential leaks of JSC::MachineThreads::MachineThreads objects).
Comment 3 Build Bot 2016-12-01 16:12:23 PST
Comment on attachment 295894 [details]
Patch v1

Attachment 295894 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2603847

New failing tests:
transitions/default-timing-function.html
Comment 4 Build Bot 2016-12-01 16:12:27 PST
Created attachment 295909 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 5 David Kilzer (:ddkilzer) 2016-12-08 17:51:04 PST
(In reply to comment #3)
> Comment on attachment 295894 [details]
> Patch v1
> 
> Attachment 295894 [details] did not pass mac-debug-ews (mac):
> Output: http://webkit-queues.webkit.org/results/2603847
> 
> New failing tests:
> transitions/default-timing-function.html

I don't see the crashes or failing tests when I run locally trunk r209565.

Going to land the patch manually.
Comment 6 David Kilzer (:ddkilzer) 2016-12-08 17:55:27 PST
Committed r209590: <http://trac.webkit.org/changeset/209590>