From: Ralf Jung Date: Sat, 2 Jul 2022 23:07:43 +0000 (-0400) Subject: add link to reddit (and a tweak) X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/103bcf4d2f710aa6cde1ebcf7a680069f851189e?hp=4b535c39d7c694100ccab8c2096fbd29e959c545 add link to reddit (and a tweak) --- diff --git a/ralf/_posts/2022-07-02-miri.md b/ralf/_posts/2022-07-02-miri.md index 1108e0d..78f4bbb 100644 --- a/ralf/_posts/2022-07-02-miri.md +++ b/ralf/_posts/2022-07-02-miri.md @@ -1,6 +1,7 @@ --- title: "The last two years in Miri" categories: rust +reddit: /rust/comments/vq3mmu/the_last_two_years_in_miri/ --- It has been [almost two years]({% post_url 2020-09-28-miri %}) since my last Miri status update. @@ -179,8 +180,9 @@ Miri is not *truly* random, but uses a pseudo-random number generator to make al This means you can explore various different possible choices by passing different *seeds* for Miri to use for its pseudo-random number generator. The following little shell snippet will run Miri with many different seeds, which is great to be able to locally reproduce a failure that you saw on CI, but that you are having trouble reproducing: ``` -for seed in $({ echo obase=16; seq 0 255; } | bc); do - MIRIFLAGS="-Zmiri-seed=$seed" cargo miri test || { echo "Failing seed: $seed"; break; }; +for SEED in $({ echo obase=16; seq 0 255; } | bc); do + echo "Trying seed: $SEED" + MIRIFLAGS=-Zmiri-seed=$SEED cargo miri test || { echo "Failing seed: $SEED"; break; }; done ``` It is important that you use exactly the same `MIRIFLAGS` as CI to ensure the failure can even happen!