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

Accessing NSBlockOperation.executionBlocks crashes at run time

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Cannot Reproduce
    • Component/s: None
    • Labels:

      Description

      Running this code under Xcode 8:

      import Foundation
      let blop = BlockOperation()
      blop.executionBlocks
      

      crashes with this backtrace:

      0  swift                    0x0000000106ddaa3d PrintStackTraceSignalHandler(void*) + 45
      1  swift                    0x0000000106dda466 SignalHandler(int) + 470
      2  libsystem_platform.dylib 0x00007fffc61f2bba _sigtramp + 26
      3  libsystem_platform.dylib 0x00007f98f7500990 _sigtramp + 825286128
      4  swift                    0x0000000104ed77e6 (anonymous namespace)::X86_64ABIInfo::computeInfo(clang::CodeGen::CGFunctionInfo&) const + 38
      5  swift                    0x0000000104c70e37 clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(clang::CanQual<clang::Type>, bool, bool, llvm::ArrayRef<clang::CanQual<clang::Type> >, clang::FunctionType::ExtInfo, llvm::ArrayRef<clang::FunctionProtoType::ExtParameterInfo>, clang::CodeGen::RequiredArgs) + 2839
      6  swift                    0x00000001041bd29c swift::irgen::Signature::get(swift::irgen::IRGenModule&, swift::CanTypeWrapper<swift::SILFunctionType>) + 2524
      7  swift                    0x000000010427c66e swift::irgen::prepareObjCMethodRootCall(swift::irgen::IRGenFunction&, swift::SILDeclRef, swift::CanTypeWrapper<swift::SILFunctionType>, swift::CanTypeWrapper<swift::SILFunctionType>, llvm::ArrayRef<swift::Substitution>, swift::irgen::ObjCMessageKind) + 110
      8  swift                    0x00000001042ec86e (anonymous namespace)::IRGenSILFunction::visitFullApplySite(swift::FullApplySite) + 958
      9  swift                    0x00000001042d7b28 swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 9336
      10 swift                    0x00000001041f9231 swift::irgen::IRGenerator::emitGlobalTopLevel() + 1329
      11 swift                    0x00000001042bd34b performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, unsigned int) + 1259
      12 swift                    0x0000000104188c19 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) + 23705
      13 swift                    0x0000000104180f70 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 17856
      14 swift                    0x000000010413d93e main + 8302
      15 libdyld.dylib            0x00007fffc5fe5255 start + 1
      Stack dump:
      0.	Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file - -target x86_64-apple-macosx10.9 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -color-diagnostics -module-name main -o /var/folders/lp/hlnmlhtn79s4qvxx8c7bppbw0000gn/T/--81d07d.o 
      1.	While emitting IR SIL function @main<unknown>:0: error: unable to execute command: Segmentation fault: 11
      

      Also filed as rdar://24745102

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jtbandes Jacob Bandes-Storch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: