Skip to content

riscv64: miri test: error: unsupported operation: inline assembly is not supported #150050

@yuzibo

Description

@yuzibo

When run ./x test --stage 2 src/tools/miri/cargo-miri on riscv64, got:

  Compiling cargo-miri-test v0.1.0 (/home/jenkins/rust/src/tools/miri/test-cargo-miri)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 10.78s
     Running unittests src/main.rs (build/riscv64gc-unknown-linux-gnu/stage3-tools/riscv64gc-unknown-linux-gnu/debug/deps/cargo_miri_test-a0d35f444b5f81e1)

running 2 tests
test test::dev_dependency ... error: unsupported operation: inline assembly is not supported
  --> /home/jenkins/rust/library/core/src/../../stdarch/crates/core_arch/src/riscv_shared/mod.rs:50:9
   |
50 | /         asm!(
51 | |             ".option push",
52 | |             ".option arch, +zihintpause",
53 | |             "pause",
54 | |             ".option pop",
55 | |             options(nomem, nostack, preserves_flags)
56 | |         );
   | |_________^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: BACKTRACE on thread `test::dev_depen`:
   = note: inside `std::arch::riscv64::pause` at /home/jenkins/rust/library/core/src/../../stdarch/crates/core_arch/src/riscv_shared/mod.rs:50:9: 56:10
   = note: inside `std::hint::spin_loop` at /home/jenkins/rust/library/core/src/hint.rs:281:36: 281:65
   = note: inside `std::sync::mpmc::utils::Backoff::spin_light` at /home/jenkins/rust/library/std/src/sync/mpmc/utils.rs:116:13: 116:37
   = note: inside `std::sync::mpmc::list::Channel::<test::test::event::CompletedTest>::start_send` at /home/jenkins/rust/library/std/src/sync/mpmc/list.rs:254:21: 254:41
   = note: inside `std::sync::mpmc::list::Channel::<test::test::event::CompletedTest>::send` at /home/jenkins/rust/library/std/src/sync/mpmc/list.rs:410:17: 410:39
   = note: inside `std::sync::mpmc::Sender::<test::test::event::CompletedTest>::send` at /home/jenkins/rust/library/std/src/sync/mpmc/mod.rs:395:41: 395:61
   = note: inside `std::sync::mpsc::Sender::<test::test::event::CompletedTest>::send` at /home/jenkins/rust/library/std/src/sync/mpsc.rs:608:9: 608:27
   = note: inside `test::test::run_test_in_process` at /home/jenkins/rust/library/test/src/lib.rs:701:5: 701:29
   = note: inside closure at /home/jenkins/rust/library/test/src/lib.rs:607:43: 615:18
   = note: inside closure at /home/jenkins/rust/library/test/src/lib.rs:637:41: 637:83
   = note: inside `std::sys::backtrace::__rust_begin_short_backtrace::<{closure@test::test::run_test::{closure#1}}, ()>` at /home/jenkins/rust/library/std/src/sys/backtrace.rs:166:18: 166:21
   = note: inside closure at /home/jenkins/rust/library/std/src/thread/lifecycle.rs:91:13: 91:67
   = note: inside `<std::panic::AssertUnwindSafe<{closure@std::thread::lifecycle::spawn_unchecked<'_, {closure@test::test::run_test::{closure#1}}, ()>::{closure#1}::{closure#0}}> as std::ops::FnOnce<()>>::call_once` at /home/jenkins/rust/library/core/src/panic/unwind_safe.rs:274:9: 274:19
   = note: inside `std::panicking::catch_unwind::do_call::<std::panic::AssertUnwindSafe<{closure@std::thread::lifecycle::spawn_unchecked<'_, {closure@test::test::run_test::{closure#1}}, ()>::{closure#1}::{closure#0}}>, ()>` at /home/jenkins/rust/library/std/src/panicking.rs:581:40: 581:43
   = note: inside `std::panicking::catch_unwind::<(), std::panic::AssertUnwindSafe<{closure@std::thread::lifecycle::spawn_unchecked<'_, {closure@test::test::run_test::{closure#1}}, ()>::{closure#1}::{closure#0}}>>` at /home/jenkins/rust/library/std/src/panicking.rs:544:19: 544:88
   = note: inside `std::panic::catch_unwind::<std::panic::AssertUnwindSafe<{closure@std::thread::lifecycle::spawn_unchecked<'_, {closure@test::test::run_test::{closure#1}}, ()>::{closure#1}::{closure#0}}>, ()>` at /home/jenkins/rust/library/std/src/panic.rs:359:14: 359:40
   = note: inside closure at /home/jenkins/rust/library/std/src/thread/lifecycle.rs:89:26: 92:12
   = note: inside `<{closure@std::thread::lifecycle::spawn_unchecked<'_, {closure@test::test::run_test::{closure#1}}, ()>::{closure#1}} as std::ops::FnOnce<()>>::call_once - shim(vtable)` at /home/jenkins/rust/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `<std::boxed::Box<dyn std::ops::FnOnce() + std::marker::Send> as std::ops::FnOnce<()>>::call_once` at /home/jenkins/rust/library/alloc/src/boxed.rs:2206:9: 2206:52
   = note: inside `std::sys::thread::unix::Thread::new::thread_start` at /home/jenkins/rust/library/std/src/sys/thread/unix.rs:119:17: 119:29

error: aborting due to 1 previous error

error: test failed, to rerun pass `--bin cargo-miri-test`

Caused by:
  process didn't exit successfully: `/home/jenkins/rust/build/riscv64gc-unknown-linux-gnu/stage2/bin/cargo-miri runner /home/jenkins/rust/build/riscv64gc-unknown-linux-gnu/stage3-tools/riscv64gc-unknown-linux-gnu/debug/deps/cargo_miri_test-a0d35f444b5f81e1` (exit status: 1)
note: test exited abnormally; to see the full output pass --no-capture to the harness.
Command `/home/jenkins/rust/build/riscv64gc-unknown-linux-gnu/stage2/bin/cargo-miri miri test --target riscv64gc-unknown-linux-gnu -Zbinary-dep-depinfo -j 64 -Zroot-dir=/home/jenkins/rust --manifest-path /home/jenkins/rust/src/tools/miri/test-cargo-miri/Cargo.toml -- [workdir=/home/jenkins/rust]` failed with exit code 1
Created at: src/bootstrap/src/core/builder/mod.rs:1430:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:820:19

Command has failed. Rerun with -v to see more details.

See the build log.

Meta

rustc --version --verbose:

rustc 1.93.0-nightly

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-miriArea: The miri toolC-bugCategory: This is a bug.O-riscvTarget: RISC-V architecture

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions