Bug 279227
| Summary: | watchOS arm64_32 build broken due to ThreadSafeRefCounted layout | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Elliott Williams <emw> |
| Component: | Web Template Framework | Assignee: | Elliott Williams <emw> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Elliott Williams
With debug assertions enabled (a config that EWS and post-commit do not test), watchOS for arm64_32 fails a static assertion in GeneratedSerializers.mm:
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Elliott Williams
/Volumes/Data/OpenSource/WebKitBuild/Debug-watchos/DerivedSources/WebKit/GeneratedSerializers.mm:31638:19: error: static assertion failed due to requirement 'sizeof(ShouldBeSameSizeAsThreadSafeDataBufferImpl) == sizeof(WebC
ore::ThreadSafeDataBufferImpl)'
31638 | static_assert(sizeof(ShouldBeSameSizeAsThreadSafeDataBufferImpl) == sizeof(WebCore::ThreadSafeDataBufferImpl));
/Volumes/Data/OpenSource/WebKitBuild/Debug-watchos/DerivedSources/WebKit/GeneratedSerializers.mm:31638:70: note: expression evaluates to '28 == 24'
31638 | static_assert(sizeof(ShouldBeSameSizeAsThreadSafeDataBufferImpl) == sizeof(WebCore::ThreadSafeDataBufferImpl));
/Volumes/Data/OpenSource/WebKitBuild/Debug-watchos/DerivedSources/WebKit/GeneratedSerializers.mm:47320:19: error: static assertion failed due to requirement 'sizeof(ShouldBeSameSizeAsSerializedScriptValue) == sizeof(WebCore
::SerializedScriptValue)'
47320 | static_assert(sizeof(ShouldBeSameSizeAsSerializedScriptValue) == sizeof(WebCore::SerializedScriptValue));
/Volumes/Data/OpenSource/WebKitBuild/Debug-watchos/DerivedSources/WebKit/GeneratedSerializers.mm:47320:67: note: expression evaluates to '100 == 96'
47320 | static_assert(sizeof(ShouldBeSameSizeAsSerializedScriptValue) == sizeof(WebCore::SerializedScriptValue));
2 errors generated.
I believe that the root problem is that WebCore::ThreadSafeDataBufferImpl is a WTF::ThreadSafeRefCounted, whereas the generated ShouldBeSameSizeAsThreadSafeDataBufferImpl is a WTF::RefCounted. The latter class has m_isOwnedByMainThread, m_areThreadingChecksEnabled, and m_adoptionIsRequired boolean fields that are implement runtime assertion checks. On platforms with 8-byte pointers, these bits seem to get packed in without affecting the overall size of the class, but on arm64_32 they make it a byte larger.
Radar WebKit Bug Importer
<rdar://problem/135371304>
Elliott Williams
Pull request: https://github.com/WebKit/WebKit/pull/33209
EWS
Committed 283247@main (02f9d93edf29): <https://commits.webkit.org/283247@main>
Reviewed commits have been landed. Closing PR #33209 and removing active labels.