-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Concurrency] SILGenModule::emitEntryPoint crashes when exit
hasn't been imported
#71424
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
[Concurrency] SILGenModule::emitEntryPoint crashes when exit
hasn't been imported
#71424
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I guess we don't have any test cases that test async top-level code in an environment that doesn't have an exit
imported already. I think we should be able to create one with -parse-stdlib
and maybe a few other flags.
Something like swiftc -parse-stdlib <foo.swift>
and the below should at least get close to repro'ing the assert:
import _Concurrency
func foo() async { }
await foo()
Would this work from
Should I also add a |
Something like that, yeah.
To test |
We should probably have an explicit test for both though. Can we do that in a single test, i.e. with a top level |
I believe it needs to be in two tests since the
|
401d3cb
to
54a28f2
Compare
54a28f2
to
25237b7
Compare
@swift-ci smoke test |
… been imported If `exit` hasn't been imported, SILGenModule::emitEntryPoint crashes because it doesn't synthesize an exit function like SILGenFunction::emitCallToMain does. Make it do so. rdar://122413238
25237b7
to
e7f1ea5
Compare
@swift-ci smoke test |
If
exit
hasn't been imported, SILGenModule::emitEntryPoint crashes because it doesn't synthesize an exit function like SILGenFunction::emitCallToMain does. Make it do so.rdar://122413238