Skip to content

Change 'unsafeDowncast' to 'as!' #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Jul 24, 2024

Motivation:

The 'unsafeDowncast' can cause a miscompile leading to unexpected runtime behaviour.

Modifications:

  • Use 'as!' instead

Result:

No miscompiles on 5.10

Motivation:

The 'unsafeDowncast' can cause a miscompile leading to unexpected
runtime behaviour.

Modifications:

- Use 'as!' instead

Result:

No miscompiles on 5.10
@glbrntt glbrntt requested a review from FranzBusch July 24, 2024 13:42
@FranzBusch FranzBusch enabled auto-merge (squash) July 24, 2024 13:43
@FranzBusch FranzBusch merged commit 24c800f into swift-server:main Jul 24, 2024
4 of 5 checks passed
@glbrntt glbrntt deleted the unsafe-downcast branch July 24, 2024 14:01
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants