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-15213] Swift interpreter encountered LLVM assertion failure with aarch64 #57535

Open
stevapple opened this issue Sep 18, 2021 · 3 comments
Open
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@stevapple
Copy link
Contributor

Previous ID SR-15213
Radar rdar://problem/83316066
Original Reporter @stevapple
Type Bug
Environment

Ubuntu 20.04 aarch64
Run on GitHub shared runner with uraimo/run-on-arch-action@v2.1.1
Tag: swift-DEVELOPMENT-SNAPSHOT-2021-09-14-a-ubuntu20.04-aarch64

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

md5: 6821ad2b64688b687a0b78530bba8994

Issue Description:

Using Ubuntu 20.04 Aarch64 development snapshots, failed to interpret a basic {code:swift}print("Hello world!")

@stevapple
Copy link
Contributor Author

Found the same problem reported with mono (.NET), seems an LLVM bug or LLVM compatibility issue.

@typesanitizer
Copy link

cc @lhames

@swift-ci create

@lhames
Copy link
Contributor

lhames commented Sep 21, 2021

This is a relocation-out-of-range assertion. It's triggered when the RuntimeDyld::MemoryManager instance allocates two sections out-of-range of one another. I wouldn't have expected this to happen on Linux if we're using the large code model, but I don't know the ELF/AArch64 combination well, so it's possible that this is expected behavior.

We could work around this by pre-allocating a slab of memory in the memory-manager, but I think the right long term solution is to move to JITLink. A backend has been started by Stefan Granitz in https://reviews.llvm.org/D108986, and can probably be completed before LLVM 14 is released. I have filed https://llvm.org/PR51924 to track this.

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

No branches or pull requests

3 participants