From 93466bcaedb9f547aab2431a887e658880b071c3 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 2 Jul 2022 19:07:43 -0400 Subject: [PATCH] add link to reddit (and a tweak) --- personal/_posts/2022-07-02-miri.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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! -- 2.30.2