Skip to content

Revert "[4.1] Stricter enforcement of the "large space" heuristic" #13560

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
Dec 20, 2017

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Dec 20, 2017

Reverts #13438

This PR caused some projects to fail the build. I will try to come up with reduced test-case and re-open the JIRA.

@xedin
Copy link
Contributor Author

xedin commented Dec 20, 2017

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Dec 20, 2017

/cc @CodaFi

@xedin
Copy link
Contributor Author

xedin commented Dec 20, 2017

@swift-ci please test source compatibility

@CodaFi
Copy link
Contributor

CodaFi commented Dec 20, 2017

I think I know what these projects might be... all the same the source compatibility break should be discussed because this is a case where the old Sema code demonstrably allows malformed Swift code through to SILGen.

@rudkx
Copy link
Contributor

rudkx commented Dec 20, 2017

@CodaFi Malformed in the sense that we're not always diagnosing not-fully-covered switches, or in some other sense?

@CodaFi
Copy link
Contributor

CodaFi commented Dec 20, 2017

In the sense that SILGen currently inserts a pessimistic fatalError default branch that causes surprises to say the least. It’s not a full miscompile but it’s still undefined behavior caused by a bug in the compiler.

@rudkx
Copy link
Contributor

rudkx commented Dec 20, 2017

I'm not seeing a fatalError inserted in the original test case from https://bugs.swift.org/browse/SR-6316, but I do see a crash if the code is optimized. It's not great behavior

Let's back this out of 4.1 for the moment and then discuss in https://bugs.swift.org/browse/SR-6652 whether we should adjust the heuristic for when it bails out.

@rudkx rudkx merged commit 783b386 into swift-4.1-branch Dec 20, 2017
@shahmishal shahmishal deleted the revert-13438-re-cover-model branch May 13, 2022 08:51
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.

3 participants