Bug 224381 - Reduce maximum HashTable entry size to 128 bytes
Summary: Reduce maximum HashTable entry size to 128 bytes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-09 11:23 PDT by Alex Christensen
Modified: 2021-04-19 07:00 PDT (History)
13 users (show)

See Also:


Attachments
Patch (6.04 KB, patch)
2021-04-09 11:26 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (5.70 KB, patch)
2021-04-15 12:42 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-04-09 11:23:44 PDT
Reduce maximum HashTable entry size to 128 bytes
Comment 1 Alex Christensen 2021-04-09 11:26:43 PDT
Created attachment 425636 [details]
Patch
Comment 2 Yusuke Suzuki 2021-04-09 11:34:53 PDT
Comment on attachment 425636 [details]
Patch

r=me
Comment 3 Alex Christensen 2021-04-09 11:41:16 PDT
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.
Comment 4 Alex Christensen 2021-04-14 09:16:49 PDT
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.
Comment 5 Alex Christensen 2021-04-14 09:19:51 PDT
r275948
Comment 6 Alex Christensen 2021-04-14 11:42:39 PDT
r275954
Comment 7 Lauro Moura 2021-04-14 12:30:45 PDT
GLIB fixes before r275954 are about to be landed in bug224567 (through fast-cq)
Comment 8 Alex Christensen 2021-04-15 12:42:39 PDT
Reopening to attach new patch.
Comment 9 Alex Christensen 2021-04-15 12:42:41 PDT
Created attachment 426126 [details]
Patch
Comment 10 Radar WebKit Bug Importer 2021-04-16 11:24:18 PDT
<rdar://problem/76769402>
Comment 11 Yusuke Suzuki 2021-04-16 11:28:33 PDT
Comment on attachment 426126 [details]
Patch

r=me
Comment 12 EWS 2021-04-16 12:23:05 PDT
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].
Comment 13 Michael Catanzaro 2021-04-16 15:03:27 PDT
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)); }
      |                                                                                                                             ^
Comment 14 Alex Christensen 2021-04-16 21:09:49 PDT
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.
Comment 15 Michael Catanzaro 2021-04-17 06:31:14 PDT
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....
Comment 16 Michael Catanzaro 2021-04-19 07:00:37 PDT
I've created bug #224755 so we can continue discussion there instead of further polluting this issue. Sorry for commenting in the wrong place.