From 8eadaf35dc42fb78dcded934fc8c215a4a54f695 Mon Sep 17 00:00:00 2001 From: DropDemBits Date: Thu, 9 Nov 2023 17:50:40 -0500 Subject: [PATCH 1/4] Add miri to CI --- .github/workflows/test.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e0fc16c7..192b2a8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,3 +63,16 @@ jobs: with: command: check args: --no-default-features + + miri: + name: "Miri" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Miri + run: | + rustup toolchain install nightly --component miri + rustup override set nightly + cargo miri setup + - name: Test with Miri + run: cargo miri test --no-fail-fast From 95d5fc2211f5c53cd561425dacc2f98ecf2eb7d4 Mon Sep 17 00:00:00 2001 From: DropDemBits Date: Thu, 9 Nov 2023 23:36:23 -0500 Subject: [PATCH 2/4] Add `-Zmiri-isolation-error=warn` miri flag `-Zmiri-disable-isolation` can't be used since `insta` eventually ends up calling `pipe2`, which currently doesn't have a shim in miri. --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 192b2a8e..ebfa83de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,6 +67,8 @@ jobs: miri: name: "Miri" runs-on: ubuntu-latest + env: + MIRIFLAGS: "-Zmiri-isolation-error=warn" steps: - uses: actions/checkout@v3 - name: Install Miri From e8fe17e638335f591ec7fea50224de110eb400b7 Mon Sep 17 00:00:00 2001 From: DropDemBits Date: Fri, 10 Nov 2023 19:37:40 -0500 Subject: [PATCH 3/4] Only execute miri on the salsa-2022 packages These don't need to disable isolation so the `-Zmiri-isolation-error` flag can be removed. --- .github/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ebfa83de..e87fb377 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,8 +67,6 @@ jobs: miri: name: "Miri" runs-on: ubuntu-latest - env: - MIRIFLAGS: "-Zmiri-isolation-error=warn" steps: - uses: actions/checkout@v3 - name: Install Miri @@ -77,4 +75,4 @@ jobs: rustup override set nightly cargo miri setup - name: Test with Miri - run: cargo miri test --no-fail-fast + run: cargo miri test --no-fail-fast -p salsa-2022 -p salsa-2022-tests -p calc -p lazy-input From 407d6bcaa7aeebc6080e1ad53d582d191d953979 Mon Sep 17 00:00:00 2001 From: DropDemBits Date: Fri, 10 Nov 2023 22:03:43 -0500 Subject: [PATCH 4/4] Bump `arc-swap` to 1.6.0 1.6.0 fixes some UB in previous versions of `arc-swap`. --- components/salsa-2022/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/salsa-2022/Cargo.toml b/components/salsa-2022/Cargo.toml index 9c4ddd3c..f179a6bd 100644 --- a/components/salsa-2022/Cargo.toml +++ b/components/salsa-2022/Cargo.toml @@ -11,7 +11,7 @@ dashmap = "5.3.4" rustc-hash = "1.1.0" indexmap = "2" hashlink = "0.8.0" -arc-swap = "1.4.0" +arc-swap = "1.6.0" crossbeam-utils = { version = "0.8", default-features = false } log = "0.4.5" parking_lot = "0.12.1"