Navigation Menu

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-11872] Compiler crash in swift::Lowering::SILGenFunction::emitRValueForNonMemberVarDecl #54286

Open
bobergj opened this issue Nov 29, 2019 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@bobergj
Copy link

bobergj commented Nov 29, 2019

Previous ID SR-11872
Radar rdar://problem/57549600
Original Reporter @bobergj
Type Bug

Attachment: Download

Environment

Apple Swift version 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9), Xcode Version 11.2.1 (11B500)

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

md5: f8e626aa933547968a11354dd45c8e17

Issue Description:

Compiling the attached segmentionfault.swift causes the compiler to crash.

$ swiftc --version
Apple Swift version 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9)
Target: x86_64-apple-darwin18.7.0

$ swiftc segmentionfault.swift
Stack dump:``0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file segmentionfault.swift -target x86_64-apple-darwin18.7.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -color-diagnostics -module-name segmentionfault -o /var/folders/0s/0f_f8b0j0zn5t5r6yv5b6lth0000gp/T/segmentionfault-9efcb6.o ``1. While emitting SIL for 'zipLongestStrings(:🙂' (at segmentionfault.swift:12:1)``2. While silgen emitFunction SIL function "@$s15segmentionfault17zipLongestStringsyySaySSG_SbAA17CharacterSequenceVXEtF".{{ for 'zipLongestStrings(*:*🙂' (at segmentionfault.swift:12:1)}}0 swift 0x00000001061a5a13 PrintStackTraceSignalHandler(void*) + 51``1 swift 0x00000001061a51e6 SignalHandler(int) + 358``2 libsystem_platform.dylib 0x00007fff6749ab5d _sigtramp + 29``3 libsystem_platform.dylib 0x00007fff0394c506 _sigtramp + 2622167494``4 swift 0x0000000102298017 swift::Lowering::SILGenFunction::emitRValueForNonMemberVarDecl(swift::SILLocation, swift::VarDecl*, swift::CanType, swift::AccessSemantics, swift::Lowering::SGFContext) + 1767``5 swift 0x000000010225dc34 swift::Lowering::SILGenFunction::emitRValueForDecl(swift::SILLocation, swift::ConcreteDeclRef, swift::Type, swift::AccessSemantics, swift::Lowering::SGFContext) + 548``6 swift 0x0000000102250c5a swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 7002``7 swift 0x000000010224fcd6 swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 3030``8 swift 0x000000010228e295 swift::Lowering::SILGenFunction::emitAssignToLValue(swift::SILLocation, swift::Lowering::ArgumentSource&&, swift::Lowering::LValue&&) + 709``9 swift 0x000000010225704d swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 32589``10 swift 0x0000000102264f6f swift::Lowering::SILGenFunction::emitIgnoredExpr(swift::Expr*) + 799``11 swift 0x00000001022c4cf3 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 3139``12 swift 0x00000001022c5d8e swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 7390``13 swift 0x00000001022c4c9b swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 3051``14 swift 0x000000010227ab5a swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 426``15 swift 0x00000001021dfd24 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 980``16 swift 0x00000001021ea806 swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*) + 1238``17 swift 0x00000001021ec266 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*) + 1238``18 swift 0x0000000101defda4 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 28340``19 swift 0x0000000101de56e4 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6820``20 swift 0x0000000101d72be3 main + 1219``21 libdyld.dylib 0x00007fff672af3d5 start + 1``22 libdyld.dylib 0x000000000000000f start + 2564099131``<unknown>:0: error: unable to execute command: Segmentation fault: 11``<unknown>:0: error: compile command failed due to signal 11 (use -v to see invocation)

@beccadax
Copy link
Contributor

beccadax commented Dec 2, 2019

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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

2 participants