Skip to content

Conversation

@RalfJung
Copy link
Member

r? @ghost

The Miri Cronjob Bot and others added 30 commits February 3, 2025 04:55
Use fcntl locking on Solaris instead of flock which is missing there.
Throw ub error when invoking non-vararg shim with vararg import
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 24, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 24, 2025

The Miri subtree was changed

cc @rust-lang/miri

@RalfJung
Copy link
Member Author

@bors r+ p=1

@bors
Copy link
Collaborator

bors commented Feb 24, 2025

📌 Commit f461981 has been approved by RalfJung

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 Feb 24, 2025
@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_sc.rs ... ok

FAILED TEST: tests/pass/float.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-88YqqW" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/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/0/tests/pass" "tests/pass/float.rs" "--edition" "2021" "--target" "i686-pc-windows-msvc"
error: test got exit status: 101, but expected 0
 = note: the compiler panicked

error: actual output differed from expected
error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/float.stderr` to the actual output
--- tests/pass/float.stderr
+++ <stderr output>
+
+thread 'main' panicked at tests/pass/float.rs:LL:CC:
+expected non-determinism, got 16 times the same result: 1.1752012
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect

FAILURES:
    tests/pass/float.rs

---

Location:
   /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ui_test-0.28.0/src/lib.rs:369

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-639ed7ffbc73eec4 --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-639ed7ffbc73eec4 --quiet` (exit status: 1)
Command has failed. Rerun with -v to see more details.
  local time: Mon Feb 24 08:39:27 UTC 2025
  network time: Mon, 24 Feb 2025 08:39:27 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@RalfJung
Copy link
Member Author

RalfJung commented Feb 24, 2025 via email

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 24, 2025
@RalfJung
Copy link
Member Author

Wtf, what is special about sinh on i686-pc-windows-msvc that it doesn't get the randomness...?

Looks like something is indeed special about this:

cfg_if::cfg_if! {
if #[cfg(not(all(target_os = "windows", target_env = "msvc", target_arch = "x86")))] {
pub fn acosf(n: f32) -> f32;
pub fn asinf(n: f32) -> f32;
pub fn atan2f(a: f32, b: f32) -> f32;
pub fn atanf(n: f32) -> f32;
pub fn coshf(n: f32) -> f32;
pub fn sinhf(n: f32) -> f32;
pub fn tanf(n: f32) -> f32;
pub fn tanhf(n: f32) -> f32;
}}

Cc @tgross35 @ChrisDenton

@RalfJung
Copy link
Member Author

Ah

// On 32-bit x86 MSVC these functions aren't defined, so we just define shims
// which promote everything to f64, perform the calculation, and then demote
// back to f32. While not precisely correct should be "correct enough" for now.

The problem is that this makes the result "too precise" -- we add 16 ULP of error on the f64 version, but that disappears when rounding to f32 and then the resulting behavior is fully deterministic in Miri...

@RalfJung
Copy link
Member Author

I'll make a new sync that includes rust-lang/miri#4205.

@RalfJung RalfJung closed this Feb 24, 2025
@RalfJung RalfJung deleted the miri-sync branch February 24, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.