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-2576] "No discriminator found for decl" error #45181

Closed
NachoSoto opened this issue Sep 8, 2016 · 8 comments
Closed

[SR-2576] "No discriminator found for decl" error #45181

NachoSoto opened this issue Sep 8, 2016 · 8 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software serialization Area → compiler: Serialization & deserialization

Comments

@NachoSoto
Copy link
Contributor

Previous ID SR-2576
Radar None
Original Reporter @NachoSoto
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Xcode: 8 GM (8A218a)
Swift: swift-DEVELOPMENT-SNAPSHOT-2016-09-06-a

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, Serialization
Assignee @belkadan
Priority Medium

md5: 5427b17440ffeff657806840216ad6c8

Issue Description:

Trying to see if SR-1951 still reproduces in the latest snapshot (since it's still broken in the GM), I reproduced this error when compiling ReactiveCocoa (see screenshot).

Steps to reproduce:

  • Clone ReactiveCocoa's master branch.

  • Build ReactiveCocoa-iOS with the mentioned snapshot.

@belkadan
Copy link
Contributor

belkadan commented Sep 8, 2016

Just to confirm, is this the master branch?

@NachoSoto
Copy link
Contributor Author

Of ReactiveCocoa? Yes, I'll update the description.

@NachoSoto
Copy link
Contributor Author

Any update on this?

@swift-ci
Copy link
Collaborator

Comment by Justin Kolb (JIRA)

I'm getting this also using swift-3.0.2-RELEASE-ubuntu16.04 when running swift build on https://github.com/jkolb/FieryCrucible

Since this a smaller project (only has one file) it may help to isolate the issue.

Compile Swift Module 'FieryCrucible' (1 sources)
swift: /home/buildnode/disk2/workspace/oss-swift-3.0-package-linux-ubuntu-16_04/swift/lib/Serialization/ModuleFile.cpp:1679: swift::Identifier swift::ModuleFile::getDiscriminatorForPrivateValue(const swift::ValueDecl *): Assertion `!discriminator.empty() && "no discriminator found for decl"' failed.
0 swift 0x00000000035c3c08 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 swift 0x00000000035c4367
2 libpthread.so.0 0x00007fc0dea3e390
3 libc.so.6 0x00007fc0dd16c428 gsignal + 56
4 libc.so.6 0x00007fc0dd16e02a abort + 362
5 libc.so.6 0x00007fc0dd164bd7
6 libc.so.6 0x00007fc0dd164c82
7 swift 0x0000000000d939ef swift::ModuleFile::getDiscriminatorForPrivateValue(swift::ValueDecl const*) + 159
8 swift 0x0000000000ddc1ca swift::SerializedASTFile::getDiscriminatorForPrivateValue(swift::ValueDecl const*) const + 10
9 swift 0x0000000000da27dc swift::serialization::Serializer::writeDecl(swift::Decl const*) + 476
10 swift 0x0000000000dad19e swift::serialization::Serializer::writeAllDeclsAndTypes() + 9422
11 swift 0x0000000000dae634 swift::serialization::Serializer::writeAST(llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>) + 3108
12 swift 0x0000000000db11df swift::serialization::Serializer::writeToStream(llvm::raw_ostream&, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::SILModule const*, swift::SerializationOptions const&) + 127
13 swift 0x0000000000dd815d
14 swift 0x0000000000db322d
15 swift 0x0000000000db2f89 swift::serialize(llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::SerializationOptions const&, swift::SILModule const*) + 153
16 swift 0x00000000007ea647
17 swift 0x00000000007e5b41 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2737
18 swift 0x00000000007ab263 main + 2787
19 libc.so.6 0x00007fc0dd157830 __libc_start_main + 240
20 swift 0x00000000007a8909 _start + 41
Stack dump:
0. Program arguments: /opt/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/swift -frontend -emit-module /home/jkolb/src/FieryCrucible/.build/debug/FieryCrucible.build/DependencyFactory~partial.swiftmodule -parse-as-library -target x86_64-unknown-linux-gnu -disable-objc-interop -I /home/jkolb/src/FieryCrucible/.build/debug -enable-testing -g -module-cache-path /home/jkolb/src/FieryCrucible/.build/debug/ModuleCache -D SWIFT_PACKAGE -emit-module-doc-path /home/jkolb/src/FieryCrucible/.build/debug/FieryCrucible.swiftdoc -module-name FieryCrucible -o /home/jkolb/src/FieryCrucible/.build/debug/FieryCrucible.swiftmodule
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: merge-module command failed due to signal (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /opt/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/swift-build-tool -f /home/jkolb/src/FieryCrucible/.build/debug.yaml

@belkadan
Copy link
Contributor

belkadan commented Jan 3, 2017

Someone else found the same backtrace last week for

fileprivate protocol SomeProto {
  associatedtype Item
}

which is a nice reduction if it's the same issue. :-)

@belkadan
Copy link
Contributor

belkadan commented Jan 3, 2017

Yes, all three projects had private protocols at the time of the failure. Whew! Sorry for taking so long to get to this one, Nacho.

@belkadan
Copy link
Contributor

belkadan commented Jan 3, 2017

#6537

@belkadan
Copy link
Contributor

belkadan commented Jan 4, 2017

Merged in 02c665f.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 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 crash Bug: A crash, i.e., an abnormal termination of software serialization Area → compiler: Serialization & deserialization
Projects
None yet
Development

No branches or pull requests

4 participants