WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
287554
Make `Vector::operator==` work correctly with padded structs
https://bugs.webkit.org/show_bug.cgi?id=287554
Summary
Make `Vector::operator==` work correctly with padded structs
Antoine Quint
Reported
2025-02-12 02:33:55 PST
In
289948@main
a workaround was implemented to let two `Vector<StyleRuleKeyframe::Key>` be compared with the `==` operator: ``` // FIXME: using Vector::operator==() here fails on Intel, so we provide our own logic. auto keysAreEqual = [](const Vector<StyleRuleKeyframe::Key>& a, const Vector<StyleRuleKeyframe::Key>& b) { if (a.size() != b.size()) return false; for (auto i = a.size(); i--;) { if (!(a[i] == b[i])) return false; } return true; }; ``` Indeed, on Intel, simply using the existing `Vector::operator==` would yield failures in `LayoutTests/animations/keyframes-rule.html`. Apparently this is due to the fact that `memcmp()` is used in this case and that it doesn't work correctly with padded structs like `StyleRuleKeyframe::Key`.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-02-12 08:30:37 PST
<
rdar://problem/144700872
>
Chris Dumez
Comment 2
2025-02-28 19:14:11 PST
Pull request:
https://github.com/WebKit/WebKit/pull/41696
EWS
Comment 3
2025-03-06 12:53:17 PST
Committed
291724@main
(30eb04f14b59): <
https://commits.webkit.org/291724@main
> Reviewed commits have been landed. Closing PR #41696 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