Skip to content

Drop WTF_ALLOW_UNSAFE_BUFFER_USAGE in StringImpl.cpp #47420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cdumez
Copy link
Contributor

@cdumez cdumez commented Jul 1, 2025

fd0cd22

Drop WTF_ALLOW_UNSAFE_BUFFER_USAGE in StringImpl.cpp
https://bugs.webkit.org/show_bug.cgi?id=295254

Reviewed by NOBODY (OOPS!).

Drop WTF_ALLOW_UNSAFE_BUFFER_USAGE in StringImpl.cpp, for safety.
This tested as performance neutral on Speedometer and JetStream.

* Source/WTF/wtf/text/StringImpl.cpp:
(WTF::StringImpl::characterStartingAt):
(WTF::StringImpl::convertToLowercaseWithoutLocale):
(WTF::StringImpl::convertToLowercaseWithoutLocaleStartingAtFailingIndex8Bit):
(WTF::StringImpl::convertToUppercaseWithoutLocale):
(WTF::StringImpl::convertToUppercaseWithoutLocaleStartingAtFailingIndex8Bit):
(WTF::StringImpl::foldCase):
(WTF::StringImpl::trimMatchedCharacters):
(WTF::StringImpl::trim):
(WTF::StringImpl::simplifyMatchedCharactersToSpace):
(WTF::StringImpl::find):
* Source/WTF/wtf/text/StringImpl.h:

fd0cd22

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ❌ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ❌ 🧪 ios-wk2 ❌ 🧪 api-mac ❌ 🧪 api-wpe
❌ 🧪 ios-wk2-wpt ❌ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
❌ 🛠 🧪 jsc ❌ 🧪 api-ios ❌ 🧪 mac-wk2 ✅ 🛠 gtk
❌ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ❌ 🧪 mac-AS-debug-wk2 ❌ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ❌ 🧪 api-gtk
✅ 🧪 vision-wk2 ❌ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ❌ 🧪 jsc-armv7-tests
✅ 🛠 watch
✅ 🛠 watch-sim

https://bugs.webkit.org/show_bug.cgi?id=295254

Reviewed by NOBODY (OOPS!).

Drop WTF_ALLOW_UNSAFE_BUFFER_USAGE in StringImpl.cpp, for safety.
This tested as performance neutral on Speedometer and JetStream.

* Source/WTF/wtf/text/StringImpl.cpp:
(WTF::StringImpl::characterStartingAt):
(WTF::StringImpl::convertToLowercaseWithoutLocale):
(WTF::StringImpl::convertToLowercaseWithoutLocaleStartingAtFailingIndex8Bit):
(WTF::StringImpl::convertToUppercaseWithoutLocale):
(WTF::StringImpl::convertToUppercaseWithoutLocaleStartingAtFailingIndex8Bit):
(WTF::StringImpl::foldCase):
(WTF::StringImpl::trimMatchedCharacters):
(WTF::StringImpl::trim):
(WTF::StringImpl::simplifyMatchedCharactersToSpace):
(WTF::StringImpl::find):
* Source/WTF/wtf/text/StringImpl.h:
@cdumez cdumez self-assigned this Jul 1, 2025
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merging-blocked Applied to prevent a change from being merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants