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-9303] Linux crash with @objc annotation #51774

Closed
keith opened this issue Nov 19, 2018 · 0 comments
Closed

[SR-9303] Linux crash with @objc annotation #51774

keith opened this issue Nov 19, 2018 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@keith
Copy link
Collaborator

keith commented Nov 19, 2018

Previous ID SR-9303
Radar None
Original Reporter @keith
Type Bug
Status Resolved
Resolution Duplicate
Environment

Linux host 4.4.0-135-generic #161~14.04.1-Ubuntu SMP Tue Aug 28 11:17:49 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Swift version 4.2.1 (swift-4.2.1-RELEASE)
Target: x86_64-unknown-linux-gnu

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

md5: cfd0ffccd7f85b7259ff392f8e6c0da2

duplicates:

Issue Description:

Compiling this code with `swiftc foo.swift`:

import Foundation

class WithObjcFunc {
  @objc
  func withObjc() {}
}

extension WithObjcFunc {
    @objc
    func funcInExtension() {}
}

On linux crashes with this:

swift: /home/buildnode/jenkins/workspace/oss-swift-4.2-package-linux-ubuntu-18_04/swift/lib/IRGen/GenClass.cpp:2201: llvm::Constant *swift::irgen::emitCategoryData(swift::irgen::IRGenModule &, swift::ExtensionDecl *): Assertion `IGM.ObjCInterop && "emitting RO-data outside of interop mode"' failed.
/usr/local/bin/swift[0x3defe74]
/usr/local/bin/swift[0x3dedc8c]
/usr/local/bin/swift[0x3df0032]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f69dd8ee890]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f69dbd51e97]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f69dbd53801]
/lib/x86_64-linux-gnu/libc.so.6(+0x3039a)[0x7f69dbd4339a]
/lib/x86_64-linux-gnu/libc.so.6(+0x30412)[0x7f69dbd43412]
/usr/local/bin/swift[0x64f0af]
/usr/local/bin/swift[0x4dd661]
/usr/local/bin/swift[0x4d4db5]
/usr/local/bin/swift[0x58f54c]
/usr/local/bin/swift[0x58fc53]
/usr/local/bin/swift[0x4b4218]
/usr/local/bin/swift[0x4afdc0]
/usr/local/bin/swift[0x46ae38]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f69dbd34b97]
/usr/local/bin/swift[0x46904a]
Stack dump:
0.      Program arguments: /usr/local/bin/swift -frontend -c -primary-file foo.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -color-diagnostics -module-name foo -o /tmp/foo-3c700d.o
1.      While emitting IR for source file foo.swift
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)
@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.
Projects
None yet
Development

No branches or pull requests

1 participant