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-6217] Simple executable segmentation fault with Swift 4.0 (Linux) #48769

Open
swift-ci opened this issue Oct 25, 2017 · 6 comments
Open

[SR-6217] Simple executable segmentation fault with Swift 4.0 (Linux) #48769

swift-ci opened this issue Oct 25, 2017 · 6 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-6217
Radar None
Original Reporter Neon12345 (JIRA User)
Type Bug
Environment

Linux x64_64 Debian Stretch

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

md5: 4e04a273e4b804f683381423cdada4ad

Issue Description:

I use the release version of [Swift 4.0|https://swift.org/builds/swift-4.0-release/ubuntu1610/swift-4.0-RELEASE/swift-4.0-RELEASE-ubuntu16.10.tar.gz] with Debian Stretch.

The resulting binary executable of a simple compiled print statement seems faulty.
It segfaults very early with a call to zero and the init_array section shows this:

~$ objdump -s -j .init_array Test

Test: file format elf64-x86-64

Contents of section .init_array:
404d70 60094000 00000000 00000000 00000000 `.@.............

@belkadan
Copy link
Contributor

What's the full source of the file you're compiling, and how are you invoking the compiler?

@swift-ci
Copy link
Collaborator Author

Comment by Neon (JIRA)

Test.swift:

print(123)

~$ swiftc Test.swift -o Test

~$ ./Test

@belkadan
Copy link
Contributor

Well, that certainly is suspicious! Thanks.

@belkadan
Copy link
Contributor

It is of course entirely possible that we're hitting a point of incompatibility between Debian and Ubuntu systems. Debian's not officially supported.

@swift-ci
Copy link
Collaborator Author

Comment by Neon (JIRA)

It is working again with the 4.1-dev snapshot. But with clang++ missing it just fails without an error.

@belkadan
Copy link
Contributor

Ah, that's SR-6082. The package manager will diagnose this properly now, but plain swiftc won't yet.

@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