Bug 299845

Summary: Regression(300686@main) Refcounting of ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest is incorrect
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Chris Dumez
Reported 2025-09-29 19:33:36 PDT
In 300686@main, I incorrectly assumed that the static analysis was wrong and that the `create` functions returning ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest objects were returning a +1 refcount object which we needed to adopt. However, this framework is using ARC and those functions are in fact returning autoreleased objects. Our code was already wrong pre-300686@main as we were adopting those objects. However, we used to call leakRef() later on, which would avoid crashes. In 300686@main , I had dropped the leakRef() calls as they seemed unnecessary. To address the issue, I stop calling `adoptNS()` and I drop the annotations I had adopted in the forward declaration header. The framework is not able to adopt those annotations as it would break other clients of these APIs.
Attachments
Chris Dumez
Comment 1 2025-09-29 19:35:38 PDT
EWS
Comment 2 2025-09-29 21:25:53 PDT
Committed 300731@main (fc768e2e3c75): <https://commits.webkit.org/300731@main> Reviewed commits have been landed. Closing PR #51541 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-09-29 21:28:38 PDT
Note You need to log in before you can comment on or make changes to this bug.