Skip to content

Mark SCContentSharingPicker::sharedPicker unsafe - #881

Merged
madsmtm merged 1 commit into
madsmtm:mainfrom
LucaCappelletti94:upstream/safe-screen-capture-kit
Oct 14, 2026
Merged

madsmtm merged 1 commit into
madsmtm:mainfrom
LucaCappelletti94:upstream/safe-screen-capture-kit

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

As agreed in #879, this marks the shared accessor unsafe instead of the racing methods. SCContentSharingPicker can only be obtained through sharedPicker, since init and new are unavailable, so every thread that calls it gets the same picker. On macOS 15.7.9, 26.6.2 and 27.0.1, racing setDefaultConfiguration or setMaximumStreamCount on that picker releases the old value twice and crashes in objc_release (FB25187882, reproductions for setDefaultConfiguration and setMaximumStreamCount).

The ScreenCaptureKit safety defaults are not released yet, so nothing changes compared to the last release and there is no changelog entry. The regenerated bindings are in the generated fork.

I included the FB25187882 in the doc which I understand is meaningless to all except Apple engineers, so I am not sure whether I should just remove it or not.

@madsmtm madsmtm added bug Something isn't working A-framework Affects the framework crates and the translator for them labels Oct 14, 2026
@madsmtm

madsmtm commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Thanks!

I included the FB25187882 in the doc which I understand is meaningless to all except Apple engineers, so I am not sure whether I should just remove it or not.

I think Feedback IDs are nice because then you know that Apple at least should be aware of it.

@madsmtm
madsmtm merged commit 8cbfaf7 into madsmtm:main Oct 14, 2026
17 checks passed
@LucaCappelletti94
LucaCappelletti94 deleted the upstream/safe-screen-capture-kit branch October 15, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-framework Affects the framework crates and the translator for them bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants