Skip to content

Conversation

iCharlesHu
Copy link
Contributor

The array _allBundles is lazily created when the first item is inserted into it in the _CFBundleAddToTablesLocked function. There’s a possibility that by the time _CFBundleCopyAllBundles is called, _allBundles hasn’t been initialized yet. In such cases, lazily initialize _allBundles.

resolves: rdar://150846072

…py it.

The array `_allBundles` is lazily created when the first item is inserted into it in the `_CFBundleAddToTablesLocked` function. There’s a possibility that by the time `_CFBundleCopyAllBundles` is called, `_allBundles` hasn’t been initialized yet. In such cases, lazily initialize `_allBundles`.

resolves: rdar://150846072
@iCharlesHu iCharlesHu requested a review from parkera September 24, 2025 07:35
@iCharlesHu
Copy link
Contributor Author

@swift-ci please test

@iCharlesHu
Copy link
Contributor Author

@swift-ci please test Windows platform

}

bool _CFIsSwift(CFTypeID type, CFSwiftRef obj) {
if (obj == NULL) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this part of the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants