Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/cron-daily-fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@ on:
- cron: '00 06 * * *'

jobs:
Prepare:
runs-on: ubuntu-24.04
outputs:
nightly_version: ${{ steps.read_toolchain.outputs.nightly_version }}
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Read nightly version"
id: read_toolchain
run: echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT

fuzz:
if: ${{ !github.event.act }}
runs-on: ubuntu-20.04
needs: Prepare
runs-on: ubuntu-25.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -47,9 +59,15 @@ roundtrip_semantic,
fuzz/target
target
key: cache-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}

- name: Install toolchain
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: '1.65.0'
toolchain: ${{ needs.Prepare.outputs.nightly_version }}

- name: Install Dependencies
run: cargo update && cargo update -p cc --precise 1.0.83 && cargo install --force cargo-fuzz

- name: fuzz
run: cd fuzz && ./fuzz.sh "${{ matrix.fuzz_target }}"
- run: echo "${{ matrix.fuzz_target }}" >executed_${{ matrix.fuzz_target }}
Expand All @@ -63,7 +81,7 @@ roundtrip_semantic,
needs: fuzz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R
Expand Down
59 changes: 17 additions & 42 deletions Cargo-minimal.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ dependencies = [
"memchr",
]

[[package]]
name = "arbitrary"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"

[[package]]
name = "arrayvec"
version = "0.7.4"
Expand Down Expand Up @@ -110,7 +116,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
name = "descriptor-fuzz"
version = "0.0.1"
dependencies = [
"honggfuzz",
"libfuzzer-sys",
"miniscript 12.3.0",
"miniscript 13.0.0",
"regex",
Expand Down Expand Up @@ -148,43 +154,27 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd"

[[package]]
name = "honggfuzz"
version = "0.5.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c76b6234c13c9ea73946d1379d33186151148e0da231506b964b44f3d023505"
dependencies = [
"lazy_static",
"memmap2",
"rustc_version",
]

[[package]]
name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"

[[package]]
name = "libc"
version = "0.2.154"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346"

[[package]]
name = "memchr"
version = "2.5.0"
name = "libfuzzer-sys"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
checksum = "86c975d637bc2a2f99440932b731491fc34c7f785d239e38af3addd3c2fd0e46"
dependencies = [
"arbitrary",
"cc",
]

[[package]]
name = "memmap2"
version = "0.9.4"
name = "memchr"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322"
dependencies = [
"libc",
]
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"

[[package]]
name = "miniscript"
Expand Down Expand Up @@ -279,15 +269,6 @@ version = "0.6.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"

[[package]]
name = "rustc_version"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
"semver",
]

[[package]]
name = "secp256k1"
version = "0.29.0"
Expand All @@ -309,12 +290,6 @@ dependencies = [
"cc",
]

[[package]]
name = "semver"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca"

[[package]]
name = "serde"
version = "1.0.199"
Expand Down
79 changes: 35 additions & 44 deletions Cargo-recent.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ dependencies = [
"memchr",
]

[[package]]
name = "arbitrary"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"

[[package]]
name = "arrayvec"
version = "0.7.4"
Expand Down Expand Up @@ -96,9 +102,13 @@ dependencies = [

[[package]]
name = "cc"
version = "1.0.28"
version = "1.2.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749"
checksum = "5252b3d2648e5eedbc1a6f501e3c795e07025c1e93bbf8bbdd6eef7f447a6d54"
dependencies = [
"find-msvc-tools",
"shlex",
]

[[package]]
name = "cfg-if"
Expand All @@ -110,12 +120,18 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
name = "descriptor-fuzz"
version = "0.0.1"
dependencies = [
"honggfuzz",
"libfuzzer-sys",
"miniscript 12.3.0",
"miniscript 13.0.0",
"regex",
]

[[package]]
name = "find-msvc-tools"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d"

[[package]]
name = "getrandom"
version = "0.2.14"
Expand Down Expand Up @@ -148,43 +164,27 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd"

[[package]]
name = "honggfuzz"
version = "0.5.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c76b6234c13c9ea73946d1379d33186151148e0da231506b964b44f3d023505"
dependencies = [
"lazy_static",
"memmap2",
"rustc_version",
]

[[package]]
name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"

[[package]]
name = "libc"
version = "0.2.154"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346"

[[package]]
name = "memchr"
version = "2.5.0"
name = "libfuzzer-sys"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
checksum = "8a9dc6556604b8ad76486563d5a47fad989b643932fa006e76e23d948bef0f5b"
dependencies = [
"arbitrary",
"cc",
]

[[package]]
name = "memmap2"
version = "0.9.4"
name = "memchr"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322"
dependencies = [
"libc",
]
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"

[[package]]
name = "miniscript"
Expand Down Expand Up @@ -279,15 +279,6 @@ version = "0.6.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"

[[package]]
name = "rustc_version"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
"semver",
]

[[package]]
name = "secp256k1"
version = "0.29.0"
Expand All @@ -309,12 +300,6 @@ dependencies = [
"cc",
]

[[package]]
name = "semver"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca"

[[package]]
name = "serde"
version = "1.0.199"
Expand Down Expand Up @@ -344,6 +329,12 @@ dependencies = [
"serde",
]

[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"

[[package]]
name = "syn"
version = "2.0.56"
Expand Down
5 changes: 4 additions & 1 deletion fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ publish = false
cargo-fuzz = true

[dependencies]
honggfuzz = { version = "0.5.56", default-features = false }
libfuzzer-sys = "0.4"
# We shouldn't need an explicit version on the next line, but Andrew's tools
# choke on it otherwise. See https://github.com/nix-community/crate2nix/issues/373
miniscript = { path = "..", features = [ "compiler" ], version = "13.0" }
old_miniscript = { package = "miniscript", features = [ "compiler" ], version = "12.3" }

regex = "1.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }

[[bin]]
name = "compile_descriptor"
path = "fuzz_targets/compile_descriptor.rs"
Expand Down
Loading
Loading