Skip to content

Conversation

@CraftSpider
Copy link
Contributor

This also improves how HANDLEs are, well, handled a bit. STDIN/ERR/OUT are now proper pseudo-handles. The invalid handle is added and encode/decodes to exactly 0xFFFFFFFF correctly.

Unix shims require changes to hoist FdTable up, so that Windows can share most of its implementation.

This also improves how HANDLEs are, well, handled a bit. STDIN/ERR/OUT are now proper pseudo-handles. The invalid handle is added and encode/decodes to exactly 0xFFFFFFFF correctly.

Unix shims require changes to hoist FdTable up, so that Windows can share most of its implementation.
@rustbot
Copy link
Collaborator

rustbot commented Nov 20, 2024

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
Copy link
Collaborator

rustbot commented Nov 20, 2024

The Miri subtree was changed

cc @rust-lang/miri

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 20, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
tests/pass/float_nan.rs ... ok
tests/pass/0weak_memory_consistency.rs ... ok

FAILED TEST: tests/pass/shims/fs.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-DxZPkZ" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/ci-rustc-sysroot/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/miri_ui/tests/pass/shims" "tests/pass/shims/fs.rs" "-Zmiri-disable-isolation" "--edition" "2021"
error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: actual output differed from expected
error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/shims/fs.stderr` to the actual output
--- tests/pass/shims/fs.stderr
+++ <stderr output>
+error: unsupported operation: Not a unix file descriptor: file
+  --> RUSTLIB/std/src/sys/pal/PLATFORM/fd.rs:LL:CC
+   |
+LL |               cvt(pread64(
+LL | |                 self.as_raw_fd(),
+LL | |                 buf.as_mut_ptr() as *mut libc::c_void,
+LL | |                 buf.as_mut_ptr() as *mut libc::c_void,
+LL | |                 cmp::min(buf.len(), READ_LIMIT),
+LL | |                 offset as off64_t,
+   | |_____________^ Not a unix file descriptor: file
+   |
+   = 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:
+   = note: BACKTRACE:
+   = note: inside `std::sys::pal::PLATFORM::fd::FileDesc::read_at` at RUSTLIB/std/src/sys/pal/PLATFORM/fd.rs:LL:CC
+   = note: inside `std::sys::pal::PLATFORM::fs::File::read_at` at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC
+   = note: inside `<std::fs::File as std::os::unix::fs::FileExt>::read_at` at RUSTLIB/std/src/os/unix/fs.rs:LL:CC
+   = note: inside `<std::fs::File as std::os::unix::fs::FileExt>::read_exact_at` at RUSTLIB/std/src/os/unix/fs.rs:LL:CC
+note: inside `test_pread_pwrite`
+   |
+   |
+LL |     f.read_exact_at(&mut buf1, 2).unwrap();
+note: inside `main`
+  --> tests/pass/shims/fs.rs:LL:CC
+   |
+LL |         test_pread_pwrite();
---

Location:
   /cargo/registry/src/index.crates.io-6f17d22bba15001f/ui_test-0.26.5/src/lib.rs:357

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
error: test failed, to rerun pass `--test ui`
Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/ui-de50b20aa7a9761c --quiet` (exit status: 1)
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/ui-de50b20aa7a9761c --quiet` (exit status: 1)
Command has failed. Rerun with -v to see more details.
  local time: Wed Nov 20 05:45:33 UTC 2024
  network time: Wed, 20 Nov 2024 05:45:33 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@RalfJung
Copy link
Member

RalfJung commented Nov 20, 2024

Thanks for the PR! However, Miri PRs should generally be made in the Miri repo at https://github.com/rust-lang/miri/.

@oli-obk oli-obk closed this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants