Skip to content

Fix unwinding on 32-bit watchOS ARM (v2) #124748

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 5, 2024

Conversation

madsmtm
Copy link
Contributor

@madsmtm madsmtm commented May 5, 2024

This PR is identical to #124494, which was approved and merged but then removed from master by a force-push due to a CI bug.

r? Mark-Simulacrum

Original PR description:


Found while doing #124491, I wanted to unify the code under target_vendor = "apple", and found that Clang actually specifies that watchOS ARM 32-bit does not use SjLj.

I don't have an Apple Watch from that generation at hand to test this myself (series 1 to 3), and I don't think it will be sufficient to test it in the simulator (as it's architecture-specific), so maybe someone else could do so?

N.B. The code is written in a way to support 32-bit iOS and tvOS ARM devices (which do use SjLj) for future compatibility even though we currently only have a target for 32-bit iOS ARM (if you think that's excessive, then I'll change it).

@rustbot label O-watchos

The code is written in a way to support 32-bit iOS and tvOS ARM devices,
for future compatibility even though we currently only have a target for
32-bit iOS ARM.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 5, 2024
@rustbot rustbot added the O-watchos Operating System: watchOS label May 5, 2024
@dtolnay
Copy link
Member

dtolnay commented May 5, 2024

@bors r=Mark-Simulacrum

@bors
Copy link
Collaborator

bors commented May 5, 2024

📌 Commit fa22863 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 5, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request May 5, 2024
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#124148 (rustdoc-search: search for references)
 - rust-lang#124668 (Fix bootstrap panic when build from tarball)
 - rust-lang#124736 (compiler: upgrade time from 0.3.34 to 0.3.36)
 - rust-lang#124748 (Fix unwinding on 32-bit watchOS ARM (v2))
 - rust-lang#124749 (Stabilize exclusive_range_pattern (v2))
 - rust-lang#124750 (Document That `f16` And `f128` Hardware Support is Limited (v2))

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3b8eba9 into rust-lang:master May 5, 2024
6 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 5, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 5, 2024
Rollup merge of rust-lang#124748 - madsmtm:fix-32bit-watchos-unwind, r=Mark-Simulacrum

Fix unwinding on 32-bit watchOS ARM (v2)

This PR is identical to rust-lang#124494, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F).

r? Mark-Simulacrum

Original PR description:

---

Found while doing rust-lang#124491, I wanted to unify the code under `target_vendor = "apple"`, and found that [Clang actually specifies that watchOS ARM 32-bit does not use SjLj](https://github.com/llvm/llvm-project/blob/llvmorg-18.1.4/clang/lib/Driver/ToolChains/Darwin.cpp#L3107-L3119).

I don't have an Apple Watch from that generation at hand to test this myself (series 1 to 3), and I don't think it will be sufficient to test it in the simulator (as it's architecture-specific), so maybe someone else could do so?

N.B. The code is written in a way to support 32-bit iOS and tvOS ARM devices (which do use SjLj) for future compatibility even though we currently only have a target for 32-bit iOS ARM (if you think that's excessive, then I'll change it).

`@rustbot` label O-watchos
@madsmtm madsmtm deleted the fix-32bit-watchos-unwind branch May 5, 2024 17:10
madsmtm added a commit to madsmtm/rust that referenced this pull request Sep 7, 2024
In rust-lang#124748, I mistakenly conflated
"not SjLj" to mean "ARM EHABI", which isn't true, watchOS armv7k
(specifically only that architecture) uses a third unwinding method
called "DWARF CFI".
madsmtm added a commit to madsmtm/rust that referenced this pull request Sep 7, 2024
In rust-lang#124748, I mistakenly conflated
"not SjLj" to mean "ARM EHABI", which isn't true, watchOS armv7k
(specifically only that architecture) uses a third unwinding method
called "DWARF CFI".
madsmtm added a commit to madsmtm/rust that referenced this pull request Sep 8, 2024
In rust-lang#124748, I mistakenly conflated
"not SjLj" to mean "ARM EHABI", which isn't true, watchOS armv7k
(specifically only that architecture) uses a third unwinding method
called "DWARF CFI".
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 11, 2024
…ingjubilee

Fix linking error when compiling for 32-bit watchOS

In rust-lang#124494 (or rust-lang#124748), I mistakenly conflated "not SjLj" to mean "ARM EHABI", which isn't true, 32-bit watchOS uses a third unwinding method called "DWARF CFI".

So this PR is effectively a revert of rust-lang#124494, with a few more comments explaining what's going on.

Fixes rust-lang#130071.

r? Mark-Simulacrum (since you reviewed the original)
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 11, 2024
…ingjubilee

Fix linking error when compiling for 32-bit watchOS

In rust-lang#124494 (or rust-lang#124748), I mistakenly conflated "not SjLj" to mean "ARM EHABI", which isn't true, 32-bit watchOS uses a third unwinding method called "DWARF CFI".

So this PR is effectively a revert of rust-lang#124494, with a few more comments explaining what's going on.

Fixes rust-lang#130071.

r? Mark-Simulacrum (since you reviewed the original)
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 11, 2024
…ingjubilee

Fix linking error when compiling for 32-bit watchOS

In rust-lang#124494 (or rust-lang#124748), I mistakenly conflated "not SjLj" to mean "ARM EHABI", which isn't true, 32-bit watchOS uses a third unwinding method called "DWARF CFI".

So this PR is effectively a revert of rust-lang#124494, with a few more comments explaining what's going on.

Fixes rust-lang#130071.

r? Mark-Simulacrum (since you reviewed the original)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 12, 2024
Rollup merge of rust-lang#130077 - madsmtm:watchos-arm-unwind, r=workingjubilee

Fix linking error when compiling for 32-bit watchOS

In rust-lang#124494 (or rust-lang#124748), I mistakenly conflated "not SjLj" to mean "ARM EHABI", which isn't true, 32-bit watchOS uses a third unwinding method called "DWARF CFI".

So this PR is effectively a revert of rust-lang#124494, with a few more comments explaining what's going on.

Fixes rust-lang#130071.

r? Mark-Simulacrum (since you reviewed the original)
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Sep 12, 2024
Fix linking error when compiling for 32-bit watchOS

In rust-lang/rust#124494 (or rust-lang/rust#124748), I mistakenly conflated "not SjLj" to mean "ARM EHABI", which isn't true, 32-bit watchOS uses a third unwinding method called "DWARF CFI".

So this PR is effectively a revert of rust-lang/rust#124494, with a few more comments explaining what's going on.

Fixes rust-lang/rust#130071.

r? Mark-Simulacrum (since you reviewed the original)
shrirambalaji pushed a commit to shrirambalaji/rust that referenced this pull request Oct 6, 2024
In rust-lang#124748, I mistakenly conflated
"not SjLj" to mean "ARM EHABI", which isn't true, watchOS armv7k
(specifically only that architecture) uses a third unwinding method
called "DWARF CFI".
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
O-watchos Operating System: watchOS S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants