[webkit-changes] [WebKit/WebKit] 02f9d9: watchOS arm64_32 build broken due to ThreadSafeRef...
Elliott Williams
noreply at github.com
Thu Sep 5 20:53:45 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 02f9d93edf29a6339953ecec4dd49ff98cc3dd41
https://github.com/WebKit/WebKit/commit/02f9d93edf29a6339953ecec4dd49ff98cc3dd41
Author: Elliott Williams <emw at apple.com>
Date: 2024-09-05 (Thu, 05 Sep 2024)
Changed paths:
M Source/WTF/wtf/Compiler.h
M Source/WTF/wtf/RefCounted.cpp
M Source/WTF/wtf/ThreadSafeRefCounted.h
Log Message:
-----------
watchOS arm64_32 build broken due to ThreadSafeRefCounted layout
https://bugs.webkit.org/show_bug.cgi?id=279227
rdar://problem/135371304
Reviewed by Alex Christensen.
With assertions enabled, WTF::RefCounted has m_isOwnedByMainThread,
m_areThreadingChecksEnabled, and m_adoptionIsRequired boolean fields
which implement runtime assertion checks. On platforms with 8-byte
pointers, these are packed in to the object without affecting the
overall size of the class, but on arm64_32 they make it a byte larger.
This causes a GeneratedSerializers.mm assertion which compares the sizes
of WTF::ThreadSafeRefCounted and WTF::RefCounted to fail:
error: static assertion failed due to requirement 'sizeof(ShouldBeSameSizeAsThreadSafeDataBufferImpl) == sizeof(WebCore::ThreadSafeDataBufferImpl)'
31638 | static_assert(sizeof(ShouldBeSameSizeAsThreadSafeDataBufferImpl) == sizeof(WebCore::ThreadSafeDataBufferImpl));
GeneratedSerializers.mm:31638:70: note: expression evaluates to '28 == 24'
31638 | static_assert(sizeof(ShouldBeSameSizeAsThreadSafeDataBufferImpl) == sizeof(WebCore::ThreadSafeDataBufferImpl));
To fix this without teaching IPC serializers about the different
implementations of refcounting, pad ThreadSafeRefCounted with the same
bool fields to get the expected layout.
* Source/WTF/wtf/Compiler.h: Add UNUSED_MEMBER_VARIABLE (unlike
WK_UNUSED_INSTANCE_VARIABLE, it it not disabled in some API/SPI
headers)
* Source/WTF/wtf/RefCounted.cpp:
* Source/WTF/wtf/ThreadSafeRefCounted.h:
Canonical link: https://commits.webkit.org/283247@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list