Bug 138963

Summary: Remove alignment code from IPC coders
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: REOPENED ---    
Severity: Normal CC: ahmad.saleem792, andersca, ap, cdumez, commit-queue, kkinnunen, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 139081, 139239    
Bug Blocks:    
Attachments:
Description Flags
patch andersca: review+

Description Antti Koivisto 2014-11-21 05:40:13 PST
It does nothing except bloat the messages.
Comment 1 Antti Koivisto 2014-11-21 08:40:59 PST
Created attachment 242048 [details]
patch
Comment 2 Antti Koivisto 2014-11-21 09:41:20 PST
https://trac.webkit.org/r176452
Comment 3 WebKit Commit Bot 2014-12-03 16:08:46 PST
Re-opened since this is blocked by bug 139239
Comment 4 Csaba Osztrogonác 2015-01-26 05:59:05 PST
If you are going to reland this patch once, please integrate 
the buildfix from bug139081. Thanks.
Comment 5 Csaba Osztrogonác 2015-06-01 04:09:31 PDT
Is there any plan to land it again with the iOS fix and the fix in bug139081?
Comment 6 Antti Koivisto 2015-06-01 04:14:22 PDT
I think Anders said he wanted to do something different here.
Comment 7 Csaba Osztrogonác 2015-06-18 06:26:54 PDT
(In reply to comment #5)
> Is there any plan to land it again with the iOS fix and the fix in bug139081?

(In reply to comment #6)
> I think Anders said he wanted to do something different here.

Anders?
Comment 8 Csaba Osztrogonác 2015-09-24 07:06:14 PDT
ping?
Comment 9 Csaba Osztrogonác 2016-02-08 02:25:45 PST
ping?
Comment 10 Ahmad Saleem 2022-10-05 15:38:18 PDT
This r+ patch landed:

https://github.com/WebKit/WebKit/commit/395664aba4d8e744cf9e206e326259ae171d8bd0

but got backed out:

https://github.com/WebKit/WebKit/commit/92c313f6d581fe6d372217e388c4ee4e9f1cc80d

Is this needed anymore? Thanks!
Comment 11 Kimmo Kinnunen 2022-10-05 22:29:52 PDT
I'm not sure at 2014, but in 2022 I think the alignment is used to ensure that the possible in-place references of data are correctly aligned.
E.g. mostly the case where we would refer to Span<float> that exist in the stream IPC buffer or mach message buffer, and we'd prefer not to copy it (say it's 50mbs of floats for WebGL).

There might be cases where the alignment could be omitted.

There might be call sequences where the invariants are broken so that the above expectation doesn't actually hold, we don't have the tests yet for this.