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

Compiler crash when trying to test SwiftPM with code coverage in recent toolchains

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: Compiler
    • Labels:
      None

      Description

      Reproducible in September 11, 2016 toolchain (and few before that, works fine in Xcode GM default toolchain)

      steps:
      $ git clone git@github.com:apple/swift-package-manager.git
      $ cd swift-package-manager
      $ Utilities/bootstrap --generate-xcodeproj
      $ open SwiftPM.xcodeproj

      • Select OSS toolchain
      • Edit SwiftPM scheme in Xcode and enable "Gather coverage data"
      • Cmd + U
      Assertion failed: (Node && "Assigning counter expression to non-existent AST node"), function assignCounter, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/SILGen/SILGenProfiling.cpp, line 311.
      0  swift                    0x0000000110116a7b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
      1  swift                    0x0000000110115cc6 llvm::sys::RunSignalHandlers() + 70
      2  swift                    0x00000001101171cf SignalHandler(int) + 383
      3  libsystem_platform.dylib 0x00007fff8522f52a _sigtramp + 26
      4  swift                    0x0000000110c22631 cmark_strbuf__initbuf + 73296
      5  swift                    0x0000000110116f1e abort + 14
      6  swift                    0x0000000110116f01 __assert_rtn + 81
      7  swift                    0x000000010d590910 (anonymous namespace)::CoverageMapping::~CoverageMapping() + 0
      8  swift                    0x000000010dca8e4d (anonymous namespace)::Traversal::doIt(swift::Decl*) + 141
      9  swift                    0x000000010dca8dab swift::Decl::walk(swift::ASTWalker&) + 27
      10 swift                    0x000000010d58d1f1 walkForProfiling(swift::Decl*, swift::ASTWalker&) + 177
      11 swift                    0x000000010d58cb02 swift::Lowering::SILGenProfiling::assignRegionCounters(swift::Decl*) + 802
      12 swift                    0x000000010d59a178 (anonymous namespace)::SILGenType::emitType() + 712
      13 swift                    0x000000010d599e2e swift::Lowering::SILGenModule::visitNominalTypeDecl(swift::NominalTypeDecl*) + 30
      14 swift                    0x000000010d4f2f8b swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 715
      15 swift                    0x000000010d4f3e85 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional<unsigned int>, bool, bool) + 949
      16 swift                    0x000000010d4f43a5 swift::performSILGeneration(swift::FileUnit&, swift::SILOptions&, llvm::Optional<unsigned int>, bool) + 117
      17 swift                    0x000000010d35edb6 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 8406
      18 swift                    0x000000010d31c230 main + 2544
      19 libdyld.dylib            0x00007fff9900f5ad start + 1
      Stack dump:
      0.	Program arguments: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-09-11-a.xctoolchain/usr/bin/swift -frontend -c /Users/ankit/workspace/opensource/swift.org/swiftpm/Sources/PackageDescription/JSON.swift -primary-file /Users/ankit/workspace/opensource/swift.org/swiftpm/Sources/PackageDescription/Package.swift /Users/ankit/workspace/opensource/swift.org/swiftpm/Sources/PackageDescription/Product.swift /Users/ankit/workspace/opensource/swift.org/swiftpm/Sources/PackageDescription/Target.swift /Users/ankit/workspace/opensource/swift.org/swiftpm/Sources/PackageDescription/Version+StringLiteralConvertible.swift /Users/ankit/workspace/opensource/swift.org/swiftpm/Sources/PackageDescription/Version.swift -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Applications/Whitney/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I /Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Products/Debug -F /Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Products/Debug -F /Applications/Whitney/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/ankit/Library/Developer/Xcode/DerivedData/ModuleCache -profile-generate -profile-coverage-mapping -D SWIFT_PACKAGE -D Xcode -serialize-debugging-options -Xcc -I/Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Intermediates/SwiftPM.build/Debug/PackageDescription.build/swift-overrides.hmap -Xcc -I/Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Products/Debug/include -Xcc -I/Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Intermediates/SwiftPM.build/Debug/PackageDescription.build/DerivedSources/x86_64 -Xcc -I/Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Intermediates/SwiftPM.build/Debug/PackageDescription.build/DerivedSources -Xcc -working-directory/Users/ankit/workspace/opensource/swift.org/swiftpm -emit-module-doc-path /Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Intermediates/SwiftPM.build/Debug/PackageDescription.build/Objects-normal/x86_64/Package~partial.swiftdoc -Onone -module-name PackageDescription -emit-module-path /Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Intermediates/SwiftPM.build/Debug/PackageDescription.build/Objects-normal/x86_64/Package~partial.swiftmodule -serialize-diagnostics-path /Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Intermediates/SwiftPM.build/Debug/PackageDescription.build/Objects-normal/x86_64/Package.dia -emit-dependencies-path /Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Intermediates/SwiftPM.build/Debug/PackageDescription.build/Objects-normal/x86_64/Package.d -emit-reference-dependencies-path /Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Intermediates/SwiftPM.build/Debug/PackageDescription.build/Objects-normal/x86_64/Package.swiftdeps -o /Users/ankit/Library/Developer/Xcode/DerivedData/SwiftPM-aqlkdszhfpqhkwaeeaiobraxqpym/Build/Intermediates/CodeCoverage/Intermediates/SwiftPM.build/Debug/PackageDescription.build/Objects-normal/x86_64/Package.o 
      

        Attachments

          Activity

            People

            Assignee:
            vedantk Vedant Kumar
            Reporter:
            aciid Ankit Aggarwal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: