Summary: | Fix wrong mix of fcntl commands and flags | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alberto Garcia <berto> | ||||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | sergio | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Alberto Garcia
2014-01-29 10:10:32 PST
Created attachment 222579 [details]
Patch
Nice catch! After a quick look, SharedMemory::createHandle() [WebKit2/Platform/unix/SharedMemoryUnix.cpp] seems suspicious, as in it does fcntl(duplicatedHandle, F_SETFD, FD_CLOEXEC | accessModeFile(protection)) == -1). Seems like it should be F_SETFD for FD_CLOEXEC and F_SETFL for the access mode (O_RDONLY or O_RDWR, in this case), no? I think you're right, I'll update the patch. Created attachment 222804 [details]
Patch
Comment on attachment 222804 [details]
Patch
Would be much better if these had test coverage.
Committed r163292: <http://trac.webkit.org/changeset/163292> |