[ 1646s] In file included from /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-12.cpp:2: [ 1646s] /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/WebCore/platform/Timer.cpp:269:29: error: static assertion failed: Timer should stay small [ 1646s] 269 | static_assert(sizeof(Timer) == sizeof(SameSizeAsTimer), "Timer should stay small"); [ 1646s] | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ [ 1646s] /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/WebCore/platform/Timer.cpp:269:29: note: the comparison reduces to ‘(40 == 36)’ [ 1646s] /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/WebCore/platform/Timer.cpp:275:46: error: static assertion failed: DeferrableOneShotTimer should stay small [ 1646s] 275 | static_assert(sizeof(DeferrableOneShotTimer) == sizeof(SameSizeAsDeferrableOneShotTimer), "DeferrableOneShotTimer should stay small"); [ 1646s] | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Version 2.43.4 was the last I tested and that still built successfylly
I think SameSizeAsTimer is missing the size of the bitfields, which don't get compacted on 32-bit architectures. Let me test it...
Hey Ryosuke, are you OK with this? I will create a pull request soon. (Alternatively, we could put the uint8_t at the bottom of the struct by reordering the Timer data members.) diff --git a/Source/WebCore/platform/Timer.cpp b/Source/WebCore/platform/Timer.cpp index 4f7c0f5c39ca..0f3734cca247 100644 --- a/Source/WebCore/platform/Timer.cpp +++ b/Source/WebCore/platform/Timer.cpp @@ -263,7 +263,11 @@ struct SameSizeAsTimer { WeakPtr<TimerAlignment> timerAlignment; double times[2]; - void* pointers[3]; + void* pointers[2]; +#if CPU(ADDRESS32) + uint8_t bitfields; +#endif + void* pointer; }; static_assert(sizeof(Timer) == sizeof(SameSizeAsTimer), "Timer should stay small");
Pull request: https://github.com/WebKit/WebKit/pull/26053
Committed 276282@main (2922af379dc7): <https://commits.webkit.org/276282@main> Reviewed commits have been landed. Closing PR #26053 and removing active labels.