../../Source/WTF/wtf/text/StringBuilder.cpp:115:16: runtime error: null pointer passed as argument 2, which is declared to never be null This occurs 24 times running the TestWTF executable To reproduce: - Compile with usban enabled with the following cmake arg: -DENABLE_SANITIZERS=undefined" - ./Tools/Scripts/build-webkit --use-icecream --release --gtk --cmakeargs="-DENABLE_SANITIZERS=undefined" - Run the stringbuilder append check: - ./Tools/Scripts/webkit-flatpak --flatpak-verbose --release -c WebKitBuild/GTK/Release/bin/TestWebKitAPI/TestWTF --gtest_filter=StringBuilderTest.Append
Created attachment 426843 [details] Patch
Comment on attachment 426843 [details] Patch r=me
Comment on attachment 426843 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426843&action=review > Source/WTF/wtf/text/StringBuilder.cpp:118 > + auto length = m_length.unsafeGet(); > + if (length) > + std::memcpy(m_bufferCharacters8, currentCharacters, length); OK as is, but can be done without the local variable: if (m_length) std::memcpy(m_bufferCharacters8, currentCharacters, m_length.unsafeGet()); If you really like the local, slightly nicer if itβs scoped: if (auto length = m_length.unsafeGet()) std::memcpy(m_bufferCharacters8, currentCharacters, length);
Created attachment 426886 [details] Patch for landing
Committed r276485 (236944@main): <https://commits.webkit.org/236944@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 426886 [details].
<rdar://problem/77061394>