Bug 231834 - [WebAuthn] Many Objective-C classes leak their instance variables
Summary: [WebAuthn] Many Objective-C classes leak their instance variables
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
Keywords: InRadar
Depends on:
Reported: 2021-10-15 14:35 PDT by David Kilzer (:ddkilzer)
Modified: 2021-10-16 21:03 PDT (History)
5 users (show)

See Also:

Patch v1 (8.92 KB, patch)
2021-10-15 14:41 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2021-10-15 14:35:47 PDT
Many Objective-C classes used by WebAuthn leak their instance variables due to missing -dealloc methods that release the instance variables.

Found by the clang static analyzer.
Comment 1 Radar WebKit Bug Importer 2021-10-15 14:36:06 PDT
Comment 2 David Kilzer (:ddkilzer) 2021-10-15 14:41:29 PDT
Created attachment 441429 [details]
Patch v1
Comment 3 Brent Fulgham 2021-10-15 14:55:49 PDT
Comment on attachment 441429 [details]
Patch v1

Oh, boy. Thank you for finding these. r=me.
Comment 4 David Kilzer (:ddkilzer) 2021-10-16 20:39:32 PDT
Comment on attachment 441429 [details]
Patch v1

Marking cq+ because api-ios failures happen with and without the patch:

Failures in API Test first run: ['TestWebKitAPI.WebKitLegacy.ScrollingDoesNotPauseMedia', 'TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS', 'TestWebKitAPI.WebKitLegacy.PreemptVideoFullscreen']
Failures in API Test second run: ['TestWebKitAPI.WebKitLegacy.ScrollingDoesNotPauseMedia', 'TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS', 'TestWebKitAPI.WebKitLegacy.PreemptVideoFullscreen']
Flaky Tests: 
Failures in API Test on clean tree: 
New failures: TestWebKitAPI.WebKitLegacy.ScrollingDoesNotPauseMedia, TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS, TestWebKitAPI.WebKitLegacy.PreemptVideoFullscreen

Not sure why the bots flagged this as a regression, though.
Comment 5 David Kilzer (:ddkilzer) 2021-10-16 20:39:51 PDT
The api-gtk failures are also unrelated.
Comment 6 EWS 2021-10-16 21:03:29 PDT
Committed r284331 (243126@main): <https://commits.webkit.org/243126@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 441429 [details].