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-1623] Crash on overload differing in variadic argument #44232

Closed
ddunbar opened this issue May 26, 2016 · 2 comments
Closed

[SR-1623] Crash on overload differing in variadic argument #44232

ddunbar opened this issue May 26, 2016 · 2 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 SILGen Area → compiler: The SIL generation stage

Comments

@ddunbar
Copy link
Member

ddunbar commented May 26, 2016

Previous ID SR-1623
Radar None
Original Reporter @ddunbar
Type Bug
Status Closed
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, SILGen
Assignee @ddunbar
Priority Medium

md5: 63342e5d9e1d380faf57a7b39d63e0e1

duplicates:

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

Issue Description:

swiftc TOT crashes on this test case:

func f0(a: String..., b: String?) {}
func f0(a: [String], b: String?) {}
$ TOOLCHAINS=swift-dev swiftc -module-name Utility -c z.swift
Assertion failed: (F->empty() && "already emitted function?!"), function preEmitFunction, file /Volumes/Data/ddunbar/public/swift-project/swift/lib/SILGen/SILGen.cpp, line 485.
0  swift                    0x000000011001967b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x00000001100188a6 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x0000000110019f51 SignalHandler(int) + 641
3  libsystem_platform.dylib 0x00007fff9890252a _sigtramp + 26
4  swift                    0x0000000110bc2f19 cmark_strbuf__initbuf + 69976
5  swift                    0x0000000110019b9e abort + 14
6  swift                    0x0000000110019b81 __assert_rtn + 81
7  swift                    0x000000010d40c20b void swift::Lowering::SILGenModule::preEmitFunction<swift::FuncDecl>(swift::SILDeclRef, swift::FuncDecl*, swift::SILFunction*, swift::SILLocation) + 795
8  swift                    0x000000010d410da8 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*)::$_1::operator()(swift::SILFunction*) const + 120
9  swift                    0x000000010d407815 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 629
10 swift                    0x000000010d40e306 swift::ASTVisitor<swift::Lowering::SILGenModule, void, void, void, void, void, void>::visit(swift::Decl*) + 182
11 swift                    0x000000010d40d85b swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 715
12 swift                    0x000000010d40e740 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional<unsigned int>, bool, bool) + 928
13 swift                    0x000000010d40ec65 swift::performSILGeneration(swift::FileUnit&, swift::SILOptions&, llvm::Optional<unsigned int>, bool) + 117
14 swift                    0x000000010d27f275 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) + 14181
15 swift                    0x000000010d27a836 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2870
16 swift                    0x000000010d23d3c0 main + 2416
17 libdyld.dylib            0x00007fff879305ad start + 1
Stack dump:
0.  Program arguments: /Volumes/Data/ddunbar/public/swift-project/build/Ninja-ReleaseAssert/swift-dev.xctoolchain/usr/bin/swift -frontend -c -primary-file z.swift -target x86_64-apple-macosx10.9 -enable-objc-interop -sdk /Volumes/Data/Xcode/Whitney8A131/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -module-name Utility -o z.o 
1.  While emitting SIL for 'f0' at z.swift:2:1
Illegal instruction: 4
@belkadan
Copy link
Contributor

@jckarter, we have a dup for this, yes?

@jckarter
Copy link
Member

Yeah, SR-1076.

@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 SILGen Area → compiler: The SIL generation stage
Projects
None yet
Development

No branches or pull requests

4 participants