WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
281994
Add static_assert to spanReinterpretCast<>() to prevent unnecessary casts
https://bugs.webkit.org/show_bug.cgi?id=281994
Summary
Add static_assert to spanReinterpretCast<>() to prevent unnecessary casts
David Kilzer (:ddkilzer)
Reported
2024-10-23 10:40:46 PDT
Add static_assert to spanReinterpretCast<>() to prevent unnecessary casts. Idea from Darin Adler here: <
https://github.com/WebKit/WebKit/pull/35601#discussion_r1811793553
> This was seen once in Source/WTF/wtf/text/AtomStringImpl.cpp prior to fixing
Bug 281944
: ``` RefPtr<AtomStringImpl> AtomStringImpl::add(std::span<const char8_t> characters) { HashedUTF8Characters buffer { characters, computeUTF16LengthWithHash(spanReinterpretCast<const char8_t>(characters)) }; [...] ```
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-10-23 10:53:55 PDT
<
rdar://problem/138491814
>
David Kilzer (:ddkilzer)
Comment 2
2024-10-23 11:35:54 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/35638
EWS
Comment 3
2024-10-23 14:33:36 PDT
Committed
285623@main
(4543cc7cb73c): <
https://commits.webkit.org/285623@main
> Reviewed commits have been landed. Closing PR #35638 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