Reduce maximum HashTable entry size to 128 bytes
Created attachment 425636 [details] Patch
Comment on attachment 425636 [details] Patch r=me
Could someone working on Linux fix the GTK/WPE build with this change? It should be straightforward to just use UniqueRef and you'll probably need makeUniqueRefWithoutFastMallocCheck for ANGLE types, but that's more than is reasonable to do with blind EWS iteration.
After cc'ing several Linux developers on this who have made commits since then, then waiting a few days, then asking on an active slack channel with other people asking for reviews and getting them, then waiting a few days, and still no response, I feel I have done my due diligence in trying to not break the Linux build.
r275948
r275954
GLIB fixes before r275954 are about to be landed in bug224567 (through fast-cq)
Reopening to attach new patch.
Created attachment 426126 [details] Patch
<rdar://problem/76769402>
Comment on attachment 426126 [details] Patch r=me
Committed r276154 (236645@main): <https://commits.webkit.org/236645@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 426126 [details].
Currently trying to wrap my head around these new inscrutable (and very verbose) warnings: [2920/5456] Building CXX object Source/WebCore/CMakeFiles...vedSources/unified-sources/UnifiedSource-f74e0903-7.cpp.o In file included from ../../Source/WebCore/page/SecurityOriginData.h:28, from ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:30, from ../../Source/WebCore/workers/service/server/SWScriptStorage.cpp:32, from WebCore/DerivedSources/unified-sources/UnifiedSource-f74e0903-7.cpp:1: In member function ‘WTF::URL& WTF::URL::operator=(WTF::URL&&)’, inlined from ‘void WebCore::ServiceWorkerRegistrationKey::setScope(WTF::URL&&)’ at ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:52:44, inlined from ‘static void WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>::constructDeletedValue(WebCore::ServiceWorkerRegistrationKey&)’ at ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:109:99, inlined from ‘typename std::enable_if<(! WTF::HashTraitHasCustomDelete<Traits, T>::value)>::type WTF::hashTraitsDeleteBucket(T&) [with Traits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>; T = WebCore::ServiceWorkerRegistrationKey]’ at WTF/Headers/wtf/HashTraits.h:305:34, inlined from ‘static void WTF::KeyValuePairHashTraits<KeyTraitsArg, ValueTraitsArg>::customDeleteBucket(WTF::KeyValuePairHashTraits<KeyTraitsArg, ValueTraitsArg>::TraitType&) [with KeyTraitsArg = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>; ValueTraitsArg = WTF::HashTraits<WTF::WeakPtr<WebCore::SWServerRegistration> >]’ at WTF/Headers/wtf/HashTraits.h:378:42, inlined from ‘typename std::enable_if<WTF::HashTraitHasCustomDelete<Traits, T>::value>::type WTF::hashTraitsDeleteBucket(T&) [with Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; T = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >]’ at WTF/Headers/wtf/HashTraits.h:297:31, inlined from ‘static void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::deleteBucket(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType&) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’ at WTF/Headers/wtf/HashTable.h:549:85, inlined from ‘void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::remove(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType*) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’ at WTF/Headers/wtf/HashTable.h:1127:21: WTF/Headers/wtf/URL.h:56:7: warning: ‘*(long unsigned int*)((char*)&<unnamed> + offsetof(WTF::URL, WTF::URL::m_isValid))’ is used uninitialized [-Wuninitialized] 56 | class URL { | ^~~ In file included from ../../Source/WebCore/workers/service/server/SWScriptStorage.cpp:32, from WebCore/DerivedSources/unified-sources/UnifiedSource-f74e0903-7.cpp:1: ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h: In member function ‘void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::remove(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType*) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’: ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:109:125: note: ‘<anonymous>’ declared here 109 | static void constructDeletedValue(WebCore::ServiceWorkerRegistrationKey& slot) { slot.setScope(URL(HashTableDeletedValue)); } | ^ In file included from ../../Source/WebCore/page/SecurityOriginData.h:28, from ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:30, from ../../Source/WebCore/workers/service/server/SWScriptStorage.cpp:32, from WebCore/DerivedSources/unified-sources/UnifiedSource-f74e0903-7.cpp:1: In member function ‘WTF::URL& WTF::URL::operator=(WTF::URL&&)’, inlined from ‘void WebCore::ServiceWorkerRegistrationKey::setScope(WTF::URL&&)’ at ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:52:44, inlined from ‘static void WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>::constructDeletedValue(WebCore::ServiceWorkerRegistrationKey&)’ at ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:109:99, inlined from ‘typename std::enable_if<(! WTF::HashTraitHasCustomDelete<Traits, T>::value)>::type WTF::hashTraitsDeleteBucket(T&) [with Traits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>; T = WebCore::ServiceWorkerRegistrationKey]’ at WTF/Headers/wtf/HashTraits.h:305:34, inlined from ‘static void WTF::KeyValuePairHashTraits<KeyTraitsArg, ValueTraitsArg>::customDeleteBucket(WTF::KeyValuePairHashTraits<KeyTraitsArg, ValueTraitsArg>::TraitType&) [with KeyTraitsArg = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>; ValueTraitsArg = WTF::HashTraits<WTF::WeakPtr<WebCore::SWServerRegistration> >]’ at WTF/Headers/wtf/HashTraits.h:378:42, inlined from ‘typename std::enable_if<WTF::HashTraitHasCustomDelete<Traits, T>::value>::type WTF::hashTraitsDeleteBucket(T&) [with Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; T = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >]’ at WTF/Headers/wtf/HashTraits.h:297:31, inlined from ‘static void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::deleteBucket(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType&) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’ at WTF/Headers/wtf/HashTable.h:549:85, inlined from ‘void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::remove(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType*) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’ at WTF/Headers/wtf/HashTable.h:1127:21: WTF/Headers/wtf/URL.h:56:7: warning: ‘*(long unsigned int*)((char*)&<unnamed> + offsetof(WTF::URL, WTF::URL::m_userEnd))’ is used uninitialized [-Wuninitialized] 56 | class URL { | ^~~ In file included from ../../Source/WebCore/workers/service/server/SWScriptStorage.cpp:32, from WebCore/DerivedSources/unified-sources/UnifiedSource-f74e0903-7.cpp:1: ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h: In member function ‘void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::remove(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType*) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’: ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:109:125: note: ‘<anonymous>’ declared here 109 | static void constructDeletedValue(WebCore::ServiceWorkerRegistrationKey& slot) { slot.setScope(URL(HashTableDeletedValue)); } | ^ In file included from ../../Source/WebCore/page/SecurityOriginData.h:28, from ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:30, from ../../Source/WebCore/workers/service/server/SWScriptStorage.cpp:32, from WebCore/DerivedSources/unified-sources/UnifiedSource-f74e0903-7.cpp:1: In member function ‘WTF::URL& WTF::URL::operator=(WTF::URL&&)’, inlined from ‘void WebCore::ServiceWorkerRegistrationKey::setScope(WTF::URL&&)’ at ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:52:44, inlined from ‘static void WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>::constructDeletedValue(WebCore::ServiceWorkerRegistrationKey&)’ at ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:109:99, inlined from ‘typename std::enable_if<(! WTF::HashTraitHasCustomDelete<Traits, T>::value)>::type WTF::hashTraitsDeleteBucket(T&) [with Traits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>; T = WebCore::ServiceWorkerRegistrationKey]’ at WTF/Headers/wtf/HashTraits.h:305:34, inlined from ‘static void WTF::KeyValuePairHashTraits<KeyTraitsArg, ValueTraitsArg>::customDeleteBucket(WTF::KeyValuePairHashTraits<KeyTraitsArg, ValueTraitsArg>::TraitType&) [with KeyTraitsArg = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>; ValueTraitsArg = WTF::HashTraits<WTF::WeakPtr<WebCore::SWServerRegistration> >]’ at WTF/Headers/wtf/HashTraits.h:378:42, inlined from ‘typename std::enable_if<WTF::HashTraitHasCustomDelete<Traits, T>::value>::type WTF::hashTraitsDeleteBucket(T&) [with Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; T = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >]’ at WTF/Headers/wtf/HashTraits.h:297:31, inlined from ‘static void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::deleteBucket(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType&) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’ at WTF/Headers/wtf/HashTable.h:549:85, inlined from ‘void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::remove(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType*) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’ at WTF/Headers/wtf/HashTable.h:1127:21: WTF/Headers/wtf/URL.h:56:7: warning: ‘*(long unsigned int*)((char*)&<unnamed> + offsetof(WTF::URL, WTF::URL::m_hostEnd))’ is used uninitialized [-Wuninitialized] 56 | class URL { | ^~~ In file included from ../../Source/WebCore/workers/service/server/SWScriptStorage.cpp:32, from WebCore/DerivedSources/unified-sources/UnifiedSource-f74e0903-7.cpp:1: ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h: In member function ‘void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::remove(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType*) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’: ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:109:125: note: ‘<anonymous>’ declared here 109 | static void constructDeletedValue(WebCore::ServiceWorkerRegistrationKey& slot) { slot.setScope(URL(HashTableDeletedValue)); } | ^ In file included from ../../Source/WebCore/page/SecurityOriginData.h:28, from ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:30, from ../../Source/WebCore/workers/service/server/SWScriptStorage.cpp:32, from WebCore/DerivedSources/unified-sources/UnifiedSource-f74e0903-7.cpp:1: In member function ‘WTF::URL& WTF::URL::operator=(WTF::URL&&)’, inlined from ‘void WebCore::ServiceWorkerRegistrationKey::setScope(WTF::URL&&)’ at ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:52:44, inlined from ‘static void WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>::constructDeletedValue(WebCore::ServiceWorkerRegistrationKey&)’ at ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:109:99, inlined from ‘typename std::enable_if<(! WTF::HashTraitHasCustomDelete<Traits, T>::value)>::type WTF::hashTraitsDeleteBucket(T&) [with Traits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>; T = WebCore::ServiceWorkerRegistrationKey]’ at WTF/Headers/wtf/HashTraits.h:305:34, inlined from ‘static void WTF::KeyValuePairHashTraits<KeyTraitsArg, ValueTraitsArg>::customDeleteBucket(WTF::KeyValuePairHashTraits<KeyTraitsArg, ValueTraitsArg>::TraitType&) [with KeyTraitsArg = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>; ValueTraitsArg = WTF::HashTraits<WTF::WeakPtr<WebCore::SWServerRegistration> >]’ at WTF/Headers/wtf/HashTraits.h:378:42, inlined from ‘typename std::enable_if<WTF::HashTraitHasCustomDelete<Traits, T>::value>::type WTF::hashTraitsDeleteBucket(T&) [with Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; T = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >]’ at WTF/Headers/wtf/HashTraits.h:297:31, inlined from ‘static void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::deleteBucket(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType&) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’ at WTF/Headers/wtf/HashTable.h:549:85, inlined from ‘void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::remove(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType*) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’ at WTF/Headers/wtf/HashTable.h:1127:21: WTF/Headers/wtf/URL.h:56:7: warning: ‘*(long unsigned int*)((char*)&<unnamed> + offsetof(WTF::URL, WTF::URL::m_pathEnd))’ is used uninitialized [-Wuninitialized] 56 | class URL { | ^~~ In file included from ../../Source/WebCore/workers/service/server/SWScriptStorage.cpp:32, from WebCore/DerivedSources/unified-sources/UnifiedSource-f74e0903-7.cpp:1: ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h: In member function ‘void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::remove(WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::ValueType*) [with Key = WebCore::ServiceWorkerRegistrationKey; Value = WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >; Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> > >; HashFunctions = WTF::DefaultHash<WebCore::ServiceWorkerRegistrationKey>; Traits = WTF::HashMap<WebCore::ServiceWorkerRegistrationKey, WTF::WeakPtr<WebCore::SWServerRegistration> >::KeyValuePairTraits; KeyTraits = WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>]’: ../../Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:109:125: note: ‘<anonymous>’ declared here 109 | static void constructDeletedValue(WebCore::ServiceWorkerRegistrationKey& slot) { slot.setScope(URL(HashTableDeletedValue)); } | ^
Very interesting, although unrelated to this change. It looks like it's complaining that URL::URL(HashTableDeletedValueType) doesn't initialize any members but m_string. That's fine because only m_string is used for hash-table-deleted-entry-URLs and probably preferred because it does fewer write operations. Maybe there's a way to silence those warnings or initialize all the members only in builds that would see those warnings.
OK sorry, I commented here because I incorrectly assumed it was caused by this change. (In reply to Alex Christensen from comment #14) > Very interesting, although unrelated to this change. It looks like it's > complaining that URL::URL(HashTableDeletedValueType) doesn't initialize any > members but m_string. That's fine because only m_string is used for > hash-table-deleted-entry-URLs and probably preferred because it does fewer > write operations. > Maybe there's a way to silence those warnings or initialize all the members > only in builds that would see those warnings. Hmm, I can silence it, sure, but initializing variables is cheap and more robust. In theory, the warning is only supposed to print if uninitialized data is actually used, but I'm losing confidence in GCC's ability to avoid false positives....
I've created bug #224755 so we can continue discussion there instead of further polluting this issue. Sorry for commenting in the wrong place.