[Webkit-unassigned] [Bug 189741] [Linux] Use memfd_create when available in SharedMemory implementation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 20 00:04:23 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=189741
--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Michael Catanzaro from comment #2)
> Comment on attachment 350101 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=350101&action=review
>
> In this case, I would check for sys/memfd.h instead of linux/memfd.h and use
> memfd_create() directly if it's available (glibc 2.27 or newer) rather than
> using syscall(). Then you don't have to check for EINTR or ENOSYS.
>
> This way works too, of course.
I'm assuming this is available in more systems, no?
> > Source/WebKit/Platform/unix/SharedMemoryUnix.cpp:128
> > + if (errno == ENOSYS)
> > + return fileDescriptor;
>
> Surely this isn't right? You should just remove this condition and fall
> through to isMemFdAvailable = false, right?
Yes, I changed this several times and ended up with the wrong check. Good catch!
> > Source/WebKit/Platform/unix/SharedMemoryUnix.cpp:154
> > - WTFLogAlways("Failed to create shared memory file %s: %s", tempName.data(), strerror(errno));
> > + WTFLogAlways("Failed to create shared memory file: %s", strerror(errno));
>
> Drop the word "file"
Sure.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180920/1b8cb70e/attachment.html>
More information about the webkit-unassigned
mailing list