WebKitTestRunner leaks objects in a top-level autoreleasePool that's never cleared. This occurs on both iOS and macOS. <rdar://problem/50987831>
Created attachment 387145 [details] Patch v1
Comment on attachment 387145 [details] Patch v1 Nice! r=me
Comment on attachment 387145 [details] Patch v1 Clearing flags on attachment: 387145 Committed r254254: <https://trac.webkit.org/changeset/254254>
All reviewed patches have been landed. Closing bug.
Comment on attachment 387145 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=387145&action=review > Tools/WebKitTestRunner/ios/mainIOS.mm:73 > UIApplicationMain(argc, (char**)argv, @"WebKitTestRunnerApp", @"WebKitTestRunnerApp"); No need for an autorelease pool around this? > Tools/WebKitTestRunner/mac/main.mm:68 > + WTR::TestController controller(argc, argv); No need for an autorelease pool around this?
Comment on attachment 387145 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=387145&action=review >> Tools/WebKitTestRunner/ios/mainIOS.mm:73 >> UIApplicationMain(argc, (char**)argv, @"WebKitTestRunnerApp", @"WebKitTestRunnerApp"); > > No need for an autorelease pool around this? I guess it would never be drained, so it would be bad if it was needed, but I’m still wonder if we might start getting diagnostics about things being autoreleased without a pool. Although those would be leaks, I guess. >> Tools/WebKitTestRunner/mac/main.mm:68 >> + WTR::TestController controller(argc, argv); > > No need for an autorelease pool around this? Same.
Comment on attachment 387145 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=387145&action=review >>> Tools/WebKitTestRunner/ios/mainIOS.mm:73 >>> UIApplicationMain(argc, (char**)argv, @"WebKitTestRunnerApp", @"WebKitTestRunnerApp"); >> >> No need for an autorelease pool around this? > > I guess it would never be drained, so it would be bad if it was needed, but I’m still wonder if we might start getting diagnostics about things being autoreleased without a pool. Although those would be leaks, I guess. Any autoreleasePool "leaks" inside UIApplicationMain() need to be handled in a localized manner. As you note, adding an @autoreleasepool block around UIApplicationMain() would never be drained. >>> Tools/WebKitTestRunner/mac/main.mm:68 >>> + WTR::TestController controller(argc, argv); >> >> No need for an autorelease pool around this? > > Same. Same, but there are some additional autoreleasePool "leaks" under WTR::TestController::TestController() during initialization, so a follow-up patch is warranted.
Additional improvements to autoreleasePool leaks tracked in Bug 206018.