Skip to content
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-7098] RxSwift source breakage: Assertion failed: (DisjunctionChoices.count(locator)) #49646

Closed
clackary opened this issue Mar 1, 2018 · 4 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software type checker Area → compiler: Semantic analysis

Comments

@clackary
Copy link
Contributor

clackary commented Mar 1, 2018

Previous ID SR-7098
Radar rdar://problem/38394645
Original Reporter @clackary
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, TypeChecker
Assignee @clackary
Priority Medium

md5: cb5ad904f1219e3438502dee34d726a0

Issue Description:

To reproduce:

  1. Install latest GM/Beta Xcode
  2. $ git clone git@github.com:apple/swift-source-compat-suite.git
  3. $ cd swift-source-compat-suite

To build Swift from scratch before testing:
4. $ ./reproduce.py master --project-path RxSwift

Or if you've already built Swift:
4. $ ./reproduce.py master --project-path RxSwift --swiftc path/to/swiftc

https://ci.swift.org/job/swift-PR-source-compat-suite-test-macOS/119/artifact/swift-source-compat-suite/FAIL_RxSwift_4.0.3_BuildXcodeWorkspaceScheme_RxCocoa-tvOS_generic-platform-tvOS.log

Assertion failed: (DisjunctionChoices.count(locator)), function getDisjunctionChoice, file /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-test-macOS/swift/lib/Sema/ConstraintSystem.h, line 689. 0 swift 0x000000010642f398 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40 1 swift 0x000000010642fa26 SignalHandler(int) + 422 2 libsystem_platform.dylib 0x00007fff6bec5f5a _sigtramp + 26 3 libsystem_platform.dylib 0x0000000000000001 _sigtramp + 2484314305 4 libsystem_c.dylib 0x00007fff6bcf0312 abort + 127 5 libsystem_c.dylib 0x00007fff6bcb8368 basename_r + 0 6 swift 0x00000001039cce28 swift::constraints::Solution::getDisjunctionChoice(swift::constraints::ConstraintLocator*) const + 360 7 swift 0x00000001039b8f29 (anonymous namespace)::ExprRewriter::buildMemberRef(swift::Expr*, swift::Type, swift::SourceLoc, swift::constraints::OverloadChoice, swift::DeclNameLoc, swift::Type, swift::constraints::ConstraintLocatorBuilder, swift::constraints::ConstraintLocatorBuilder, bool, swift::FunctionRefKind, swift::AccessSemantics, bool) + 5817 8 swift 0x00000001039c92f1 swift::ASTVisitor<(anonymous namespace)::ExprRewriter, swift::Expr*, void, void, void, void, void>::visit(swift::Expr*) + 33217 9 swift 0x00000001039b64a9 (anonymous namespace)::ExprRewriter::walkToExprPost(swift::Expr*) + 25 10 swift 0x00000001039bc076 (anonymous namespace)::ExprWalker::walkToExprPost(swift::Expr*) + 22 11 swift 0x0000000103dc837f swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) + 303 12 swift 0x0000000103dca9b6 (anonymous namespace)::Traversal::visitApplyExpr(swift::ApplyExpr*) + 86 13 swift 0x0000000103dc8353 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) + 259 14 swift 0x0000000103dc72d4 swift::Expr::walk(swift::ASTWalker&) + 84 15 swift 0x00000001039b325a swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 586 16 swift 0x0000000103ac6739 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 1161 17 swift 0x0000000103b55fde swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 558 18 swift 0x0000000103b5411d swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 269 19 swift 0x0000000103b54d41 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 385 20 swift 0x0000000103b76442 typeCheckFunctionsAndExternalDecls(swift::TypeChecker&) + 258 21 swift 0x0000000103b77566 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) + 1862 22 swift 0x00000001037d4207 swift::CompilerInstance::parseAndCheckTypes(swift::CompilerInstance::ImplicitImports const&) + 839 23 swift 0x00000001037d3a92 swift::CompilerInstance::performSema() + 450 24 swift 0x0000000102c70dbf performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 1775 25 swift 0x0000000102c6f72b swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2811 26 swift 0x0000000102c264e2 main + 3042 27 libdyld.dylib 0x00007fff6bc44115 start + 1 Stack dump: 0. 
1. While type-checking 'scrollViewDidScroll(_:)' at /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-test-macOS/project_cache/RxSwift/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift:71:12 2. While type-checking expression at [/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-test-macOS/project_cache/RxSwift/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift:78:9 - line:78:65] RangeText="self._forwardToDelegate?.scrollViewDidScroll?(scrollView)"
@belkadan
Copy link
Contributor

belkadan commented Mar 1, 2018

cc @rudkx, @xedin

@rudkx
Copy link
Member

rudkx commented Mar 2, 2018

Reduced. Reproduces with:

xcrun -sdk iphoneos swiftc -typecheck -target arm64-apple-ios11.3 sr7098.swift -import-objc-header sr7098.h -disable-bridging-pch

@rudkx
Copy link
Member

rudkx commented Mar 8, 2018

@swift-ci create

@rudkx
Copy link
Member

rudkx commented Apr 11, 2018

Merged: 44531db

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

4 participants