Bug 189149 - [ConnectionUnix] Shrink sizeof AttachmentInfo by reordering members
Summary: [ConnectionUnix] Shrink sizeof AttachmentInfo by reordering members
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-30 00:15 PDT by Yoshiaki Jitsukawa
Modified: 2018-08-30 07:03 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.70 KB, patch)
2018-08-30 00:26 PDT, Yoshiaki Jitsukawa
no flags Details | Formatted Diff | Diff

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