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-11081] Assertion `!t || !t->is<InOutType>() && "set flags instead"' failed. #53473

Closed
swift-ci opened this issue Jul 8, 2019 · 2 comments
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

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Jul 8, 2019

Previous ID SR-11081
Radar rdar://problem/52782814
Original Reporter wimlewis (JIRA User)
Type Bug
Status Resolved
Resolution Cannot Reproduce

Attachment: Download

Environment

Linux Ubuntu 18.04 x86_64

swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-29-a-ubuntu18.04

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash
Assignee wimlewis (JIRA)
Priority Medium

md5: 4b1633f72116f01430c9672f476f2521

Issue Description:

The following project crashes swift build with the following error:

swift: /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/swift/include/swift/AST/Types.h:2693: swift::AnyFunctionType::Param::Param(swift::Type, swift::Identifier, swift::ParameterTypeFlags): Assertion !t || !t->is() && "set flags instead"' failed. Stack dump: 0. Program arguments: /home/wiml/swift-lang/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-29-a-ubuntu18.04/usr/bin/swift -frontend -c -primary-file /home/wiml/src/swiftder/minimize/CompilerCrashExample/src/OtherFile.swift /home/wiml/src/swiftder/minimize/CompilerCrashExample/src/main.swift -emit-module-path /home/wiml/src/swiftder/minimize/CompilerCrashExample/.build/x86_64-unknown-linux/debug/CompilerCrashExample.build/OtherFilepartial.swiftmodule -emit-module-doc-path /home/wiml/src/swiftder/minimize/CompilerCrashExample/.build/x86_64-unknown-linux/debug/CompilerCrashExample.build/OtherFilepartial.swiftdoc -emit-dependencies-path /home/wiml/src/swiftder/minimize/CompilerCrashExample/.build/x86_64-unknown-linux/debug/CompilerCrashExample.build/OtherFile.d -emit-reference-dependencies-path /home/wiml/src/swiftder/minimize/CompilerCrashExample/.build/x86_64-unknown-linux/debug/CompilerCrashExample.build/OtherFile.swiftdeps -target x86_64-unknown-linux -disable-objc-interop -sdk / -I /home/wiml/src/swiftder/minimize/CompilerCrashExample/.build/x86_64-unknown-linux/debug -enable-testing -g -module-cache-path /home/wiml/src/swiftder/minimize/CompilerCrashExample/.build/x86_64-unknown-linux/debug/ModuleCache -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -color-diagnostics -enable-anonymous-context-mangled-names -module-name CompilerCrashExample -o /home/wiml/src/swiftder/minimize/CompilerCrashExample/.build/x86_64-unknown-linux/debug/CompilerCrashExample.build/OtherFile.swift.o -index-store-path /home/wiml/src/swiftder/minimize/CompilerCrashExample/.build/x86_64-unknown-linux/debug/index/store -index-system-modules 1. While type-checking 'baz()' (at /home/wiml/src/swiftder/minimize/CompilerCrashExample/src/OtherFile.swift:8:14) 2. While type-checking statement at [/home/wiml/src/swiftder/minimize/CompilerCrashExample/src/OtherFile.swift:8:40 - line:10:5] RangeText="{ let r: T1.T2 = .foo(Value1[self.bar()]) " 3. While type-checking declaration 0x74f7a60 (at /home/wiml/src/swiftder/minimize/CompilerCrashExample/src/OtherFile.swift:9:9) 4. While type-checking expression at [/home/wiml/src/swiftder/minimize/CompilerCrashExample/src/OtherFile.swift:9:24 - line:9:47] RangeText=".foo(Value1[self.bar()]" 5. While type-checking expression at [/home/wiml/src/swiftder/minimize/CompilerCrashExample/src/OtherFile.swift:9:28 - line:9:47] RangeText="(Value1[self.bar()]" 6. While type-checking expression at [/home/wiml/src/swiftder/minimize/CompilerCrashExample/src/OtherFile.swift:9:29 - line:9:46] RangeText="Value1[self.bar()" 7. While type-checking expression at [/home/wiml/src/swiftder/minimize/CompilerCrashExample/src/OtherFile.swift:9:29 - line:9:46] RangeText="Value1[self.bar()" #​0 0x00000000044cd6a4 PrintStackTraceSignalHandler(void*) (/home/wiml/swift-lang/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-29-a-ubuntu18.04/usr/bin/swift+0x44cd6a4) #​1 0x00000000044cb2fe llvm::sys::RunSignalHandlers() (/home/wiml/swift-lang/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-29-a-ubuntu18.04/usr/bin/swift+0x44cb2fe) #​2 0x00000000044cdab8 SignalHandler(int) (/home/wiml/swift-lang/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-29-a-ubuntu18.04/usr/bin/swift+0x44cdab8) #​3 0x00007f98d77fddd0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12dd0) #​4 0x00007f98d6c6c077 gsignal /build/glibc-B9XfQf/glibc-2.28/signal/../sysdeps/unix/sysv/linux/internal-signals.h:84:10 #​5 0x00007f98d6c4d535 abort /build/glibc-B9XfQf/glibc-2.28/stdlib/abort.c:81:7 #​6 0x00007f98d6c4d40f get_sysdep_segment_value /build/glibc-B9XfQf/glibc-2.28/intl/loadmsgcat.c:509:8 #​7 0x00007f98d6c4d40f __tls_get_addr /build/glibc-B9XfQf/glibc-2.28/intl/loadmsgcat.c:970:34 #​8 0x00007f98d6c5d142 (/lib/x86_64-linux-gnu/libc.so.6+0x32142) #​9 0x0000000000ead8a7 swift::constraints::ConstraintSystem::getTypeOfMemberReference(swift::Type, swift::ValueDecl*, swift::DeclContext*, bool, swift::FunctionRefKind, swift::constraints::ConstraintLocatorBuilder, swift::DeclRefExpr const*, llvm::DenseMap<swift::GenericTypeParamType*, swift::TypeVariableType*, llvm::DenseMapInfoswift::GenericTypeParamType*, llvm::detail::DenseMapPair<swift::GenericTypeParamType*, swift::TypeVariableType*> >) (/home/wiml/swift-lang/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-29-a-ubuntu18.04/usr/bin/swift+0xead8a7) #10 0x0000000000eae82b swift::constraints::ConstraintSystem::resolveOverload(swift::constraints::ConstraintLocator, swift::Type, swift::constraints::OverloadChoice, swift::DeclContext*) (/home/wiml/swift-lang/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-29-a-ubuntu18.04/usr/bin/swift+0xeae82b) #11 0x0000000000e33231 swift::ASTVisitor<(anonymous namespace)::ConstraintGenerator, swift::Type, void, void, void, void, void>::visit(swift::Expr*) (/home/wiml/swift-lang/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-29-a-ubuntu18.04/usr/bin/swift+0xe33231)`

@belkadan
Copy link
Contributor

belkadan commented Jul 8, 2019

Seems to work okay in a no-asserts build, but that's still something we should fix.

@swift-ci create

@xedin
Copy link
Member

xedin commented May 7, 2020

wimlewis (JIRA User) I have tried with 11.4 and couldn't reproduce crash mentioned in the description. Could you please try either with 11.4 or master nightly snapshot and close this issue if you can't reproduce?

@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
Projects
None yet
Development

No branches or pull requests

4 participants