Skip to content

Conversation

@meg-gupta
Copy link
Contributor

@meg-gupta meg-gupta commented Apr 13, 2024

Explanation: SILCombine::visitInjectEnumAddrInst deletes init_enum_data_addr and inject_enum_addr and creates an empty value to store into the destination addr when legal. Optional empty types can be initialized with init_enum_data_addr but inject_enum_addr can be present only on some control flow paths. Applying this optimization can result in uninitialized tag information on some paths leading to miscompilations.

Issue: rdar://126231554

Scope: Effects optionals of empty type which are fairly common due to some frameworks

Risk: Low. Disabling an optimization recently enabled.

Testing: Unit tests

Reviewer: @aschwaighofer

@meg-gupta meg-gupta requested a review from aschwaighofer April 13, 2024 02:35
@meg-gupta meg-gupta requested a review from a team as a code owner April 13, 2024 02:35
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta requested a review from tbkka April 14, 2024 05:04
@meg-gupta meg-gupta merged commit f4109a9 into swiftlang:release/6.0 Apr 15, 2024
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.

4 participants