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

mention MIRIFLAGS in unsupported operation error and --help #3677

Closed
lolbinarycat opened this issue Jun 15, 2024 · 1 comment · Fixed by #3683
Closed

mention MIRIFLAGS in unsupported operation error and --help #3677

lolbinarycat opened this issue Jun 15, 2024 · 1 comment · Fixed by #3683

Comments

@lolbinarycat
Copy link

I'm using proptest, which accesses the current directory, unsupported with miri isolation enabled.

test tests::always_has_matches ... error: unsupported operation: `getcwd` not available when isolation is enabled
   --> /home/binarycat/.rustup/toolchains/nightly-2024-05-30-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:152:17
    |
152 |             if !libc::getcwd(ptr, buf.capacity()).is_null() {
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `getcwd` not available when isolation is enabled
    |
    = help: pass the flag `-Zmiri-disable-isolation` to disable isolation;

I tried cargo miri test -Zmiri-disable-isolation, cargo miri test -- -Zmiri-disable-isolation, cargo miri -Zmiri-disable-isolation test, and RUSTFLAGS="-Zmiri-disable-isolation" cargo miri test, all to no avail.

I then checked the helptext of cargo miri and of the generated test runner, but found nothing. only after looking through the README of this repo did i find out about the existance of MIRIFLAGS.

@RalfJung
Copy link
Member

Thanks for the report! That's a good point, we should be more explicit here.

We also may want to make cargo miri test -Zmiri-disable-isolation just work, that's tracked in #2051.

@bors bors closed this as completed in 85e2549 Jun 17, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Jun 29, 2024
lnicola pushed a commit to lnicola/rust-analyzer that referenced this issue Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants