X-Git-Url: https://git.ralfj.de/web.git/blobdiff_plain/1973dfdc8077795b3352f472feb2cd787685d87b..83dd208d18211ce99f6a4d77689cfb0c355c6f0f:/personal/_posts/2022-07-02-miri.md?ds=sidebyside diff --git a/personal/_posts/2022-07-02-miri.md b/personal/_posts/2022-07-02-miri.md index 1108e0d..78f4bbb 100644 --- a/personal/_posts/2022-07-02-miri.md +++ b/personal/_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!