Bug 128572

Summary: O_CLOEXEC in shm_open does not work on FreeBSD
Product: WebKit Reporter: Ting-Wei Lan <lantw44>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, buildbot, commit-queue, darin, rniwa, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Other   
Bug Depends on:    
Bug Blocks: 128598    
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion none

Ting-Wei Lan
Reported 2014-02-10 18:49:13 PST
In Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp, line 110: fileDescriptor = shm_open(tempName.data(), O_CREAT | O_CLOEXEC | O_RDWR, S_IRUSR | S_IWUSR); The O_CLOEXEC flag causes the system call to fail with EINVAL (invalid arguments). According to POSIX standard (http://pubs.opengroup.org/onlinepubs/9699919799/functions/shm_open.html), the O_CLOEXEC is not needed because the FD_CLOEXEC file descriptor flag is automatically set by shm_open. I think we can just remove the O_CLOEXEC flag to fix the issue. This issue has caused all applications using WebKit2GTK+ on FreeBSD endlessly retrying shm_open.
Attachments
Patch (1.40 KB, patch)
2014-02-11 00:00 PST, Alberto Garcia
no flags
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion (486.76 KB, application/zip)
2014-02-11 01:22 PST, Build Bot
no flags
Alberto Garcia
Comment 1 2014-02-11 00:00:07 PST
Created attachment 223820 [details] Patch I see, thanks for spotting this.
Sergio Villar Senin
Comment 2 2014-02-11 00:14:17 PST
Comment on attachment 223820 [details] Patch The change looks sensible to me. Let's go for it.
Build Bot
Comment 3 2014-02-11 01:22:47 PST
Comment on attachment 223820 [details] Patch Attachment 223820 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/6477038114308096 New failing tests: animations/stop-animation-on-suspend.html
Build Bot
Comment 4 2014-02-11 01:22:48 PST
Created attachment 223825 [details] Archive of layout-test-results from webkit-ews-02 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-02 Port: mac-mountainlion Platform: Mac OS X 10.8.5
WebKit Commit Bot
Comment 5 2014-02-11 08:09:54 PST
Comment on attachment 223820 [details] Patch Clearing flags on attachment: 223820 Committed r163875: <http://trac.webkit.org/changeset/163875>
WebKit Commit Bot
Comment 6 2014-02-11 08:09:57 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.