Bug 189149

Summary: [ConnectionUnix] Shrink sizeof AttachmentInfo by reordering members
Product: WebKit Reporter: Yoshiaki Jitsukawa <yoshiaki.jitsukawa>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, don.olmstead, mcatanzaro, webkit-bug-importer, yoshiaki.jitsukawa, ysuzuki, zan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Yoshiaki Jitsukawa 2018-08-30 00:15:51 PDT
Shrink sizeof AttachmentInfo by reordering members.

It is not possible to pack AttachmentInfo up to attachmentMaxAmount(255) within messageMaxSize(4096 bytes).
Comment 1 Yoshiaki Jitsukawa 2018-08-30 00:26:11 PDT
Created attachment 348489 [details]
Patch
Comment 2 Michael Catanzaro 2018-08-30 06:35:23 PDT
Comment on attachment 348489 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=348489&action=review

> Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp:93
> +static_assert(sizeof(MessageInfo) + sizeof(AttachmentInfo) * attachmentMaxAmount <= messageMaxSize, "messageMaxSize is too small.");

Oh wow, good catch
Comment 3 WebKit Commit Bot 2018-08-30 07:01:56 PDT
Comment on attachment 348489 [details]
Patch

Clearing flags on attachment: 348489

Committed r235499: <https://trac.webkit.org/changeset/235499>
Comment 4 WebKit Commit Bot 2018-08-30 07:01:57 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2018-08-30 07:03:25 PDT
<rdar://problem/43884387>