Bug 196959 - DOMMatrixReadOnly and WebKitCSSMatrix should have padding to make TransformationMatrix 16byte aligned
Summary: DOMMatrixReadOnly and WebKitCSSMatrix should have padding to make Transformat...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks: 196837
  Show dependency treegraph
 
Reported: 2019-04-15 23:37 PDT by Yusuke Suzuki
Modified: 2019-04-16 06:30 PDT (History)
1 user (show)

See Also:


Attachments
Patch (45.63 KB, patch)
2019-04-16 00:21 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (45.63 KB, patch)
2019-04-16 00:24 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (51.70 KB, patch)
2019-04-16 01:27 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (51.94 KB, patch)
2019-04-16 01:34 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (51.91 KB, patch)
2019-04-16 01:37 PDT, Yusuke Suzuki
ews: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews202 for win-future (12.95 MB, application/zip)
2019-04-16 06:30 PDT, Build Bot
no flags Details

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