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
[SR-4088] [Xcode 9 beta1, previously: 8.3 beta] Segmentation fault: 11. While emitting SIL for <member> #46671
Comments
/cc @jckarter who knows SIL things PS. I think I've added the correct labels, etc. If not, please correct! |
@swift-ci create |
I reproed the crash in 8W132p, but it builds successfully in master. I wonder if we fixed this already (we'll want to make sure it gets into 3.1) |
Thanks for the update @jckarter! Do you think the fix will land in the final Xcode 8.3 release? |
Unfortunately, it still crashes with the latest 3.1 snapshot. Maybe there's a fix we can cherry-pick. |
@slavapestov This is happening again in Xcode9 beta 1 |
cc @jckarter too |
We’re hitting this in the 4.0 source compatibility suite: |
Reduced test case:
If I change "extension ReusableViewFactoryProtocol where View: UITableViewCell" to "extension ReusableViewFactoryProtocol where View == UITableViewCell", no crash. This should be easy to figure out. |
Reverting this commit makes it work again:
|
4.0 PR: #10440 |
Resolved on 4.0 and master. |
@jessesquires Can you confirm whether this works with a recent snapshot toolchain? The fix should roll out in a future Xcode 9 seed too if you want to wait for that. |
@jckarter Will do! |
Confirming that this is fixed with the Swift 4.0 snapshot from 7/7/17 |
Environment
Xcode Version 9.0 beta (9M136h)
Xcode Version 8.3 beta 3 (8W132p)
Additional Detail from JIRA
md5: 4d4261cd80bec00a8e1668233eb0c782
Issue Description:
This open source library compiles fine with Xcode 8.2, but seg faults and crashes the compiler with Xcode 8.3. There are at least a few hundred developers using this library.
I don't know enough to give this task a better title/description, so hopefully someone can help with that.
Here's the project with the problem:
https://github.com/jessesquires/JSQDataSourcesKit
Also tracking this issue on GitHub at:
jessesquires/JSQDataSourcesKit#95
Repro steps
Using
Xcode Version 8.2.1 (8C1002)
Checkout the
develop
branch.Build (
cmd-B
Happiness
Using
Xcode Version 8.3 beta 3 (8W132p)
Checkout the
develop
branch.Build (
cmd-B
Cry
Stack trace:
0 swift 0x000000010b0b97a7 PrintStackTraceSignalHandler(void*) + 39
1 swift 0x000000010b0b8d36 SignalHandler(int) + 662
2 libsystem_platform.dylib 0x00007fffaa0f6bba _sigtramp + 26
3 libsystem_platform.dylib 0x00007ff93fd9fa80 _sigtramp + 2513080032
4 swift 0x0000000108e0ebe7 swift::CanType swift::CanTypeVisitor<(anonymous namespace)::SILTypeSubstituter, swift::CanType>::visit<>(swift::CanType) + 375
5 swift 0x0000000108e0f352 (anonymous namespace)::SILTypeSubstituter::visitSILFunctionType(swift::CanTypeWrapper<swift::SILFunctionType>, bool) + 770
6 swift 0x0000000108e0f5b1 swift::SILFunctionType::substGenericArgs(swift::SILModule&, llvm::ArrayRef<swift::Substitution>) + 193
7 swift 0x0000000108a26150 (anonymous namespace)::Callee::getAtUncurryLevel(swift::Lowering::SILGenFunction&, unsigned int) const + 2880
8 swift 0x0000000108a22d90 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 2032
9 swift 0x0000000108a6fb2c swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 124
10 swift 0x0000000108accf14 swift::Lowering::SILGenFunction::emitReturnExpr(swift::SILLocation, swift::Expr*) + 452
11 swift 0x0000000108ac8e7c swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 188
12 swift 0x0000000108acc618 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 14424
13 swift 0x0000000108a8c0c9 swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 409
14 swift 0x0000000108a0d52b swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*)::$_1::operator()(swift::SILFunction*) const + 1867
15 swift 0x0000000108a0c102 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 642
16 swift 0x0000000108ad28fa swift::Lowering::SILGenModule::visitExtensionDecl(swift::ExtensionDecl*) + 634
17 swift 0x0000000108a19b3b swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 1483
18 swift 0x0000000108a1b719 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional<unsigned int>, bool, bool) + 1593
19 swift 0x00000001083403f2 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 45842
20 swift 0x00000001082f03c2 main + 11298
21 libdyld.dylib 0x00007fffa9ee9255 start + 1
The text was updated successfully, but these errors were encountered: