Skip to content

unwind: bump unwinding dependency to 0.2.6 #140422

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

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

xobs
Copy link
Contributor

@xobs xobs commented Apr 29, 2025

Xous now fails to compile under nightly, due to the recent change where #[naked] must now be wrapped in unsafe(...). The unwinding crate was updated to account for this.

With the following bootstrap.toml:

profile = "library"
change-id = 138934

[build]
build-stage = 2
target = ["riscv32imac-unknown-xous-elf"]

[rust]
std-features = ["panic-unwind"]
download-rustc = false

The build fails when trying unwinding v0.2.5:

$ ./x.py build
[...]
   Compiling unwinding v0.2.5
error: unsafe attribute used without unsafe
   --> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unwinding-0.2.5/src/unwinder/arch/riscv32.rs:176:3
    |
176 | #[naked]
    |   ^^^^^ usage of unsafe attribute
    |
help: wrap the attribute in `unsafe(...)`
    |
176 | #[unsafe(naked)]
    |   +++++++     +

error: could not compile `unwinding` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:06:26
$

This patch updates unwinding to v0.2.6, which now wraps all issues of naked in unsafe().

With a recent change to the compiler, all instances of `#[naked]` must
now be wrapped in `#[unsafe(naked)]`. The `unwinding` crate, which is
used on Xous for doing unwinding in constrained environments, needed to
be updated to handle this change.

Bump the `unwinding` dependency to 0.2.6, which performs this wrapping.

Signed-off-by: Sean Cross <[email protected]>
@rustbot
Copy link
Collaborator

rustbot commented Apr 29, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 29, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 29, 2025

These commits modify the library/Cargo.lock file. Unintentional changes to library/Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@workingjubilee
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 29, 2025

📌 Commit a3e16c7 has been approved by workingjubilee

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 Apr 29, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Apr 29, 2025
….6, r=workingjubilee

unwind: bump `unwinding` dependency to 0.2.6

Xous now fails to compile under nightly, due to the recent change where `#[naked]` must now be wrapped in `unsafe(...)`. The `unwinding` crate was updated to account for this.

With the following `bootstrap.toml`:

```
profile = "library"
change-id = 138934

[build]
build-stage = 2
target = ["riscv32imac-unknown-xous-elf"]

[rust]
std-features = ["panic-unwind"]
download-rustc = false
```

The build fails when trying unwinding v0.2.5:
```
$ ./x.py build
[...]
   Compiling unwinding v0.2.5
error: unsafe attribute used without unsafe
   --> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unwinding-0.2.5/src/unwinder/arch/riscv32.rs:176:3
    |
176 | #[naked]
    |   ^^^^^ usage of unsafe attribute
    |
help: wrap the attribute in `unsafe(...)`
    |
176 | #[unsafe(naked)]
    |   +++++++     +

error: could not compile `unwinding` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:06:26
$
```

This patch updates `unwinding` to v0.2.6, which now wraps all issues of `naked` in `unsafe()`.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 29, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang#139883 (crashes: more tests)
 - rust-lang#140312 (Improve pretty-printing of braces)
 - rust-lang#140392 (compiletest: Remove the libtest-based executor and its dependency)
 - rust-lang#140395 (organize and extend forbidden target feature tests)
 - rust-lang#140422 (unwind: bump `unwinding` dependency to 0.2.6)
 - rust-lang#140432 (Update documentation for `fn target_config`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 29, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang#138344 (Enable `reliable_f16_math` on x86)
 - rust-lang#139909 (implement or-patterns for pattern types)
 - rust-lang#140392 (compiletest: Remove the libtest-based executor and its dependency)
 - rust-lang#140400 (PassWrapper: adapt for llvm/llvm-project@d3d856ad8469)
 - rust-lang#140422 (unwind: bump `unwinding` dependency to 0.2.6)
 - rust-lang#140432 (Update documentation for `fn target_config`)
 - rust-lang#140433 (Replace the \01__gnu_mcount_nc to LLVM intrinsic for additional ARM targets)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1d642e5 into rust-lang:master Apr 29, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 29, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 29, 2025
Rollup merge of rust-lang#140422 - betrusted-io:bump-unwinding-to-0.2.6, r=workingjubilee

unwind: bump `unwinding` dependency to 0.2.6

Xous now fails to compile under nightly, due to the recent change where `#[naked]` must now be wrapped in `unsafe(...)`. The `unwinding` crate was updated to account for this.

With the following `bootstrap.toml`:

```
profile = "library"
change-id = 138934

[build]
build-stage = 2
target = ["riscv32imac-unknown-xous-elf"]

[rust]
std-features = ["panic-unwind"]
download-rustc = false
```

The build fails when trying unwinding v0.2.5:
```
$ ./x.py build
[...]
   Compiling unwinding v0.2.5
error: unsafe attribute used without unsafe
   --> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unwinding-0.2.5/src/unwinder/arch/riscv32.rs:176:3
    |
176 | #[naked]
    |   ^^^^^ usage of unsafe attribute
    |
help: wrap the attribute in `unsafe(...)`
    |
176 | #[unsafe(naked)]
    |   +++++++     +

error: could not compile `unwinding` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:06:26
$
```

This patch updates `unwinding` to v0.2.6, which now wraps all issues of `naked` in `unsafe()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants