Bug 165274 - Always check the return value of pthread_key_create()
Summary: Always check the return value of pthread_key_create()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: Safari 10
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-01 13:57 PST by David Kilzer (:ddkilzer)
Modified: 2016-12-08 17:55 PST (History)
6 users (show)

See Also:


Attachments
Patch v1 (4.30 KB, patch)
2016-12-01 14:06 PST, David Kilzer (:ddkilzer)
darin: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews117 for mac-yosemite (1.88 MB, application/zip)
2016-12-01 16:12 PST, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>