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

Segmentation fault: 11 when creating a Set from an array of arrays

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Duplicate
    • Component/s: Compiler
    • Environment:

      Apple Swift version 4.0 (swiftlang-900.0.63 clang-900.0.37)

      Xcode Version 9.0 (9A235)

      Description

      Creating a set from an array of arrays, like this:

      let arrayOfArrays = [["Test"]]
      let set = Set(arrayOfArrays)}}
      

       results in the following compiler crash:

      0  swift                    0x0000000112e23dba PrintStackTraceSignalHandler(void*) + 42
      1  swift                    0x0000000112e231f6 SignalHandler(int) + 662
      2  libsystem_platform.dylib 0x00007fffca7cfb3a _sigtramp + 26
      3  libsystem_platform.dylib 0x00007fff00000000 _sigtramp + 897778912
      4  swift                    0x0000000110981c15 swift::NominalTypeDecl::hasFixedLayout() const + 21
      5  swift                    0x0000000110515931 (anonymous namespace)::LowerType::visitAnyStructType(swift::CanType, swift::StructDecl*) + 49
      6  swift                    0x00000001105146c7 swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type) + 2791
      7  swift                    0x000000011004936f swift::Lowering::SILGenFunction::emitInitializationForVarDecl(swift::VarDecl*) + 1775
      8  swift                    0x000000011004b643 swift::Lowering::SILGenFunction::emitPatternBinding(swift::PatternBindingDecl*, unsigned int) + 83
      9  swift                    0x00000001100c910d swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 1885
      10 swift                    0x0000000110080389 swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 393
      11 swift                    0x000000010fff63a1 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*)::$_1::operator()(swift::SILFunction*) const + 273
      12 swift                    0x000000010fff5919 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 761
      13 swift                    0x00000001100d7467 (anonymous namespace)::SILGenType::emitType() + 1143
      14 swift                    0x000000010fffccaa swift::ASTVisitor<swift::Lowering::SILGenModule, void, void, void, void, void, void>::visit(swift::Decl*) + 74
      15 swift                    0x000000010fffbf6b swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 1115
      16 swift                    0x000000010fffd8f9 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional<unsigned int>, bool) + 841
      17 swift                    0x000000010f7962c6 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 13014
      18 swift                    0x000000010f791784 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7716
      19 swift                    0x000000010f7466a8 main + 12248
      20 libdyld.dylib            0x00007fffca5c0235 start + 1
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                slavapestov Slava Pestov
                Reporter:
                michalciuba Michał Ciuba
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: