diff --git a/.github/workflows/fuzzer-tester-prepare/action.yml b/.github/workflows/fuzzer-tester-prepare/action.yml index 35fa81fb79..f5acdf7cdd 100644 --- a/.github/workflows/fuzzer-tester-prepare/action.yml +++ b/.github/workflows/fuzzer-tester-prepare/action.yml @@ -30,7 +30,7 @@ runs: shell: bash run: sudo apt purge -y llvm* clang* - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v1 + uses: KyleMayes/install-llvm-action@v2 with: directory: ${{ runner.temp }}/llvm version: 17 diff --git a/.github/workflows/qemu-fuzzer-tester-prepare/action.yml b/.github/workflows/qemu-fuzzer-tester-prepare/action.yml index 949acbfaea..23a1af3a2a 100644 --- a/.github/workflows/qemu-fuzzer-tester-prepare/action.yml +++ b/.github/workflows/qemu-fuzzer-tester-prepare/action.yml @@ -27,7 +27,7 @@ runs: shell: bash run: sudo apt purge -y llvm* clang* - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v1 + uses: KyleMayes/install-llvm-action@v2 with: directory: ${{ runner.temp }}/llvm version: 17 diff --git a/.github/workflows/ubuntu-prepare/action.yml b/.github/workflows/ubuntu-prepare/action.yml index 999c50d4c4..9883b892f1 100644 --- a/.github/workflows/ubuntu-prepare/action.yml +++ b/.github/workflows/ubuntu-prepare/action.yml @@ -21,7 +21,7 @@ runs: shell: bash run: rustup toolchain install nightly --allow-downgrade - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v1 + uses: KyleMayes/install-llvm-action@v2 with: directory: ${{ runner.temp }}/llvm version: 17 \ No newline at end of file diff --git a/.github/workflows/windows-tester-prepare/action.yml b/.github/workflows/windows-tester-prepare/action.yml index 3ea5ec482e..79e2f3c02c 100644 --- a/.github/workflows/windows-tester-prepare/action.yml +++ b/.github/workflows/windows-tester-prepare/action.yml @@ -9,9 +9,6 @@ runs: toolchain: stable - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 - - name: Windows Build - shell: pwsh - run: cargo build --verbose - name: Build docs shell: pwsh run: cargo doc diff --git a/libafl/Cargo.toml b/libafl/Cargo.toml index 18b737bc89..10d734a420 100644 --- a/libafl/Cargo.toml +++ b/libafl/Cargo.toml @@ -131,7 +131,7 @@ llmp_debug = ["std", "libafl_bolts/llmp_debug"] llmp_small_maps = ["libafl_bolts/llmp_small_maps"] # reduces initial map size for llmp ## Grammar mutator. Requires nightly. -nautilus = ["std", "serde_json/std", "pyo3", "rand_trait", "regex-syntax"] +nautilus = ["std", "serde_json/std", "pyo3", "rand_trait", "regex-syntax", "regex"] [build-dependencies] rustversion = "1.0" diff --git a/libafl/src/common/nautilus/grammartec/rule.rs b/libafl/src/common/nautilus/grammartec/rule.rs index 62349db166..74baf72cc5 100644 --- a/libafl/src/common/nautilus/grammartec/rule.rs +++ b/libafl/src/common/nautilus/grammartec/rule.rs @@ -4,7 +4,6 @@ use std::sync::OnceLock; use libafl_bolts::rands::Rand; use pyo3::prelude::{PyObject, Python}; -use regex; use regex_syntax::hir::Hir; use serde::{Deserialize, Serialize}; diff --git a/libafl/src/feedbacks/transferred.rs b/libafl/src/feedbacks/transferred.rs index fbae4950f9..16530751ad 100644 --- a/libafl/src/feedbacks/transferred.rs +++ b/libafl/src/feedbacks/transferred.rs @@ -37,7 +37,7 @@ impl TransferringMetadata { /// Simple feedback which may be used to test whether the testcase was transferred from another node /// in a multi-node fuzzing arrangement. -#[derive(Copy, Clone, Debug)] +#[derive(Copy, Clone, Debug, Default)] pub struct TransferredFeedback { #[cfg(feature = "track_hit_feedbacks")] // The previous run's result of `Self::is_interesting` diff --git a/libafl/src/mutators/nautilus.rs b/libafl/src/mutators/nautilus.rs index ea3086b3e2..aa633f7f2d 100644 --- a/libafl/src/mutators/nautilus.rs +++ b/libafl/src/mutators/nautilus.rs @@ -18,8 +18,7 @@ use crate::{ generators::nautilus::NautilusContext, inputs::nautilus::NautilusInput, mutators::{MutationResult, Mutator}, - prelude::HasRand, - state::HasCorpus, + state::{HasCorpus, HasRand}, Error, HasMetadata, }; diff --git a/libafl_bolts/src/shmem.rs b/libafl_bolts/src/shmem.rs index 907f2b43ec..24f0d79e0c 100644 --- a/libafl_bolts/src/shmem.rs +++ b/libafl_bolts/src/shmem.rs @@ -386,7 +386,7 @@ impl Deref for NopShMem { /// that can use internal mutability. /// Useful if the `ShMemProvider` needs to keep local state. #[cfg(feature = "alloc")] -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Default)] pub struct RcShMem { internal: ManuallyDrop, provider: Rc>, diff --git a/libafl_qemu/src/qemu/mod.rs b/libafl_qemu/src/qemu/mod.rs index 1a088bec15..7e338aad57 100644 --- a/libafl_qemu/src/qemu/mod.rs +++ b/libafl_qemu/src/qemu/mod.rs @@ -1125,7 +1125,7 @@ impl EmulatorMemoryChunk { let new_addr = self.addr + range.start; let slice_size = range.clone().count(); - if new_addr + (slice_size as GuestUsize) >= self.addr + self.size { + if new_addr + (slice_size as GuestUsize) >= self.addr + self.size.into() { return None; } diff --git a/scripts/parallellize_cargo_check.py b/scripts/parallellize_cargo_check.py index a29bcd2b04..c70473e97c 100755 --- a/scripts/parallellize_cargo_check.py +++ b/scripts/parallellize_cargo_check.py @@ -14,8 +14,6 @@ instance_idx = int(sys.argv[1]) # Set llvm config os.environ["LLVM_CONFIG"] = "llvm-config" -# DOCS_RS is needed for libafl_frida to build without auto-download -os.environ["DOCS_RS"] = "1" command = ( "DOCS_RS=1 cargo hack check --workspace --each-feature --clean-per-run " @@ -34,4 +32,9 @@ for task in output[ instance_idx * 2 * task_per_core : (instance_idx + 1) * 2 * task_per_core ]: print("Running ", task) - cargo_check = subprocess.check_output(task, shell=True, text=True) + print(os.environ) + if "libafl_frida" in task: + # DOCS_RS is needed for libafl_frida to build without auto-download feature + cargo_check = subprocess.check_output(task, shell=True, text=True, env=dict(os.environ, DOCS_RS="1")) + else: + cargo_check = subprocess.check_output(task, shell=True, text=True) \ No newline at end of file