Skip to content
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

[SR-2615] Compiler crash when trying to test SwiftPM with code coverage in recent toolchains #45220

Closed
ankitspd opened this issue Sep 12, 2016 · 3 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@ankitspd
Copy link
Member

Previous ID SR-2615
Radar None
Original Reporter @aciidb0mb3r
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @vedantk
Priority Medium

md5: 6a8e793f984af8071eaf670c8f280b90

Issue 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 
@ddunbar
Copy link
Member

ddunbar commented Sep 12, 2016

/cc @vedantk

@vedantk
Copy link
Member

vedantk commented Sep 13, 2016

This should be fixed by #4730 I kicked off a toolchain build a few hours ago so that I could verify the fix on your entire project, but the build is still going... I'll hold onto this bug until I can verify that the full build completes.

@vedantk
Copy link
Member

vedantk commented Sep 23, 2016

Fixed with PR #4730.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

3 participants