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-2231] Overloading array with variadic parameters assertion failure #44838

Closed
swift-ci opened this issue Jul 31, 2016 · 0 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself SILGen Area → compiler: The SIL generation stage

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-2231
Radar None
Original Reporter zmeyc (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment

OS X, Swift Development Snapshot 2016-07-25 (a)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, SILGen
Assignee None
Priority Medium

md5: 4a9748f73f5a78e26e6779c09f690a64

duplicates:

  • SR-1076 SILGen crash on overloading functions which take varargs & arrays

Issue Description:

This works:

    func f(items: Any...) { }
    func f(items: [Any]) { }

Adding another parameter results in assertion failure:

    func f(items: Any..., s: String) { }
    func f(items: [Any], s: String) { }
Assertion failed: (fn->getLinkage() == linkage), function getOrCreateFunction, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/SIL/SILModule.cpp, line 318.
0  swift                    0x0000000103d2189b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x0000000103d20ae6 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x0000000103d21fef SignalHandler(int) + 383
3  libsystem_platform.dylib 0x00007fff8a23b52a _sigtramp + 26
4  swift                    0x0000000104917601 cmark_strbuf__initbuf + 71552
5  swift                    0x0000000103d21d3e abort + 14
6  swift                    0x0000000103d21d21 __assert_rtn + 81
7  swift                    0x00000001015f5abb swift::SILModule::getOrCreateFunction(swift::SILLocation, swift::SILDeclRef, swift::ForDefinition_t) + 2171
8  swift                    0x0000000101211a45 swift::Lowering::SILGenModule::getFunction(swift::SILDeclRef, swift::ForDefinition_t) + 261
9  swift                    0x00000001012bde96 (anonymous namespace)::SILGenVTable::addEntry(swift::SILDeclRef) + 614
10 swift                    0x00000001012bdadc swift::ASTVisitor<(anonymous namespace)::SILGenVTable, void, void, void, void, void, void>::visit(swift::Decl*) + 428
11 swift                    0x00000001012bd219 (anonymous namespace)::SILGenType::emitType() + 553
12 swift                    0x00000001012bcf6e swift::Lowering::SILGenModule::visitNominalTypeDecl(swift::NominalTypeDecl*) + 30
13 swift                    0x0000000101217e1b swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 715
14 swift                    0x0000000101218d00 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional<unsigned int>, bool, bool) + 928
15 swift                    0x0000000101219225 swift::performSILGeneration(swift::FileUnit&, swift::SILOptions&, llvm::Optional<unsigned int>, bool) + 117
16 swift                    0x0000000101088996 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) + 13782
17 swift                    0x00000001010840ef swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2895
18 swift                    0x0000000101046c20 main + 2448
19 libdyld.dylib            0x00007fff861a85ad start + 1
20 libdyld.dylib            0x0000000000000049 start + 2045082269
@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 SILGen Area → compiler: The SIL generation stage
Projects
None yet
Development

No branches or pull requests

1 participant