Bug 192481

Summary: Injected bundle for WebKitTestRunner leaks WKTypeRef objects
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Tools / TestsAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, ews-watchlist, joepeck, lforschler, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1
simon.fraser: review+, ews-watchlist: commit-queue-
Archive of layout-test-results from ews122 for ios-simulator-wk2 none

David Kilzer (:ddkilzer)
Reported 2018-12-06 16:04:32 PST
The injected bundle for WebKitTestRunner leaks WKTypeRef objects, mostly WKNSNumber objects and a WKNSDictionary. STACK OF 1 INSTANCE OF 'ROOT LEAK: <WKNSDictionary>': [thread 0x7fff93a32380]: 53 libdyld.dylib 0x7fff5b08d015 start + 1 52 com.apple.WebKit.WebContent 0x1010af382 main + 34 XPCServiceMain.mm:165 51 com.apple.WebKit.WebContent 0x1010af094 WebKit::XPCServiceMain(int, char const**) + 1188 XPCServiceMain.mm:157 50 libxpc.dylib 0x7fff5b3e69ca xpc_main + 433 49 libxpc.dylib 0x7fff5b3e7d77 _xpc_objc_main + 580 48 com.apple.AppKit 0x7fff30609a72 NSApplicationMain + 804 47 com.apple.AppKit 0x7fff3063a885 -[NSApplication run] + 764 46 com.apple.AppKit 0x7fff30ddbe34 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044 45 com.apple.AppKit 0x7fff30645a73 _DPSNextEvent + 2085 44 com.apple.HIToolbox 0x7fff32394884 _BlockUntilNextEventMatchingListInModeWithFilter + 64 43 com.apple.HIToolbox 0x7fff32394b06 ReceiveNextEventCommon + 613 42 com.apple.HIToolbox 0x7fff32394d96 RunCurrentEventLoopInMode + 286 41 com.apple.CoreFoundation 0x7fff330aa153 CFRunLoopRunSpecific + 483 40 com.apple.CoreFoundation 0x7fff330aa8ed __CFRunLoopRun + 1293 39 com.apple.CoreFoundation 0x7fff330ab470 __CFRunLoopDoSources0 + 208 38 com.apple.CoreFoundation 0x7fff3318242c __CFRunLoopDoSource0 + 108 37 com.apple.CoreFoundation 0x7fff330c8a11 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 36 com.apple.JavaScriptCore 0x2b14cfea4 WTF::RunLoop::performWork(void*) + 36 RunLoopCF.cpp:38 35 com.apple.JavaScriptCore 0x2b14cf5fd WTF::RunLoop::performWork() + 445 RunLoop.cpp:124 34 com.apple.JavaScriptCore 0x2b1467e5d WTF::Function<void ()>::operator()() const + 173 Function.h:56 33 com.apple.WebKit 0x101127de9 WTF::Function<void ()>::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14>::call() + 25 Function.h:101 32 com.apple.WebKit 0x101127ed8 IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14::operator()() + 104 Connection.cpp:957 31 com.apple.WebKit 0x101106a0d IPC::Connection::dispatchOneIncomingMessage() + 1533 Connection.cpp:1074 30 com.apple.WebKit 0x1010f8551 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 721 Connection.cpp:0 29 com.apple.WebKit 0x101105c8c IPC::Connection::dispatchMessage(IPC::Decoder&) + 476 Connection.cpp:979 28 com.apple.WebKit 0x101e5edfb WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 155 WebProcess.cpp:681 27 com.apple.WebKit 0x1022f2b3d WebKit::WebProcess::didReceiveWebProcessMessage(IPC::Connection&, IPC::Decoder&) + 237 WebProcessMessageReceiver.cpp:131 26 com.apple.WebKit 0x1022f5397 void IPC::handleMessage<Messages::WebProcess::CreateWebPage, WebKit::WebProcess, void (WebKit::WebProcess::*)(unsigned long long, WebKit::WebPageCreationParameters&&)>(IPC::Decoder&, WebKit::WebProcess*, void (WebKit::WebProcess::*)(unsigned long long, WebKit::WebPageCreationParameters&&)) + 359 HandleMessage.h:134 25 com.apple.WebKit 0x1022fbb10 void IPC::callMemberFunction<WebKit::WebProcess, void (WebKit::WebProcess::*)(unsigned long long, WebKit::WebPageCreationParameters&&), std::__1::tuple<unsigned long long, WebKit::WebPageCreationParameters>, std::__1::integer_sequence<unsigned long, 0ul, 1ul> >(std::__1::tuple<unsigned long long, WebKit::WebPageCreationParameters>&&, WebKit::WebProcess*, void (WebKit::WebProcess::*)(unsigned long long, WebKit::WebPageCreationParameters&&)) + 96 HandleMessage.h:48 24 com.apple.WebKit 0x1022fbdb0 void IPC::callMemberFunctionImpl<WebKit::WebProcess, void (WebKit::WebProcess::*)(unsigned long long, WebKit::WebPageCreationParameters&&), std::__1::tuple<unsigned long long, WebKit::WebPageCreationParameters>, 0ul, 1ul>(WebKit::WebProcess*, void (WebKit::WebProcess::*)(unsigned long long, WebKit::WebPageCreationParameters&&), std::__1::tuple<unsigned long long, WebKit::WebPageCreationParameters>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) + 192 HandleMessage.h:42 23 com.apple.WebKit 0x101e5dec8 WebKit::WebProcess::createWebPage(unsigned long long, WebKit::WebPageCreationParameters&&) + 232 WebProcess.cpp:615 22 com.apple.WebKit 0x1021a301e WebKit::WebPage::create(unsigned long long, WebKit::WebPageCreationParameters&&) + 158 WebPage.cpp:348 21 com.apple.WebKit 0x101ecc7a3 WebKit::InjectedBundle::didCreatePage(WebKit::WebPage*) + 67 InjectedBundle.cpp:548 20 com.apple.WebKit 0x101ef1f43 WebKit::InjectedBundleClient::didCreatePage(WebKit::InjectedBundle&, WebKit::WebPage&) + 99 InjectedBundleClient.cpp:47 19 com.apple.WebKitTestRunner.InjectedBundle 0x2b90eb9d4 WTR::InjectedBundle::didCreatePage(OpaqueWKBundle const*, OpaqueWKBundlePage const*, void const*) + 36 InjectedBundle.cpp:70 18 com.apple.WebKitTestRunner.InjectedBundle 0x2b90ebc7b WTR::InjectedBundle::didCreatePage(OpaqueWKBundlePage const*) + 667 InjectedBundle.cpp:124 17 com.apple.WebKit 0x101f0368b WKBundlePostSynchronousMessage + 91 WKBundle.cpp:74 16 com.apple.WebKit 0x101ec7034 WebKit::InjectedBundle::postSynchronousMessage(WTF::String const&, API::Object*, WTF::RefPtr<API::Object, WTF::DumbPtrTraits<API::Object> >&) + 372 InjectedBundle.cpp:141 15 com.apple.WebKit 0x101ec75a8 bool IPC::Connection::sendSync<Messages::WebProcessPool::HandleSynchronousMessage>(Messages::WebProcessPool::HandleSynchronousMessage&&, Messages::WebProcessPool::HandleSynchronousMessage::Reply&&, unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 1208 Connection.h:478 14 com.apple.WebKit 0x101eefc5d bool IPC::Decoder::decode<std::__1::tuple<WebKit::UserData&>, (void*)0>(std::__1::tuple<WebKit::UserData&>&) + 29 Decoder.h:150 13 com.apple.WebKit 0x101eefc8d IPC::ArgumentCoder<std::__1::tuple<WebKit::UserData&> >::decode(IPC::Decoder&, std::__1::tuple<WebKit::UserData&>&) + 29 ArgumentCoders.h:210 12 com.apple.WebKit 0x101eefcd0 bool IPC::TupleCoder<1ul, WebKit::UserData&>::decode<WebKit::UserData, (void*)0>(IPC::Decoder&, std::__1::tuple<WebKit::UserData&>&) + 48 ArgumentCoders.h:173 11 com.apple.WebKit 0x1012c17ad bool IPC::Decoder::decode<WebKit::UserData, (void*)0>(WebKit::UserData&) + 29 Decoder.h:150 10 com.apple.WebKit 0x1012c17fd bool IPC::ArgumentCoder<WebKit::UserData>::decode<WebKit::UserData, (void*)0>(IPC::Decoder&, WebKit::UserData&) + 29 ArgumentCoder.h:96 9 com.apple.WebKit 0x1015f3ffd WebKit::UserData::decode(IPC::Decoder&, WebKit::UserData&) + 29 UserData.cpp:151 8 com.apple.WebKit 0x1015f445c WebKit::UserData::decode(IPC::Decoder&, WTF::RefPtr<API::Object, WTF::DumbPtrTraits<API::Object> >&) + 1100 UserData.cpp:392 7 com.apple.WebKit 0x101657516 API::Dictionary::create(WTF::HashMap<WTF::String, WTF::RefPtr<API::Object, WTF::DumbPtrTraits<API::Object> >, WTF::StringHash, WTF::HashTraits<WTF::String>, WTF::HashTraits<WTF::RefPtr<API::Object, WTF::DumbPtrTraits<API::Object> > > >) + 38 APIDictionary.cpp:41 6 com.apple.WebKit 0x1016575ba API::ObjectImpl<(API::Object::Type)9>::operator new(unsigned long) + 26 APIObject.h:264 5 com.apple.WebKit 0x1014c1a6c API::Object::newObject(unsigned long, API::Object::Type) + 620 APIObject.mm:207 4 com.apple.CoreFoundation 0x7fff3302cff6 +[NSDictionary allocWithZone:] + 102 3 libobjc.A.dylib 0x7fff5a469f29 +[NSObject allocWithZone:] + 16 2 libobjc.A.dylib 0x7fff5a465cea class_createInstance + 87 1 libsystem_malloc.dylib 0x7fff5b23858e calloc + 30 0 libsystem_malloc.dylib 0x7fff5b237ca0 malloc_zone_calloc + 123 ==== 15 (880 bytes) ROOT LEAK: <WKNSDictionary 0x7ff974b060c0> [64] 13 (800 bytes) _dictionary + 16 --> 0x7ff979107880 [256] 1 (48 bytes) 0x7ff979105750 [48] 1 (48 bytes) 0x7ff9791064b0 [48] 1 (48 bytes) 0x7ff979108180 [48] 1 (48 bytes) 0x7ff979108980 [48] 1 (48 bytes) <WKNSNumber 0x7ff974b00270> [48] 1 (48 bytes) <WKNSNumber 0x7ff974b002a0> [48] 1 (48 bytes) <WKNSNumber 0x7ff974b28150> [48] 1 (48 bytes) <WKNSNumber 0x7ff974b288a0> [48] 1 (48 bytes) <WKNSNumber 0x7ff974b29ce0> [48] 1 (48 bytes) <WKNSNumber 0x7ff974b2a9d0> [48] 1 (32 bytes) 0x7ff979107a70 [32] 1 (32 bytes) 0x7ff9791081b0 [32] 1 (16 bytes) _dictionary + 48 --> 0x7ff979107cd0 [16] STACK OF 1 INSTANCE OF 'ROOT LEAK: <WKNSNumber>': [thread 0x7fff93a32380]: 70 libdyld.dylib 0x7fff5b08d015 start + 1 69 com.apple.WebKit.WebContent 0x1010af382 main + 34 XPCServiceMain.mm:165 68 com.apple.WebKit.WebContent 0x1010af094 WebKit::XPCServiceMain(int, char const**) + 1188 XPCServiceMain.mm:157 67 libxpc.dylib 0x7fff5b3e69ca xpc_main + 433 66 libxpc.dylib 0x7fff5b3e7d77 _xpc_objc_main + 580 65 com.apple.AppKit 0x7fff30609a72 NSApplicationMain + 804 64 com.apple.AppKit 0x7fff3063a885 -[NSApplication run] + 764 63 com.apple.AppKit 0x7fff30ddbe34 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044 62 com.apple.AppKit 0x7fff30645a73 _DPSNextEvent + 2085 61 com.apple.HIToolbox 0x7fff32394884 _BlockUntilNextEventMatchingListInModeWithFilter + 64 60 com.apple.HIToolbox 0x7fff32394b06 ReceiveNextEventCommon + 613 59 com.apple.HIToolbox 0x7fff32394d96 RunCurrentEventLoopInMode + 286 58 com.apple.CoreFoundation 0x7fff330aa153 CFRunLoopRunSpecific + 483 57 com.apple.CoreFoundation 0x7fff330aad5b __CFRunLoopRun + 2427 56 com.apple.CoreFoundation 0x7fff330b378a __CFRunLoopDoTimers + 346 55 com.apple.CoreFoundation 0x7fff330b3c87 __CFRunLoopDoTimer + 1095 54 com.apple.CoreFoundation 0x7fff330b4014 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20 53 com.apple.JavaScriptCore 0x2b14d1631 WTF::timerFired(__CFRunLoopTimer*, void*) + 49 RunLoopTimerCF.cpp:52 52 com.apple.WebCore 0x2a31661f6 WTF::RunLoopTimer<WebCore::DataURLDecoder::DecodingResultDispatcher>::fired() + 102 RunLoopTimer.h:72 51 com.apple.WebCore 0x2a3165b08 WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired() + 264 DataURLDecoder.cpp:100 50 com.apple.WebCore 0x2a3165da3 WTF::Function<void (std::optional<WebCore::DataURLDecoder::Result>)>::operator()(std::optional<WebCore::DataURLDecoder::Result>) const + 227 Function.h:56 49 com.apple.WebCore 0x2a2a67719 WTF::Function<void (std::optional<WebCore::DataURLDecoder::Result>)>::CallableWrapper<WebCore::ResourceLoader::loadDataURL()::$_9>::call(std::optional<WebCore::DataURLDecoder::Result>) + 57 Function.h:101 48 com.apple.WebCore 0x2a2a67b78 auto WebCore::ResourceLoader::loadDataURL()::$_9::operator()<std::optional<WebCore::DataURLDecoder::Result> >(std::optional<WebCore::DataURLDecoder::Result>) + 792 ResourceLoader.cpp:272 47 com.apple.WebCore 0x2a2a6f609 WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&, WTF::CompletionHandler<void ()>&&) + 2297 SubresourceLoader.cpp:370 46 com.apple.WebCore 0x2a2a52cf6 WebCore::ResourceLoader::didReceiveResponse(WebCore::ResourceResponse const&, WTF::CompletionHandler<void ()>&&) + 342 ResourceLoader.cpp:482 45 com.apple.WebCore 0x2a299ea35 WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope() + 21 CompletionHandler.h:78 44 com.apple.WebCore 0x2a29aca5f WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope() + 47 CompletionHandler.h:78 43 com.apple.WebCore 0x2a1621bfd WTF::CompletionHandler<void ()>::operator()() + 205 CompletionHandler.h:59 42 com.apple.WebCore 0x2a000eaf5 WTF::Function<void ()>::~Function() + 21 Forward.h:54 41 com.apple.WebCore 0x2a000ebaf WTF::Function<void ()>::~Function() + 175 memory:2603 40 com.apple.WebCore 0x2a2a7c1f9 WTF::Function<void ()>::CallableWrapper<WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&, WTF::CompletionHandler<void ()>&&)::$_6>::~CallableWrapper() + 25 Function.h:91 39 com.apple.WebCore 0x2a2a7c1d5 WTF::Function<void ()>::CallableWrapper<WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&, WTF::CompletionHandler<void ()>&&)::$_6>::~CallableWrapper() + 21 Function.h:91 38 com.apple.WebCore 0x2a2a7c2d1 WTF::Function<void ()>::CallableWrapper<WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&, WTF::CompletionHandler<void ()>&&)::$_6>::~CallableWrapper() + 49 Function.h:91 37 com.apple.WebCore 0x2a2a6f8b5 WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&, WTF::CompletionHandler<void ()>&&)::$_6::~$_6() + 21 SubresourceLoader.cpp:370 36 com.apple.WebCore 0x2a2a75253 WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&, WTF::CompletionHandler<void ()>&&)::$_6::~$_6() + 35 SubresourceLoader.cpp:370 35 com.apple.WebCore 0x2a299ea35 WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope() + 21 CompletionHandler.h:78 34 com.apple.WebCore 0x2a29aca5f WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope() + 47 CompletionHandler.h:78 33 com.apple.WebCore 0x2a1621bf4 WTF::CompletionHandler<void ()>::operator()() + 196 CompletionHandler.h:59 32 com.apple.WebCore 0x2a000f1ed WTF::Function<void ()>::operator()() const + 173 Function.h:56 31 com.apple.WebCore 0x2a2a683c9 WTF::Function<void ()>::CallableWrapper<auto WebCore::ResourceLoader::loadDataURL()::$_9::operator()<std::optional<WebCore::DataURLDecoder::Result> >(std::optional<WebCore::DataURLDecoder::Result>)::'lambda'()>::call() + 25 Function.h:101 30 com.apple.WebCore 0x2a2a68558 auto WebCore::ResourceLoader::loadDataURL()::$_9::operator()<std::optional<WebCore::DataURLDecoder::Result> >(std::optional<WebCore::DataURLDecoder::Result>)::'lambda'()::operator()() + 200 ResourceLoader.cpp:278 29 com.apple.WebCore 0x2a2a6e4f8 WebCore::SubresourceLoader::didFinishLoading(WebCore::NetworkLoadMetrics const&) + 984 SubresourceLoader.cpp:644 28 com.apple.WebCore 0x2a2a7074d WebCore::SubresourceLoader::notifyDone(WebCore::LoadCompletionType) + 125 SubresourceLoader.cpp:743 27 com.apple.WebCore 0x2a2af85f6 WebCore::CachedResourceLoader::loadDone(WebCore::LoadCompletionType, bool) + 214 CachedResourceLoader.cpp:1319 26 com.apple.WebCore 0x2a29f8c3d WebCore::FrameLoader::loadDone(WebCore::LoadCompletionType) + 45 FrameLoader.cpp:794 25 com.apple.WebCore 0x2a29f8c00 WebCore::FrameLoader::checkCompleted() + 592 FrameLoader.cpp:0 24 com.apple.WebCore 0x2a29f8ed6 WebCore::FrameLoader::checkLoadComplete() + 502 FrameLoader.cpp:2651 23 com.apple.WebCore 0x2a2a04101 WebCore::FrameLoader::checkLoadCompleteForThisFrame() + 2353 FrameLoader.cpp:2492 22 com.apple.WebKit 0x102027dfb WebKit::WebFrameLoaderClient::dispatchDidFailLoad(WebCore::ResourceError const&) + 155 WebFrameLoaderClient.cpp:572 21 com.apple.WebKit 0x101efeda5 WebKit::InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame(WebKit::WebPage&, WebKit::WebFrame&, WebCore::ResourceError const&, WTF::RefPtr<API::Object, WTF::DumbPtrTraits<API::Object> >&) + 149 InjectedBundlePageLoaderClient.cpp:158 20 com.apple.WebKitTestRunner.InjectedBundle 0x2b90f7430 WTR::InjectedBundlePage::didFailLoadWithErrorForFrame(OpaqueWKBundlePage const*, OpaqueWKBundleFrame const*, OpaqueWKError const*, void const**, void const*) + 48 InjectedBundlePage.cpp:610 19 com.apple.WebKitTestRunner.InjectedBundle 0x2b90f8a0c WTR::InjectedBundlePage::didFailLoadWithErrorForFrame(OpaqueWKBundleFrame const*, OpaqueWKError const*) + 76 InjectedBundlePage.cpp:981 18 com.apple.WebKitTestRunner.InjectedBundle 0x2b911d61f WTR::TestRunner::shouldDumpFrameLoadCallbacks() + 95 TestRunner.cpp:268 17 com.apple.WebKit 0x101f0368b WKBundlePostSynchronousMessage + 91 WKBundle.cpp:74 16 com.apple.WebKit 0x101ec7034 WebKit::InjectedBundle::postSynchronousMessage(WTF::String const&, API::Object*, WTF::RefPtr<API::Object, WTF::DumbPtrTraits<API::Object> >&) + 372 InjectedBundle.cpp:141 15 com.apple.WebKit 0x101ec75a8 bool IPC::Connection::sendSync<Messages::WebProcessPool::HandleSynchronousMessage>(Messages::WebProcessPool::HandleSynchronousMessage&&, Messages::WebProcessPool::HandleSynchronousMessage::Reply&&, unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 1208 Connection.h:478 14 com.apple.WebKit 0x101eefc5d bool IPC::Decoder::decode<std::__1::tuple<WebKit::UserData&>, (void*)0>(std::__1::tuple<WebKit::UserData&>&) + 29 Decoder.h:150 13 com.apple.WebKit 0x101eefc8d IPC::ArgumentCoder<std::__1::tuple<WebKit::UserData&> >::decode(IPC::Decoder&, std::__1::tuple<WebKit::UserData&>&) + 29 ArgumentCoders.h:210 12 com.apple.WebKit 0x101eefcd0 bool IPC::TupleCoder<1ul, WebKit::UserData&>::decode<WebKit::UserData, (void*)0>(IPC::Decoder&, std::__1::tuple<WebKit::UserData&>&) + 48 ArgumentCoders.h:173 11 com.apple.WebKit 0x1012c17ad bool IPC::Decoder::decode<WebKit::UserData, (void*)0>(WebKit::UserData&) + 29 Decoder.h:150 10 com.apple.WebKit 0x1012c17fd bool IPC::ArgumentCoder<WebKit::UserData>::decode<WebKit::UserData, (void*)0>(IPC::Decoder&, WebKit::UserData&) + 29 ArgumentCoder.h:96 9 com.apple.WebKit 0x1015f3ffd WebKit::UserData::decode(IPC::Decoder&, WebKit::UserData&) + 29 UserData.cpp:151 8 com.apple.WebKit 0x1015f41c0 WebKit::UserData::decode(IPC::Decoder&, WTF::RefPtr<API::Object, WTF::DumbPtrTraits<API::Object> >&) + 432 UserData.cpp:356 7 com.apple.WebKit 0x1015f67e2 API::Number<bool, (API::Object::Type)31>::decode(IPC::Decoder&, WTF::RefPtr<API::Object, WTF::DumbPtrTraits<API::Object> >&) + 66 APINumber.h:56 6 com.apple.WebKit 0x10124d19a API::Number<bool, (API::Object::Type)31>::create(bool) + 42 APINumber.h:40 5 com.apple.WebKit 0x101250dda API::ObjectImpl<(API::Object::Type)31>::operator new(unsigned long) + 26 APIObject.h:264 4 com.apple.WebKit 0x1014c1935 API::Object::newObject(unsigned long, API::Object::Type) + 309 APIObject.mm:166 3 com.apple.Foundation 0x7fff3518814e NSAllocateObject + 19 2 libobjc.A.dylib 0x7fff5a465cea class_createInstance + 87 1 libsystem_malloc.dylib 0x7fff5b23858e calloc + 30 0 libsystem_malloc.dylib 0x7fff5b237ca0 malloc_zone_calloc + 123 ==== 1 (48 bytes) ROOT LEAK: <WKNSNumber 0x7ff974850b00> [48]
Attachments
Patch v1 (23.07 KB, patch)
2018-12-06 16:15 PST, David Kilzer (:ddkilzer)
simon.fraser: review+
ews-watchlist: commit-queue-
Archive of layout-test-results from ews122 for ios-simulator-wk2 (2.49 MB, application/zip)
2018-12-06 18:07 PST, EWS Watchlist
no flags
Radar WebKit Bug Importer
Comment 1 2018-12-06 16:05:20 PST
David Kilzer (:ddkilzer)
Comment 2 2018-12-06 16:15:33 PST
Created attachment 356760 [details] Patch v1
Simon Fraser (smfr)
Comment 3 2018-12-06 16:33:43 PST
Comment on attachment 356760 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=356760&action=review > Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:125 > + WKRetainPtr<WKDictionaryRef> initializationDictionary(AdoptWK, static_cast<WKDictionaryRef>(result)); Can we make a version of WKBundlePostSynchronousMessage that is more explicit that the result is retained? At least add a comment in WKBundle.h documenting this above WKBundlePostSynchronousMessage.
EWS Watchlist
Comment 4 2018-12-06 18:07:39 PST
Comment on attachment 356760 [details] Patch v1 Attachment 356760 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10298192 New failing tests: imported/w3c/web-platform-tests/webrtc/simplecall-no-ssrcs.https.html
EWS Watchlist
Comment 5 2018-12-06 18:07:40 PST
Created attachment 356773 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
David Kilzer (:ddkilzer)
Comment 6 2018-12-06 21:13:21 PST
Comment on attachment 356760 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=356760&action=review >> Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:125 >> + WKRetainPtr<WKDictionaryRef> initializationDictionary(AdoptWK, static_cast<WKDictionaryRef>(result)); > > Can we make a version of WKBundlePostSynchronousMessage that is more explicit that the result is retained? At least add a comment in WKBundle.h documenting this above WKBundlePostSynchronousMessage. It's both WKBundlePostSynchronousMessage() and WKBundlePagePostSynchronousMessageForTesting(). Will update headers.
David Kilzer (:ddkilzer)
Comment 7 2018-12-06 21:34:45 PST
David Kilzer (:ddkilzer)
Comment 8 2018-12-06 21:35:41 PST
Comment on attachment 356760 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=356760&action=review >>> Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:125 >>> + WKRetainPtr<WKDictionaryRef> initializationDictionary(AdoptWK, static_cast<WKDictionaryRef>(result)); >> >> Can we make a version of WKBundlePostSynchronousMessage that is more explicit that the result is retained? At least add a comment in WKBundle.h documenting this above WKBundlePostSynchronousMessage. > > It's both WKBundlePostSynchronousMessage() and WKBundlePagePostSynchronousMessageForTesting(). > > Will update headers. Was changing the parameter name of each function from `returnData[Ref]` to `returnRetainedData[Ref]` too subtle?
Darin Adler
Comment 9 2018-12-07 08:58:43 PST
Comment on attachment 356760 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=356760&action=review > Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:135 > + WKRetainPtr<WKBooleanRef> result(AdoptWK, static_cast<WKBooleanRef>(returnData)); > + return WKBooleanGetValue(result.get()); It’s significantly simpler to write this these with adoptWK instead of a local variable. return WKBooleanGetValue(adoptWK(static_cast<WKBooleanRef>(returnData)).get());
David Kilzer (:ddkilzer)
Comment 10 2018-12-10 13:57:27 PST
Comment on attachment 356760 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=356760&action=review >> Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:135 >> + return WKBooleanGetValue(result.get()); > > It’s significantly simpler to write this these with adoptWK instead of a local variable. > > return WKBooleanGetValue(adoptWK(static_cast<WKBooleanRef>(returnData)).get()); Fixed in this follow-up commit: Committed r239050: <https://trac.webkit.org/changeset/239050>
Note You need to log in before you can comment on or make changes to this bug.