Uploaded image for project: 'Swift'
  1. Swift
  2. SR-4295

Crash-on-invalid: failed to find PA's conformance to known protocol

    Details

      Description

      NOTE: Probably reproduces with a github/master build

      $ git fetch https://github.com/dabrahams/swift refs/bugs/SR-failed-to-find-PAs-conformance-to-known-protocol:BUG && git checkout BUG
      

      Now build the Prototypes/AU3.swift.gyb test

      rm -rf /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp && mkdir -p /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp && /Users/Shared/dabrahams/s/swift/utils/gyb -DWORD_BITS=64 /Users/Shared/dabrahams/s/swift/test/Prototypes/AU3.swift.gyb -o /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/out.swift && /Users/Shared/dabrahams/s/swift/utils/line-directive /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/out.swift -- xcrun --toolchain default --sdk /Applications/Xcode-8W109m.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./bin/swiftc -target x86_64-apple-macosx10.9  -module-cache-path '/var/folders/k9/nzq6k4f57xb5vw8wrgk_7cvh0000gn/T/swift-testsuite-clang-module-cacheVwD5Zd' -F /Applications/Xcode-8W109m.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/../../../Developer/Library/Frameworks -Xlinker -rpath -Xlinker /Applications/Xcode-8W109m.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/../../../Developer/Library/Frameworks  -swift-version 3  /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/out.swift -o /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/a.out -Onone && /Users/Shared/dabrahams/s/swift/utils/line-directive /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/out.swift --  /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/a.out
      /Users/Shared/dabrahams/s/swift/test/Prototypes/AU3.swift.gyb:185:12: error: same-type constraint type 'AnyUnicodeView_' does not conform to required protocol 'BidirectionalCollection'
      where Base == AnyUnicodeView_,
                 ^
      Assertion failed: (conformance && "failed to find PA's conformance to known protocol"), function operator(), file /Users/Shared/dabrahams/s/swift/lib/AST/GenericSignatureBuilder.cpp, line 1524.
      0  swift                    0x0000000107301c18 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
      1  swift                    0x00000001073022c6 SignalHandler(int) + 454
      2  libsystem_platform.dylib 0x00007fffbd848b3a _sigtramp + 26
      3  libsystem_platform.dylib 000000000000000000 _sigtramp + 1115387104
      4  libsystem_c.dylib        0x00007fffbd6cd420 abort + 129
      5  libsystem_c.dylib        0x00007fffbd694893 basename_r + 0
      6  swift                    0x0000000104f92cb6 swift::ProtocolConformanceRef llvm::function_ref<swift::ProtocolConformanceRef (swift::ProtocolDecl*)>::callback_fn<swift::GenericSignatureBuilder::PotentialArchetype::updateNestedTypeForConformance(llvm::PointerUnion<swift::AssociatedTypeDecl*, swift::TypeAliasDecl*>, swift::GenericSignatureBuilder::PotentialArchetype::NestedTypeUpdate)::$_1>(long, swift::ProtocolDecl*) + 470
      7  swift                    0x0000000104f84286 concretizeNestedTypeFromConcreteParent(swift::GenericSignatureBuilder::PotentialArchetype*, swift::GenericSignatureBuilder::RequirementSource const*, swift::GenericSignatureBuilder::PotentialArchetype*, swift::GenericSignatureBuilder&, llvm::function_ref<swift::ProtocolConformanceRef (swift::ProtocolDecl*)>) + 294
      8  swift                    0x0000000104f835e5 swift::GenericSignatureBuilder::PotentialArchetype::updateNestedTypeForConformance(llvm::PointerUnion<swift::AssociatedTypeDecl*, swift::TypeAliasDecl*>, swift::GenericSignatureBuilder::PotentialArchetype::NestedTypeUpdate) + 2517
      9  swift                    0x0000000104f81ec0 swift::GenericSignatureBuilder::PotentialArchetype::getNestedArchetypeAnchor(swift::Identifier, swift::GenericSignatureBuilder&) + 704
      10 swift                    0x0000000104f819fa swift::GenericSignatureBuilder::PotentialArchetype::getArchetypeAnchor(swift::GenericSignatureBuilder&) + 266
      11 swift                    0x0000000104f8aada swift::GenericSignatureBuilder::finalize(swift::SourceLoc, llvm::ArrayRef<swift::GenericTypeParamType*>, bool) + 1130
      12 swift                    0x0000000104e54ac5 swift::TypeChecker::checkGenericEnvironment(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, bool, llvm::function_ref<void (swift::GenericSignatureBuilder&)>) + 645
      13 swift                    0x0000000104e2e43a checkExtensionGenericParams(swift::TypeChecker&, swift::ExtensionDecl*, swift::Type, swift::GenericParamList*) + 170
      14 swift                    0x0000000104e2322b swift::TypeChecker::validateExtension(swift::ExtensionDecl*) + 203
      15 swift                    0x0000000104e2390c swift::TypeChecker::computeDefaultAccessibility(swift::ExtensionDecl*) + 60
      16 swift                    0x0000000104e2463b swift::TypeChecker::computeAccessibility(swift::ValueDecl*) + 923
      17 swift                    0x0000000104e24825 swift::TypeChecker::validateAccessibility(swift::ValueDecl*) + 69
      18 swift                    0x0000000104e29a45 swift::TypeChecker::validateDecl(swift::ValueDecl*) + 229
      19 swift                    0x0000000104e28de9 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 2649
      20 swift                    0x0000000104e379eb (anonymous namespace)::DeclChecker::visitProtocolDecl(swift::ProtocolDecl*) + 1131
      21 swift                    0x0000000104e28567 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 471
      22 swift                    0x0000000104e28384 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 100
      23 swift                    0x0000000104ea3274 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1524
      24 swift                    0x0000000104aa1970 swift::CompilerInstance::performSema() + 3616
      25 swift                    0x000000010400f29c swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 4380
      26 swift                    0x0000000103fcc9f0 main + 3312
      27 libdyld.dylib            0x00007fffbd639235 start + 1
      Stack dump:
      0.	Program arguments: /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/bin/swift -frontend -c -primary-file /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/out.swift -target x86_64-apple-macosx10.9 -enable-objc-interop -sdk /Applications/Xcode-8W109m.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -F /Applications/Xcode-8W109m.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/../../../Developer/Library/Frameworks -module-cache-path /var/folders/k9/nzq6k4f57xb5vw8wrgk_7cvh0000gn/T/swift-testsuite-clang-module-cacheVwD5Zd -swift-version 3 -Onone -module-name a -o /var/folders/k9/nzq6k4f57xb5vw8wrgk_7cvh0000gn/T/out-55cc6e.o 
      1.	While type-checking 'BidirectionalCollectionWrapper' at /Users/Shared/dabrahams/s/swift/test/Prototypes/AU3.swift.gyb:34:8
      2.	While type-checking '_wrap' at /Users/Shared/dabrahams/s/swift/test/Prototypes/AU3.swift.gyb:38:3
      3.	While validating '_wrap' at /Users/Shared/dabrahams/s/swift/test/Prototypes/AU3.swift.gyb:187:3
      <unknown>:0: error: unable to execute command: Abort trap: 6
      <unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)
      

      Other hashes

      clang                              f4b8df66a5 Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
      cmark                              d875488 Merge pull request #4 from llvm-beanz/generate-cmark-exports
      compiler-rt                        572336a0b Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
      llbuild                            c8a84b3 Merge pull request #130 from hughbe/mkdir-windows
      lldb                               9ca9758f9 Merge pull request #149 from bitjammer/swift-typealias-equal-sourceloc
      llvm                               e69035ecc18 Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
      ninja                              0b0374e Merge pull request #1255 from tchajed/bind-localhost
      swift                              318050c9fd5 Add a small note
      swift-corelibs-foundation          ba5134d Fix for [SR-1250] NSJSONSerialization emits non-floating-point numbers as Double (#914)
      swift-corelibs-libdispatch         d137aa4 Makes the DispatchIO initializer that accepts a path failable, reflecting the fact that a relative or non-existent path is invalid.
      swift-corelibs-xctest              50cc074 XCTestAssertNoThrow (#184)
      swift-integration-tests            8ae3586 Merge pull request #18 from apple/disable-lldb-test
      swift-xcode-playground-support     9e980f2 Temporary disable test to get the incremental bot blue again
      swiftpm                            eb8ec5da Merge pull request #1028 from aciidb0mb3r/version-fix
      
      

        Attachments

          Activity

            People

            • Assignee:
              DougGregor Doug Gregor
              Reporter:
              dabrahams Dave Abrahams
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: