You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
Oct 30, 2019
· 6 comments
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
I get this when I try to compile a project which uses Objective-C and Swift, and when I import some files (hard to tell the root cause because of nested imports) in the bridging file:
Command CompileSwift failed with a nonzero exit code
Illegal instruction: 4
The text was updated successfully, but these errors were encountered:
Looks like that Feedback hasn't made it to us yet within Apple, but can you attach the project if you haven't already? (Even better if you can share it here.)
I couldn't initially reproduce it in a project, and I couldn't share my project either. But after more trial and error, I found out the culprit, it's caused by generics with type constraints like:
Hm, interesting. We'd probably also need to see how you use the type to track down the crash though; if you have it reproducing in a small example that'd be very useful!
The radar for this is still hung up in triage where I can't modify it, but I took at peek at the attachments. This looks like a pretty straightforward stack overflow due to infinite recursion in ClangImporter:
The code has moved around a little, but I think the problem might be in VisitObjCInterfaceDecl(), where we import the generic parameters before we add the declaration to the ImportedDecls map. I don't know ClangImporter very well yet, so maybe I'm missing something, but shouldn't we make sure the type is registered before we import something that might refer to it?
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Environment
macOS 10.14.5 (18F132)
Xcode 11.1 (11A1027)
Additional Detail from JIRA
md5: 13546b5062a56d81ec4f05a0f0195c6a
Issue Description:
I get this when I try to compile a project which uses Objective-C and Swift, and when I import some files (hard to tell the root cause because of nested imports) in the bridging file:
The text was updated successfully, but these errors were encountered: