New leaks seen on leaks bots: <https://build.webkit.org/builders/Apple%20Sierra%20(Leaks)> Seems closely related to r219595: <https://trac.webkit.org/r219595> Leak: 0x7fdd561010a0 size=16 zone: WebKit Using System Malloc_0x10d4e5000 0x56101080 0x00007fdd 0xaaaaaaaa 0xaaaaaaaa ...V............ Call stack: [thread 0x7fffe04163c0]: | start | DumpRenderTreeMain(int, char const**) DumpRenderTree.mm:1398 ... | WebCore::DocumentLoader::maybeLoadEmpty() DocumentLoader.cpp:1411 | WebCore::SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument(WTF::String const&) SchemeRegistry.cpp:311 | WebCore::makeNeverDestroyedSchemeSet(WTF::Vector<WTF::String, 0ul, WTF::CrashOnOverflow, 16ul> const& (*)()) SchemeRegistry.cpp:62 | WebCore::builtinEmptyDocumentSchemes() SchemeRegistry.cpp:166 | WTF::fastMalloc(unsigned long) FastMalloc.cpp:258 | bmalloc::DebugHeap::malloc(unsigned long) DebugHeap.cpp:49 Reduced test that produces the same leak: > #import <wtf/Vector.h> > #import <wtf/NeverDestroyed.h> > > const Vector<int>& test() { > static const auto x = makeNeverDestroyed(Vector<int> { 1, 2, 3 }); > return x; > } > > static void leak() { > test(); > } > > int main() { > @autoreleasepool { leak(); } > sleep(100000); > return 0; > }
Created attachment 317079 [details] [PATCH] Proposed Fix
Created attachment 317083 [details] [PATCH] Proposed Fix
Comment on attachment 317083 [details] [PATCH] Proposed Fix r=me
Comment on attachment 317083 [details] [PATCH] Proposed Fix Clearing flags on attachment: 317083 Committed r220183: <http://trac.webkit.org/changeset/220183>
All reviewed patches have been landed. Closing bug.
<rdar://problem/33693214>
Thanks so much for fixing this! Really important fix, and very sorry for my mistake. Can we add a TestWebKitAPI test to cover this please?
(In reply to Darin Adler from comment #7) > Thanks so much for fixing this! Really important fix, and very sorry for my > mistake. Can we add a TestWebKitAPI test to cover this please? Bug 175146