- 
                Notifications
    
You must be signed in to change notification settings  - Fork 10.6k
 
[swiftc (49 vs. 5588)] Add crasher in swift::constraints::ConstraintSystem::setMustBeMaterializableRecursive(...) #11383
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
      
      
            swift-ci
  merged 1 commit into
  swiftlang:master
from
practicalswift:swiftc-28831-type-ismaterializable-argument-to-setmustbematerializablerecursive-may-not-be-in
  
      
      
   
  Aug 14, 2017 
      
    
                
     Merged
            
            [swiftc (49 vs. 5588)] Add crasher in swift::constraints::ConstraintSystem::setMustBeMaterializableRecursive(...) #11383
                    swift-ci
  merged 1 commit into
  swiftlang:master
from
practicalswift:swiftc-28831-type-ismaterializable-argument-to-setmustbematerializablerecursive-may-not-be-in
  
      
      
   
  Aug 14, 2017 
              
            Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    …ystem::setMustBeMaterializableRecursive(...) Add test case for crash triggered in `swift::constraints::ConstraintSystem::setMustBeMaterializableRecursive(...)`. Current number of unresolved compiler crashers: 49 (5588 resolved) /cc @cwillmor - just wanted to let you know that this crasher caused an assertion failure for the assertion `type->isMaterializable() && "argument to setMustBeMaterializableRecursive may not be inherently " "non-materializable"` added on 2015-05-21 by you in commit df9136e :-) Assertion failure in [`lib/Sema/ConstraintSystem.cpp (line 181)`](https://github.com/apple/swift/blob/efe143c2f40de934f5264502ad217f27a8afb0ec/lib/Sema/ConstraintSystem.cpp#L181): ``` Assertion `type->isMaterializable() && "argument to setMustBeMaterializableRecursive may not be inherently " "non-materializable"' failed. When executing: void swift::constraints::ConstraintSystem::setMustBeMaterializableRecursive(swift::Type) ``` Assertion context: ```c++ void ConstraintSystem::setMustBeMaterializableRecursive(Type type) { assert(type->isMaterializable() && "argument to setMustBeMaterializableRecursive may not be inherently " "non-materializable"); type = getFixedTypeRecursive(type, /*wantRValue=*/false); type = type->lookThroughAllAnyOptionalTypes(); if (auto typeVar = type->getAs<TypeVariableType>()) { typeVar->getImpl().setMustBeMaterializable(getSavedBindings()); ``` Stack trace: ``` 0 0x0000000003f9c924 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3f9c924) 1 0x0000000003f9cc66 SignalHandler(int) (/path/to/swift/bin/swift+0x3f9cc66) 2 0x00007f236f9c6390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390) 3 0x00007f236deeb428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0 4 0x00007f236deed02a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0 5 0x00007f236dee3bd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0 6 0x00007f236dee3c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82) 7 0x000000000121f142 swift::constraints::ConstraintSystem::setMustBeMaterializableRecursive(swift::Type) (/path/to/swift/bin/swift+0x121f142) 8 0x000000000121f0f3 swift::constraints::ConstraintSystem::setMustBeMaterializableRecursive(swift::Type) (/path/to/swift/bin/swift+0x121f0f3) 9 0x00000000011e8ebc swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder) (/path/to/swift/bin/swift+0x11e8ebc) 10 0x00000000011f8a18 swift::constraints::ConstraintSystem::addConstraintImpl(swift::constraints::ConstraintKind, swift::Type, swift::Type, swift::constraints::ConstraintLocatorBuilder, bool) (/path/to/swift/bin/swift+0x11f8a18) 11 0x00000000011ef5cd swift::constraints::ConstraintSystem::addConstraint(swift::constraints::ConstraintKind, swift::Type, swift::Type, swift::constraints::ConstraintLocatorBuilder, bool) (/path/to/swift/bin/swift+0x11ef5cd) 12 0x0000000001200137 swift::constraints::ConstraintSystem::tryTypeVariableBindings(unsigned int, swift::TypeVariableType*, llvm::ArrayRef<swift::constraints::ConstraintSystem::PotentialBinding>, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0x1200137) 13 0x0000000001204004 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0x1204004) 14 0x0000000001200741 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0x1200741) 15 0x0000000001200189 swift::constraints::ConstraintSystem::tryTypeVariableBindings(unsigned int, swift::TypeVariableType*, llvm::ArrayRef<swift::constraints::ConstraintSystem::PotentialBinding>, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0x1200189) 16 0x0000000001204004 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0x1204004) 17 0x0000000001200741 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0x1200741) 18 0x00000000012021b8 swift::constraints::ConstraintSystem::solve(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0x12021b8) 19 0x0000000001203cd2 swift::constraints::ConstraintSystem::solve(swift::Expr*&, swift::Type, swift::ExprTypeCheckListener*, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0x1203cd2) 20 0x00000000012377b7 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) (/path/to/swift/bin/swift+0x12377b7) 21 0x000000000123b63b swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) (/path/to/swift/bin/swift+0x123b63b) 22 0x00000000012c30f0 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0x12c30f0) 23 0x00000000012c28f6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) (/path/to/swift/bin/swift+0x12c28f6) 24 0x00000000012e28f0 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x12e28f0) 25 0x00000000010142e7 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x10142e7) 26 0x00000000004bba87 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bba87) 27 0x00000000004ba834 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4ba834) 28 0x0000000000473494 main (/path/to/swift/bin/swift+0x473494) 29 0x00007f236ded6830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0 30 0x0000000000470d49 _start (/path/to/swift/bin/swift+0x470d49) ```
| 
           @swift-ci please test and merge  | 
    
    
      
        1 similar comment
      
    
  
    | 
           @swift-ci please test and merge  | 
    
| 
           @swift-ci please smoke test and merge  | 
    
| 
           @swift-ci please test and merge  | 
    
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Add test case for crash triggered in
swift::constraints::ConstraintSystem::setMustBeMaterializableRecursive(...).Current number of unresolved compiler crashers: 49 (5588 resolved)
/cc @cwillmor - just wanted to let you know that this crasher caused an assertion failure for the assertion
type->isMaterializable() && "argument to setMustBeMaterializableRecursive may not be inherently " "non-materializable"added on 2015-05-21 by you in commit df9136e :-)Assertion failure in
lib/Sema/ConstraintSystem.cpp (line 181):Assertion context:
Stack trace: