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

Fix thread_state64 on aarch64-apple-darwin #1990

Merged
merged 2 commits into from
Dec 13, 2020

Conversation

JohnTitor
Copy link
Member

Fixes #1977

@rust-highfive
Copy link

@JohnTitor: no appropriate reviewer found, use r? to override

@JohnTitor
Copy link
Member Author

@syrusakbary Could you confirm if this patch works on your end? I cannot do by myself as not having Apple Silicon Mac.

And cc @shepmaster could you also review this as you're familiar with this target?

@JohnTitor
Copy link
Member Author

@bors r+
Let's give it a try.

@bors
Copy link
Contributor

bors commented Dec 12, 2020

📌 Commit 9906599 has been approved by JohnTitor

bors added a commit that referenced this pull request Dec 12, 2020
Fix `thread_state64` on `aarch64-apple-darwin`

Fixes #1977
@bors
Copy link
Contributor

bors commented Dec 12, 2020

⌛ Testing commit 9906599 with merge caf5a4e...

@bors
Copy link
Contributor

bors commented Dec 12, 2020

💔 Test failed - checks-actions

@JohnTitor
Copy link
Member Author

@bors r+

@bors
Copy link
Contributor

bors commented Dec 12, 2020

📌 Commit 36f9c1f has been approved by JohnTitor

bors added a commit that referenced this pull request Dec 12, 2020
Fix `thread_state64` on `aarch64-apple-darwin`

Fixes #1977
@bors
Copy link
Contributor

bors commented Dec 12, 2020

⌛ Testing commit 36f9c1f with merge 843f331...

@bors
Copy link
Contributor

bors commented Dec 12, 2020

💥 Test timed out

@JohnTitor
Copy link
Member Author

@bors retry

@bors
Copy link
Contributor

bors commented Dec 12, 2020

⌛ Testing commit 36f9c1f with merge 0ec925d...

@bors
Copy link
Contributor

bors commented Dec 13, 2020

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: JohnTitor
Pushing 0ec925d to master...

@bors bors merged commit 0ec925d into rust-lang:master Dec 13, 2020
@JohnTitor JohnTitor deleted the arm-macos-state64 branch December 13, 2020 01:13
bors added a commit that referenced this pull request Jan 5, 2021
Make test suite pass on macOS on aarch64

While working on #2007 I tried to run `cargo test` in `libc-test`, which failed, because the definition of `__darwin_mcontext64` was incomplete (see #1990). This adds definitions for the exception state and the floating point state as well.

`libc-test` still does not pass, because I use the type `[u128; 32]` for the `__v` field of `__darwin_arm_neon_state64` (in C it is `__uint128_t __v[32]`. `ctest2` does not translate `u128` to `__uint128_t` and the generated C code does not compile. Any ideas for working around this?
bors added a commit that referenced this pull request Jan 5, 2021
Make test suite pass on macOS on aarch64

While working on #2007 I tried to run `cargo test` in `libc-test`, which failed, because the definition of `__darwin_mcontext64` was incomplete (see #1990). This adds definitions for the exception state and the floating point state as well.

`libc-test` still does not pass, because I use the type `[u128; 32]` for the `__v` field of `__darwin_arm_neon_state64` (in C it is `__uint128_t __v[32]`. `ctest2` does not translate `u128` to `__uint128_t` and the generated C code does not compile. Any ideas for working around this?
Hywan added a commit to wasmerio/wasmer that referenced this pull request Mar 5, 2021
Since libc 0.2.82, the issue
rust-lang/libc#1977 has been fixed with
rust-lang/libc#1990. Our current version of
libc is 0.2.87. Let's update our code to remove the
`__darwin_arm_thread_state64` type, and use the one from libc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apple/Darwin layout for thread state doesn't match in Apple Silicon (ARM)
3 participants