WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
271108
REGRESSION(
274077@main
): failure to build on i586 (and likely other 32bit arches): static assertion failed: Timer should stay small
https://bugs.webkit.org/show_bug.cgi?id=271108
Summary
REGRESSION(274077@main): failure to build on i586 (and likely other 32bit arc...
Dominique Leuenberger
Reported
2024-03-16 03:22:59 PDT
[ 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] | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Attachments
Add attachment
proposed patch, testcase, etc.
Dominique Leuenberger
Comment 1
2024-03-16 03:23:49 PDT
Version 2.43.4 was the last I tested and that still built successfylly
Michael Catanzaro
Comment 2
2024-03-16 15:38:21 PDT
I think SameSizeAsTimer is missing the size of the bitfields, which don't get compacted on 32-bit architectures. Let me test it...
Michael Catanzaro
Comment 3
2024-03-16 17:45:11 PDT
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");
Michael Catanzaro
Comment 4
2024-03-18 09:57:22 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/26053
EWS
Comment 5
2024-03-18 11:16:22 PDT
Committed
276282@main
(2922af379dc7): <
https://commits.webkit.org/276282@main
> Reviewed commits have been landed. Closing PR #26053 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug