Bug 196959

Summary: DOMMatrixReadOnly and WebKitCSSMatrix should have padding to make TransformationMatrix 16byte aligned
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: DOMAssignee: Yusuke Suzuki <ysuzuki>
Status: NEW ---    
Severity: Normal CC: ews-watchlist
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 196837    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
ews-watchlist: commit-queue-
Archive of layout-test-results from ews202 for win-future none

Description Yusuke Suzuki 2019-04-15 23:37:56 PDT
This issue is found in IsoHeap extension patch[1].

[1]: https://bugs.webkit.org/show_bug.cgi?id=196837
Comment 1 Yusuke Suzuki 2019-04-15 23:53:41 PDT
Related to IsoHeap.
Comment 2 Yusuke Suzuki 2019-04-16 00:21:15 PDT
Created attachment 367505 [details]
Patch
Comment 3 Yusuke Suzuki 2019-04-16 00:24:27 PDT
Created attachment 367506 [details]
Patch
Comment 4 Yusuke Suzuki 2019-04-16 00:26:39 PDT
Comment on attachment 367506 [details]
Patch

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

> Source/WebCore/css/DOMMatrixReadOnly.h:152
> +    std::aligned_storage<sizeof(TransformationMatrix), 8>::type m_storage;

aligned_storage just adds alignment information, not adding appropriate padding. So we need to have a padding manually.
https://en.cppreference.com/w/cpp/types/aligned_storage
Typical aligned_storage implementation.
```
template<std::size_t Len, std::size_t Align /* default alignment not implemented */>
struct aligned_storage {
    struct type {
        alignas(Align) unsigned char data[Len];
    };
};
```
Comment 5 Yusuke Suzuki 2019-04-16 00:43:10 PDT
Let's extract this storage part as PaddedAlignedStorage.
Comment 6 Yusuke Suzuki 2019-04-16 01:27:45 PDT
Created attachment 367512 [details]
Patch
Comment 7 Yusuke Suzuki 2019-04-16 01:34:25 PDT
Created attachment 367513 [details]
Patch
Comment 8 Yusuke Suzuki 2019-04-16 01:35:48 PDT
The patch becomes not so much related to bmalloc. Remove bmalloc keyword.
Comment 9 Yusuke Suzuki 2019-04-16 01:37:14 PDT
Created attachment 367514 [details]
Patch
Comment 10 Yusuke Suzuki 2019-04-16 01:39:07 PDT
Comment on attachment 367514 [details]
Patch

Still considering
Comment 11 EWS Watchlist 2019-04-16 06:30:30 PDT
Comment on attachment 367514 [details]
Patch

Attachment 367514 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/11885059

New failing tests:
js/dom/custom-constructors.html
Comment 12 EWS Watchlist 2019-04-16 06:30:41 PDT
Created attachment 367532 [details]
Archive of layout-test-results from ews202 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202  Port: win-future  Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit