Remove nightly from CI. (#3232)
* stable ci
* fixer
* aa
* no -z flag
* doc
* ??
* this one needs
* nightly for some of them ..
* turn off fail fast for now 🥱
* aaa
* afasdfasfas
* mm
* tmate
* linker's fault
* fixer
* f
* dfsafdasfasf
This commit is contained in:
parent
8c0ee046cd
commit
7a9f46b9fb
39
.github/workflows/build_and_test.yml
vendored
39
.github/workflows/build_and_test.yml
vendored
@ -39,8 +39,6 @@ jobs:
|
||||
# => https://github.com/Michael-F-Bryan/mdbook-linkcheck/pull/82#issuecomment-2241058491
|
||||
git: https://github.com/Michael-F-Bryan/mdbook-linkcheck.git
|
||||
rev: 8c783c5d754d83bcd50c28fb4174854b04ece990
|
||||
- name: default nightly
|
||||
run: rustup default nightly
|
||||
- uses: actions/checkout@v4
|
||||
- if: runner.os == 'Linux'
|
||||
uses: ./.github/workflows/ubuntu-prepare
|
||||
@ -88,7 +86,7 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
# ---- doc check ----
|
||||
- name: Build Docs
|
||||
run: RUSTFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps
|
||||
run: cargo doc --all-features --no-deps
|
||||
|
||||
ubuntu-doc-test:
|
||||
runs-on: ubuntu-24.04
|
||||
@ -98,20 +96,20 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
# ---- doc check ----
|
||||
- name: Test Docs
|
||||
run: RUSTFLAGS="--cfg docsrs" cargo +nightly test --doc --all-features
|
||||
run: cargo test --doc --all-features
|
||||
|
||||
ubuntu-miri:
|
||||
runs-on: ubuntu-24.04
|
||||
if: contains( github.event.pull_request.labels.*.name, 'pre-release')
|
||||
steps:
|
||||
- name: Add nightly clippy
|
||||
run: rustup toolchain install nightly --component miri --allow-downgrade
|
||||
- name: Add miri
|
||||
run: rustup toolchain install --component miri --allow-downgrade
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/workflows/ubuntu-prepare
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
# --- miri undefined behavior test --
|
||||
- name: Run miri tests
|
||||
run: RUST_BACKTRACE=1 MIRIFLAGS="-Zmiri-disable-isolation" cargo +nightly miri test
|
||||
run: RUST_BACKTRACE=1 MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test
|
||||
|
||||
ubuntu:
|
||||
runs-on: ubuntu-24.04
|
||||
@ -142,8 +140,6 @@ jobs:
|
||||
steps:
|
||||
- name: Remove Dotnet & Haskell
|
||||
run: rm -rf /usr/share/dotnet && rm -rf /opt/ghc
|
||||
- name: Add nightly clippy
|
||||
run: rustup toolchain install nightly --component clippy --allow-downgrade && rustup default nightly
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/workflows/ubuntu-prepare
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
@ -153,7 +149,7 @@ jobs:
|
||||
# --- test embedding the libafl_libfuzzer_runtime library
|
||||
# Fix me plz
|
||||
# - name: Test Build libafl_libfuzzer with embed
|
||||
# run: cargo +nightly test --features=embed-runtime --manifest-path libafl_libfuzzer/Cargo.toml
|
||||
# run: cargo test --features=embed-runtime --manifest-path libafl_libfuzzer/Cargo.toml
|
||||
|
||||
ubuntu-check:
|
||||
runs-on: ubuntu-24.04
|
||||
@ -209,9 +205,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/workflows/ubuntu-prepare
|
||||
- name: Add rustfmt nightly
|
||||
shell: bash
|
||||
run: rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with: { shared-key: "ubuntu" }
|
||||
- name: Installing black
|
||||
@ -250,6 +243,7 @@ jobs:
|
||||
needs:
|
||||
- fuzzers-preflight
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-24.04 ]
|
||||
fuzzer:
|
||||
@ -431,14 +425,11 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/workflows/ubuntu-prepare
|
||||
- name: Add rustfmt nightly
|
||||
shell: bash
|
||||
run: rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
|
||||
- name: Install deps
|
||||
run: sudo apt-get update && sudo apt-get install -y g++-powerpc-linux-gnu gcc-powerpc-linux-gnu gdb-multiarch
|
||||
- name: Add rust targets
|
||||
shell: bash
|
||||
run: rustup target add --toolchain nightly-x86_64-unknown-linux-gnu powerpc-unknown-linux-gnu
|
||||
run: rustup target add --toolchain stable-x86_64-unknown-linux-gnu powerpc-unknown-linux-gnu
|
||||
- name: Build and run utils (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
@ -457,6 +448,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
RUN_ON_CI=1 \
|
||||
RUSTC_BOOTSTRAP=1 \
|
||||
LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} \
|
||||
just \
|
||||
-f ./libafl_qemu/librasan/Justfile \
|
||||
@ -476,6 +468,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
RUN_ON_CI=1 \
|
||||
RUSTC_BOOTSTRAP=1 \
|
||||
LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} \
|
||||
just \
|
||||
-f ./libafl_qemu/librasan/Justfile \
|
||||
@ -515,9 +508,9 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Build aarch64-unknown-none
|
||||
run: cd ./fuzzers/fuzz_anything/baby_no_std && cargo +nightly build -Zbuild-std=core,alloc --target aarch64-unknown-none -v --release && cd ../..
|
||||
run: cd ./fuzzers/fuzz_anything/baby_no_std && cargo build -Zbuild-std=core,alloc --target aarch64-unknown-none -v --release && cd ../..
|
||||
- name: run x86_64 until panic!
|
||||
run: cd ./fuzzers/fuzz_anything/baby_no_std && cargo +nightly run || test $? -ne 0 || exit 1
|
||||
run: cd ./fuzzers/fuzz_anything/baby_no_std && cargo run || test $? -ne 0 || exit 1
|
||||
- name: no_std tests
|
||||
run: cd ./libafl && cargo test --no-default-features
|
||||
|
||||
@ -534,7 +527,7 @@ jobs:
|
||||
- name: libafl armv6m-none-eabi (32 bit no_std) clippy
|
||||
run: cd ./libafl && cargo clippy --target thumbv6m-none-eabi --no-default-features
|
||||
- name: Build no_std no_alloc bolts
|
||||
run: cd ./libafl_bolts && cargo +nightly build -Zbuild-std=core --target aarch64-unknown-none --no-default-features -v --release && cd ../
|
||||
run: cd ./libafl_bolts && cargo build -Zbuild-std=core --target aarch64-unknown-none --no-default-features -v --release && cd ../
|
||||
|
||||
format-toml:
|
||||
runs-on: ubuntu-24.04
|
||||
@ -621,8 +614,8 @@ jobs:
|
||||
runs-on: macOS-latest
|
||||
steps:
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Add nightly clippy
|
||||
run: rustup toolchain install nightly --component clippy --allow-downgrade && rustup default nightly
|
||||
with:
|
||||
components: clippy
|
||||
- name: Install deps
|
||||
run: brew install z3 gtk+3 python llvm@${{env.MAIN_LLVM_VERSION}}
|
||||
- name: Install cxxbridge
|
||||
@ -634,7 +627,7 @@ jobs:
|
||||
- name: Increase map sizes
|
||||
run: ./scripts/shmem_limits_macos.sh
|
||||
- name: Clippy
|
||||
run: cargo +nightly clippy --tests --all --exclude libafl_nyx --exclude symcc_runtime --exclude runtime_test
|
||||
run: cargo clippy --tests --all --exclude libafl_nyx --exclude symcc_runtime --exclude runtime_test
|
||||
|
||||
android:
|
||||
runs-on: ubuntu-24.04
|
||||
|
@ -15,10 +15,14 @@ runs:
|
||||
- name: enable mult-thread for `make`
|
||||
shell: bash
|
||||
run: export MAKEFLAGS="-j$(expr $(nproc) \+ 1)"
|
||||
- name: Add nightly toolchain
|
||||
if: ${{ inputs.fuzzer-name == './fuzzers/inprocess/fuzzbench_ctx' || inputs.fuzzer-name == './fuzzers/fuzz_anything/baby_no_std' || inputs.fuzzer-name == './fuzzers/baby/tutorial'}}
|
||||
shell: bash
|
||||
run: rustup toolchain install nightly-x86_64-unknown-linux-gnu; rustup component add clippy rustfmt --toolchain nightly-x86_64-unknown-linux-gnu; rustup default nightly
|
||||
- name: Add no_std toolchain
|
||||
if: ${{ inputs.fuzzer-name == './fuzzers/fuzz_anything/baby_no_std' }}
|
||||
shell: bash
|
||||
run: rustup toolchain install nightly-x86_64-unknown-linux-gnu ; rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||
run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||
- name: Add nyx deps
|
||||
if: ${{ inputs.fuzzer-name == './fuzzers/full_system/nyx_launcher' || inputs.fuzzer-name == './fuzzers/full_system/nyx_libxml2_standalone' || inputs.fuzzer-name == './fuzzers/full_system/nyx_libxml2_parallel' }}
|
||||
shell: bash
|
||||
|
@ -43,7 +43,7 @@ runs:
|
||||
qemu-user \
|
||||
software-properties-common \
|
||||
wget
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: install just
|
||||
uses: extractions/setup-just@v2
|
||||
with:
|
||||
|
16
.github/workflows/ubuntu-prepare/action.yml
vendored
16
.github/workflows/ubuntu-prepare/action.yml
vendored
@ -12,24 +12,14 @@ runs:
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y curl lsb-release wget software-properties-common gnupg shellcheck pax-utils libsqlite3-dev libpixman-1-dev libc6-dev gcc g++ build-essential libglib2.0-dev
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy, rustfmt
|
||||
- name: install just
|
||||
uses: extractions/setup-just@v2
|
||||
with:
|
||||
just-version: '1.40.0'
|
||||
- name: Add stable clippy
|
||||
shell: bash
|
||||
run: rustup toolchain install stable --component clippy --allow-downgrade
|
||||
- name: Add nightly clippy
|
||||
shell: bash
|
||||
run: rustup toolchain install nightly --component clippy --allow-downgrade
|
||||
- uses: taiki-e/install-action@cargo-hack
|
||||
- name: Add nightly
|
||||
shell: bash
|
||||
run: rustup toolchain install nightly --allow-downgrade
|
||||
- name: Default to nightly
|
||||
shell: bash
|
||||
run: rustup default nightly
|
||||
- name: Install LLVM
|
||||
shell: bash
|
||||
run: |
|
||||
|
@ -3,7 +3,7 @@ description: Sets up the Rust environment for the CI workflow
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: llvm-tools, clippy, rustfmt
|
||||
- uses: actions/checkout@v4
|
||||
|
368
fuzzers/inprocess/libfuzzer_stb_image/Cargo.lock
generated
368
fuzzers/inprocess/libfuzzer_stb_image/Cargo.lock
generated
@ -124,21 +124,6 @@ version = "1.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540"
|
||||
|
||||
[[package]]
|
||||
name = "cassowary"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
|
||||
|
||||
[[package]]
|
||||
name = "castaway"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5"
|
||||
dependencies = [
|
||||
"rustversion",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.17"
|
||||
@ -188,20 +173,6 @@ version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15"
|
||||
|
||||
[[package]]
|
||||
name = "compact_str"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32"
|
||||
dependencies = [
|
||||
"castaway",
|
||||
"cfg-if",
|
||||
"itoa",
|
||||
"rustversion",
|
||||
"ryu",
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "const_format"
|
||||
version = "0.2.34"
|
||||
@ -228,31 +199,6 @@ version = "0.2.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2459fc9262a1aa204eb4b5764ad4f189caec88aea9634389c0a25f8be7f6265e"
|
||||
|
||||
[[package]]
|
||||
name = "crossterm"
|
||||
version = "0.28.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"crossterm_winapi",
|
||||
"mio",
|
||||
"parking_lot",
|
||||
"rustix",
|
||||
"signal-hook",
|
||||
"signal-hook-mio",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossterm_winapi"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ctor"
|
||||
version = "0.4.1"
|
||||
@ -269,41 +215,6 @@ version = "0.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f211af61d8efdd104f96e57adf5e426ba1bc3ed7a4ead616e15e5881fd79c4d"
|
||||
|
||||
[[package]]
|
||||
name = "darling"
|
||||
version = "0.20.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
|
||||
dependencies = [
|
||||
"darling_core",
|
||||
"darling_macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling_core"
|
||||
version = "0.20.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
|
||||
dependencies = [
|
||||
"fnv",
|
||||
"ident_case",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling_macro"
|
||||
version = "0.20.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
|
||||
dependencies = [
|
||||
"darling_core",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtor"
|
||||
version = "0.0.5"
|
||||
@ -337,12 +248,6 @@ version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
||||
|
||||
[[package]]
|
||||
name = "erased-serde"
|
||||
version = "0.4.6"
|
||||
@ -353,16 +258,6 @@ dependencies = [
|
||||
"typeid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.3.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastbloom"
|
||||
version = "0.9.0"
|
||||
@ -371,21 +266,9 @@ checksum = "27cea6e7f512d43b098939ff4d5a5d6fe3db07971e1d05176fe26c642d33f5b8"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
"siphasher",
|
||||
"wide",
|
||||
"wide 0.7.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fnv"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
||||
|
||||
[[package]]
|
||||
name = "foldhash"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
||||
|
||||
[[package]]
|
||||
name = "fs2"
|
||||
version = "0.4.3"
|
||||
@ -405,7 +288,7 @@ dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"r-efi",
|
||||
"wasi 0.14.2+wasi-0.2.4",
|
||||
"wasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -431,23 +314,6 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.15.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
|
||||
dependencies = [
|
||||
"allocator-api2",
|
||||
"equivalent",
|
||||
"foldhash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
||||
|
||||
[[package]]
|
||||
name = "hostname"
|
||||
version = "0.4.0"
|
||||
@ -459,31 +325,6 @@ dependencies = [
|
||||
"windows 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ident_case"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
||||
|
||||
[[package]]
|
||||
name = "indoc"
|
||||
version = "2.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
|
||||
|
||||
[[package]]
|
||||
name = "instability"
|
||||
version = "0.3.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bf9fed6d91cfb734e7476a06bde8300a1b94e217e1b523b6f0cd1a01998c71d"
|
||||
dependencies = [
|
||||
"darling",
|
||||
"indoc",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.13.0"
|
||||
@ -519,10 +360,9 @@ dependencies = [
|
||||
"bitbybit",
|
||||
"const_format",
|
||||
"const_panic",
|
||||
"crossterm",
|
||||
"fastbloom",
|
||||
"fs2",
|
||||
"hashbrown 0.14.5",
|
||||
"hashbrown",
|
||||
"libafl_bolts",
|
||||
"libafl_derive",
|
||||
"libc",
|
||||
@ -532,7 +372,6 @@ dependencies = [
|
||||
"nix",
|
||||
"num-traits",
|
||||
"postcard",
|
||||
"ratatui",
|
||||
"regex",
|
||||
"rustversion",
|
||||
"serde",
|
||||
@ -554,12 +393,12 @@ dependencies = [
|
||||
"backtrace",
|
||||
"ctor",
|
||||
"erased-serde",
|
||||
"hashbrown 0.14.5",
|
||||
"hashbrown",
|
||||
"hostname",
|
||||
"libafl_derive",
|
||||
"libc",
|
||||
"log",
|
||||
"mach",
|
||||
"mach2",
|
||||
"miniz_oxide",
|
||||
"nix",
|
||||
"num_enum",
|
||||
@ -574,6 +413,7 @@ dependencies = [
|
||||
"typeid",
|
||||
"uds",
|
||||
"uuid",
|
||||
"wide 0.7.32 (git+https://github.com/Lokathor/wide?rev=71b5df0b2620da753836fafce5f99076181a49fe)",
|
||||
"winapi",
|
||||
"windows 0.59.0",
|
||||
"windows-result",
|
||||
@ -595,11 +435,12 @@ version = "0.15.2"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"cc",
|
||||
"hashbrown 0.14.5",
|
||||
"hashbrown",
|
||||
"libafl",
|
||||
"libafl_bolts",
|
||||
"libc",
|
||||
"log",
|
||||
"nix",
|
||||
"once_cell",
|
||||
"rangemap",
|
||||
"rustversion",
|
||||
@ -650,12 +491,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.4.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.4.12"
|
||||
@ -673,19 +508,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
||||
|
||||
[[package]]
|
||||
name = "lru"
|
||||
version = "0.12.5"
|
||||
name = "mach2"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
|
||||
dependencies = [
|
||||
"hashbrown 0.15.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mach"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
|
||||
checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
@ -739,18 +565,6 @@ dependencies = [
|
||||
"adler2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"log",
|
||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.29.0"
|
||||
@ -841,12 +655,6 @@ dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "paste"
|
||||
version = "1.0.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
|
||||
|
||||
[[package]]
|
||||
name = "postcard"
|
||||
version = "1.1.1"
|
||||
@ -905,27 +713,6 @@ version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684"
|
||||
|
||||
[[package]]
|
||||
name = "ratatui"
|
||||
version = "0.29.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cassowary",
|
||||
"compact_str",
|
||||
"crossterm",
|
||||
"indoc",
|
||||
"instability",
|
||||
"itertools",
|
||||
"lru",
|
||||
"paste",
|
||||
"strum",
|
||||
"unicode-segmentation",
|
||||
"unicode-truncate",
|
||||
"unicode-width 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.5.10"
|
||||
@ -976,19 +763,6 @@ version = "2.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.38.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.20"
|
||||
@ -1093,36 +867,6 @@ version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook"
|
||||
version = "0.3.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"signal-hook-registry",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook-mio"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"mio",
|
||||
"signal-hook",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook-registry"
|
||||
version = "1.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "siphasher"
|
||||
version = "1.0.1"
|
||||
@ -1141,34 +885,6 @@ version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
||||
|
||||
[[package]]
|
||||
name = "strum"
|
||||
version = "0.26.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
|
||||
dependencies = [
|
||||
"strum_macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strum_macros"
|
||||
version = "0.26.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"rustversion",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.100"
|
||||
@ -1227,35 +943,6 @@ version = "1.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-truncate"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf"
|
||||
dependencies = [
|
||||
"itertools",
|
||||
"unicode-segmentation",
|
||||
"unicode-width 0.1.14",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.6"
|
||||
@ -1287,12 +974,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.11.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.14.2+wasi-0.2.4"
|
||||
@ -1312,6 +993,15 @@ dependencies = [
|
||||
"safe_arch",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wide"
|
||||
version = "0.7.32"
|
||||
source = "git+https://github.com/Lokathor/wide?rev=71b5df0b2620da753836fafce5f99076181a49fe#71b5df0b2620da753836fafce5f99076181a49fe"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"safe_arch",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.9"
|
||||
@ -1422,24 +1112,6 @@ dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.59.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.52.6"
|
||||
|
@ -6,7 +6,6 @@ authors = [
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
@ -22,13 +21,17 @@ debug = true
|
||||
libafl = { path = "../../../libafl" }
|
||||
libafl_bolts = { path = "../../../libafl_bolts" }
|
||||
libafl_targets = { path = "../../../libafl_targets", features = [
|
||||
"sancov_pcguard_edges",
|
||||
"sancov_pcguard_hitcounts",
|
||||
"sancov_cmplog",
|
||||
"libfuzzer",
|
||||
"libfuzzer_no_link_main",
|
||||
] }
|
||||
log = { version = "0.4.22", features = ["release_max_level_info"] }
|
||||
mimalloc = { version = "0.1.43", default-features = false }
|
||||
libafl_cc = { path = "../../../libafl_cc" }
|
||||
|
||||
[build-dependencies]
|
||||
cc = { version = "1.1.21", features = ["parallel"] }
|
||||
|
||||
[lib]
|
||||
name = "libfuzzer_stb_image"
|
||||
crate-type = ["staticlib"]
|
||||
|
@ -1,7 +1,7 @@
|
||||
FUZZER_NAME := 'libfuzzer_stb_image'
|
||||
PROJECT_DIR := absolute_path(".")
|
||||
CARGO_TARGET_DIR := env("CARGO_TARGET_DIR", "target")
|
||||
PROFILE := env("PROFILE", "release")
|
||||
PROFILE := env("PROFILE", "dev")
|
||||
PROFILE_DIR := if PROFILE == "release" { "release" } else if PROFILE == "dev" { "debug" } else { "debug" }
|
||||
|
||||
EXTENSION := if os() == "windows" {".exe"} else { "" }
|
||||
@ -18,7 +18,7 @@ cxx:
|
||||
fuzzer: cxx
|
||||
#!/bin/bash
|
||||
cargo build --profile {{PROFILE}}
|
||||
cp {{FUZZER}} .
|
||||
{{LIBAFL_CC}} -o ./{{FUZZER_NAME}} harness.cc
|
||||
|
||||
[linux]
|
||||
[macos]
|
||||
@ -50,4 +50,4 @@ test: fuzzer
|
||||
clean:
|
||||
#!/bin/bash
|
||||
rm -f {{FUZZER_NAME}}
|
||||
cargo clean
|
||||
cargo clean
|
||||
|
@ -1,27 +0,0 @@
|
||||
// build.rs
|
||||
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let out_dir = env::var_os("OUT_DIR").unwrap();
|
||||
let out_dir = out_dir.to_string_lossy().to_string();
|
||||
|
||||
println!("cargo:rerun-if-changed=harness.c");
|
||||
|
||||
// Enforce clang for its -fsanitize-coverage support.
|
||||
std::env::set_var("CC", "clang");
|
||||
std::env::set_var("CXX", "clang++");
|
||||
|
||||
cc::Build::new()
|
||||
// Use sanitizer coverage to track the edges in the PUT
|
||||
.flag("-fsanitize-coverage=trace-pc-guard,trace-cmp")
|
||||
// Take advantage of LTO (needs lld-link set in your cargo config)
|
||||
//.flag("-flto=thin")
|
||||
.flag("-Wno-sign-compare")
|
||||
.file("./harness.c")
|
||||
.compile("harness");
|
||||
|
||||
println!("cargo:rustc-link-search=native={}", &out_dir);
|
||||
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "stb_image.h"
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
int x, y, channels;
|
||||
|
||||
if (!stbi_info_from_memory(data, size, &x, &y, &channels)) { return 0; }
|
36
fuzzers/inprocess/libfuzzer_stb_image/src/bin/libafl_cc.rs
Normal file
36
fuzzers/inprocess/libfuzzer_stb_image/src/bin/libafl_cc.rs
Normal file
@ -0,0 +1,36 @@
|
||||
use std::env;
|
||||
|
||||
use libafl_cc::{ClangWrapper, CompilerWrapper, ToolWrapper};
|
||||
|
||||
pub fn main() {
|
||||
let args: Vec<String> = env::args().collect();
|
||||
if args.len() > 1 {
|
||||
let mut dir = env::current_exe().unwrap();
|
||||
let wrapper_name = dir.file_name().unwrap().to_str().unwrap();
|
||||
|
||||
let is_cpp = match wrapper_name[wrapper_name.len()-2..].to_lowercase().as_str() {
|
||||
"cc" => false,
|
||||
"++" | "pp" | "xx" => true,
|
||||
_ => panic!("Could not figure out if c or c++ wrapper was called. Expected {dir:?} to end with c or cxx"),
|
||||
};
|
||||
|
||||
dir.pop();
|
||||
|
||||
let mut cc = ClangWrapper::new();
|
||||
if let Some(code) = cc
|
||||
.cpp(is_cpp)
|
||||
// silence the compiler wrapper output, needed for some configure scripts.
|
||||
.silence(true)
|
||||
.parse_args(&args)
|
||||
.expect("Failed to parse the command line")
|
||||
.link_staticlib(&dir, "libfuzzer_stb_image")
|
||||
.add_arg("-fsanitize-coverage=trace-pc-guard")
|
||||
.run()
|
||||
.expect("Failed to run the wrapped compiler")
|
||||
{
|
||||
std::process::exit(code);
|
||||
}
|
||||
} else {
|
||||
panic!("LibAFL CC: No Arguments given");
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
pub mod libafl_cc;
|
||||
|
||||
fn main() {
|
||||
libafl_cc::main();
|
||||
}
|
@ -30,7 +30,9 @@ use libafl_targets::{
|
||||
libfuzzer_initialize, libfuzzer_test_one_input, std_edges_map_observer, CmpLogObserver,
|
||||
};
|
||||
|
||||
pub fn main() {
|
||||
#[cfg(not(test))]
|
||||
#[no_mangle]
|
||||
pub extern "C" fn libafl_main() {
|
||||
// Registry the metadata types used in this fuzzer
|
||||
// Needed only on no_std
|
||||
// unsafe { RegistryBuilder::register::<Tokens>(); }
|
@ -6,7 +6,6 @@ authors = [
|
||||
"Dominik Maier <domenukk@gmail.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
categories = [
|
||||
"development-tools::testing",
|
||||
"emulators",
|
||||
@ -36,6 +35,11 @@ libafl_targets = { path = "../../../libafl_targets", features = [
|
||||
libafl_sugar = { path = "../../../libafl_sugar" }
|
||||
log = { version = "0.4.22", features = ["release_max_level_info"] }
|
||||
mimalloc = { version = "0.1.43", default-features = false }
|
||||
libafl_cc = { path = "../../../libafl_cc" }
|
||||
|
||||
[build-dependencies]
|
||||
cc = { version = "1.1.21", features = ["parallel"] }
|
||||
|
||||
[lib]
|
||||
name = "libfuzzer_stb_image_sugar"
|
||||
crate-type = ["staticlib"]
|
||||
|
@ -18,7 +18,7 @@ cxx:
|
||||
fuzzer: cxx
|
||||
#!/bin/bash
|
||||
cargo build --profile {{PROFILE}}
|
||||
cp {{FUZZER}} .
|
||||
{{LIBAFL_CC}} -o ./{{FUZZER_NAME}} harness.c -lglib-2.0 -lgio-2.0 -lgmodule-2.0
|
||||
|
||||
[linux]
|
||||
[macos]
|
||||
|
@ -1,27 +0,0 @@
|
||||
// build.rs
|
||||
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let out_dir = env::var_os("OUT_DIR").unwrap();
|
||||
let out_dir = out_dir.to_string_lossy().to_string();
|
||||
|
||||
println!("cargo:rerun-if-changed=harness.c");
|
||||
|
||||
// Enforce clang for its -fsanitize-coverage support.
|
||||
std::env::set_var("CC", "clang");
|
||||
std::env::set_var("CXX", "clang++");
|
||||
|
||||
cc::Build::new()
|
||||
// Use sanitizer coverage to track the edges in the PUT
|
||||
.flag("-fsanitize-coverage=trace-pc-guard,trace-cmp")
|
||||
// Take advantage of LTO (needs lld-link set in your cargo config)
|
||||
//.flag("-flto=thin")
|
||||
.flag("-Wno-sign-compare")
|
||||
.file("./harness.c")
|
||||
.compile("harness");
|
||||
|
||||
println!("cargo:rustc-link-search=native={}", &out_dir);
|
||||
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
use std::env;
|
||||
|
||||
use libafl_cc::{ClangWrapper, CompilerWrapper, ToolWrapper};
|
||||
|
||||
pub fn main() {
|
||||
let args: Vec<String> = env::args().collect();
|
||||
if args.len() > 1 {
|
||||
let mut dir = env::current_exe().unwrap();
|
||||
let wrapper_name = dir.file_name().unwrap().to_str().unwrap();
|
||||
|
||||
let is_cpp = match wrapper_name[wrapper_name.len()-2..].to_lowercase().as_str() {
|
||||
"cc" => false,
|
||||
"++" | "pp" | "xx" => true,
|
||||
_ => panic!("Could not figure out if c or c++ wrapper was called. Expected {dir:?} to end with c or cxx"),
|
||||
};
|
||||
|
||||
dir.pop();
|
||||
|
||||
let mut cc = ClangWrapper::new();
|
||||
if let Some(code) = cc
|
||||
.cpp(is_cpp)
|
||||
// silence the compiler wrapper output, needed for some configure scripts.
|
||||
.silence(true)
|
||||
.parse_args(&args)
|
||||
.expect("Failed to parse the command line")
|
||||
.link_staticlib(&dir, "libfuzzer_stb_image_sugar")
|
||||
.add_arg("-fsanitize-coverage=trace-pc-guard")
|
||||
.run()
|
||||
.expect("Failed to run the wrapped compiler")
|
||||
{
|
||||
std::process::exit(code);
|
||||
}
|
||||
} else {
|
||||
panic!("LibAFL CC: No Arguments given");
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
pub mod libafl_cc;
|
||||
|
||||
fn main() {
|
||||
libafl_cc::main();
|
||||
}
|
@ -10,7 +10,8 @@ use libafl_bolts::core_affinity::Cores;
|
||||
use libafl_sugar::InProcessBytesCoverageSugar;
|
||||
use libafl_targets::{libfuzzer_initialize, libfuzzer_test_one_input};
|
||||
|
||||
pub fn main() {
|
||||
#[no_mangle]
|
||||
pub extern "C" fn libafl_main() {
|
||||
// Registry the metadata types used in this fuzzer
|
||||
// Needed only on no_std
|
||||
// unsafe { RegistryBuilder::register::<Tokens>(); }
|
@ -837,6 +837,7 @@ impl AsanRuntime {
|
||||
|
||||
#[expect(non_snake_case)]
|
||||
#[allow(unknown_lints)] // the compiler is contradicting itself
|
||||
#[allow(clippy::used_underscore_items)]
|
||||
#[inline]
|
||||
pub fn hook__Znwm(
|
||||
&mut self,
|
||||
@ -873,6 +874,7 @@ impl AsanRuntime {
|
||||
|
||||
#[expect(non_snake_case)]
|
||||
#[allow(unknown_lints)] // the compiler is contradicting itself
|
||||
#[allow(clippy::used_underscore_items)]
|
||||
#[inline]
|
||||
pub fn hook__ZnwmSt11align_val_t(
|
||||
&mut self,
|
||||
|
@ -12,12 +12,12 @@ else
|
||||
profile="$1"
|
||||
fi
|
||||
|
||||
if ! cargo +nightly --version >& /dev/null; then
|
||||
echo -e "You must install a recent Rust nightly to build the libafl_libfuzzer runtime!"
|
||||
if ! cargo --version >& /dev/null; then
|
||||
echo -e "You must install a recent Rust to build the libafl_libfuzzer runtime!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cargo +nightly build --profile "$profile"
|
||||
cargo build --profile "$profile"
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# MacOS and iOS
|
||||
@ -26,7 +26,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
-o libafl_libfuzzer_runtime.dylib
|
||||
else
|
||||
# Linux and *BSD
|
||||
RUSTC_BIN="$(cargo +nightly rustc -Zunstable-options --print target-libdir)/../bin"
|
||||
RUSTC_BIN="$(cargo rustc -Zunstable-options --print target-libdir)/../bin"
|
||||
RUST_LLD="${RUSTC_BIN}/rust-lld"
|
||||
RUST_AR="${RUSTC_BIN}/llvm-ar"
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
#![expect(improper_ctypes)]
|
||||
#![expect(unsafe_op_in_unsafe_fn)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unnecessary_transmutes)]
|
||||
|
||||
#[cfg(all(not(feature = "clippy"), target_os = "linux"))]
|
||||
#[rustfmt::skip]
|
||||
|
@ -8,7 +8,6 @@ compile_asan:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
build \
|
||||
--package asan \
|
||||
--target ${CROSS_TARGET} \
|
||||
@ -20,7 +19,6 @@ fix_asan:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
fix \
|
||||
--package asan \
|
||||
--target ${CROSS_TARGET} \
|
||||
@ -34,7 +32,6 @@ test_asan:
|
||||
. {{ DOTENV }}
|
||||
cd {{ ASAN_SOURCE_DIR }}
|
||||
cargo \
|
||||
+nightly \
|
||||
nextest \
|
||||
run \
|
||||
--target ${CROSS_TARGET}
|
||||
|
@ -8,7 +8,6 @@ compile_dummy:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
build \
|
||||
--package dummy_libc \
|
||||
--target $CROSS_TARGET \
|
||||
@ -20,7 +19,6 @@ fix_dummy:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
fix \
|
||||
--package dummy_libc \
|
||||
--target ${CROSS_TARGET} \
|
||||
|
@ -10,7 +10,6 @@ build_fuzz:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
build \
|
||||
--package fuzz \
|
||||
--target x86_64-unknown-linux-gnu \
|
||||
@ -22,7 +21,6 @@ fix_fuzz:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
fix \
|
||||
--package fuzz \
|
||||
--target x86_64-unknown-linux-gnu \
|
||||
@ -35,7 +33,6 @@ run_fuzz:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
fuzz \
|
||||
run \
|
||||
--target x86_64-unknown-linux-gnu \
|
||||
|
@ -9,7 +9,6 @@ compile_gasan:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
build \
|
||||
--package gasan \
|
||||
--target ${CROSS_TARGET} \
|
||||
@ -21,7 +20,6 @@ fix_gasan:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
fix \
|
||||
--package gasan \
|
||||
--target ${CROSS_TARGET} \
|
||||
|
@ -9,7 +9,6 @@ compile_qasan:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
build \
|
||||
--package qasan \
|
||||
--target ${CROSS_TARGET} \
|
||||
@ -21,7 +20,6 @@ fix_qasan:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
fix \
|
||||
--package qasan \
|
||||
--target ${CROSS_TARGET} \
|
||||
|
@ -6,7 +6,6 @@ compile_runner:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
build \
|
||||
--package runner \
|
||||
--target x86_64-unknown-linux-gnu \
|
||||
@ -19,7 +18,6 @@ fix_runner:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
fix \
|
||||
--package runner \
|
||||
--target x86_64-unknown-linux-gnu \
|
||||
|
@ -9,7 +9,6 @@ compile_zasan:
|
||||
. {{ DOTENV }}
|
||||
RUSTFLAGS="--cfg rustix_use_experimental_asm" \
|
||||
cargo \
|
||||
+nightly \
|
||||
build \
|
||||
--package zasan \
|
||||
--target ${CROSS_TARGET} \
|
||||
@ -21,7 +20,6 @@ fix_zasan:
|
||||
#!/bin/sh
|
||||
. {{ DOTENV }}
|
||||
cargo \
|
||||
+nightly \
|
||||
fix \
|
||||
--package zasan \
|
||||
--target ${CROSS_TARGET} \
|
||||
|
@ -44,7 +44,6 @@ mod bindings {
|
||||
#![expect(clippy::all)]
|
||||
#![expect(clippy::pedantic)]
|
||||
#![allow(unsafe_op_in_unsafe_fn)]
|
||||
#![allow(unnecessary_transmutes)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/libafl_qemu_bindings.rs"));
|
||||
}
|
||||
|
@ -49,7 +49,6 @@ pub(crate) mod bindings {
|
||||
#![allow(unused_variables)]
|
||||
#![expect(clippy::all)]
|
||||
#![expect(clippy::pedantic)]
|
||||
#![allow(unnecessary_transmutes)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/nyx_bindings.rs"));
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ use core::{mem::align_of, slice};
|
||||
feature = "sancov_ctx",
|
||||
feature = "sancov_ngram8"
|
||||
))]
|
||||
#[rustversion::nightly]
|
||||
use libafl::executors::hooks::ExecutorHook;
|
||||
|
||||
#[cfg(any(feature = "sancov_ngram4", feature = "sancov_ngram8"))]
|
||||
@ -74,6 +75,7 @@ use alloc::vec::Vec;
|
||||
feature = "sancov_ngram8",
|
||||
feature = "sancov_ctx"
|
||||
))]
|
||||
#[rustversion::nightly]
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// The hook to initialize ngram everytime we run the harness
|
||||
@ -86,12 +88,14 @@ pub struct NgramHook<I, S> {
|
||||
|
||||
/// The hook to initialize ctx everytime we run the harness
|
||||
#[cfg(feature = "sancov_ctx")]
|
||||
#[rustversion::nightly]
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct CtxHook<I, S> {
|
||||
phantom: PhantomData<(I, S)>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "sancov_ctx")]
|
||||
#[rustversion::nightly]
|
||||
impl<I, S> CtxHook<I, S> {
|
||||
/// The constructor for this struct
|
||||
#[must_use]
|
||||
@ -103,6 +107,7 @@ impl<I, S> CtxHook<I, S> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "sancov_ctx")]
|
||||
#[rustversion::nightly]
|
||||
impl<I, S> Default for CtxHook<I, S> {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
@ -148,6 +153,7 @@ impl<I, S> Default for NgramHook<I, S> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "sancov_ctx")]
|
||||
#[rustversion::nightly]
|
||||
impl<I, S> ExecutorHook<I, S> for CtxHook<I, S> {
|
||||
fn init(&mut self, _state: &mut S) {}
|
||||
fn pre_exec(&mut self, _state: &mut S, _input: &I) {
|
||||
|
@ -11,19 +11,19 @@ fi
|
||||
echo
|
||||
|
||||
echo "[+] Fixing build"
|
||||
cargo +nightly fix --release --workspace --all-features --allow-dirty --allow-staged
|
||||
cargo fix --release --workspace --all-features --allow-dirty --allow-staged
|
||||
|
||||
echo "[+] Done fixing build"
|
||||
echo
|
||||
|
||||
echo 'Fixing clippy (might need a "git commit" and a rerun, if "cargo fix" changed the source)'
|
||||
RUST_BACKTRACE=full cargo +nightly clippy --fix --release --all --all-features --tests --examples --benches --allow-dirty --allow-staged --broken-code -- -Z macro-backtrace
|
||||
RUST_BACKTRACE=full cargo clippy --fix --release --all --all-features --tests --examples --benches --allow-dirty --allow-staged --broken-code
|
||||
|
||||
cargo +nightly fmt
|
||||
cargo fmt
|
||||
|
||||
cargo +nightly clippy --fix --tests --examples --benches --all-features --allow-dirty --allow-staged --broken-code
|
||||
cargo clippy --fix --tests --examples --benches --all-features --allow-dirty --allow-staged --broken-code
|
||||
|
||||
cargo +nightly fmt
|
||||
cargo fmt
|
||||
|
||||
echo "[+] Done fixing clippy"
|
||||
echo
|
||||
|
@ -17,7 +17,7 @@ function Run-Clippy {
|
||||
|
||||
try {
|
||||
$env:RUST_BACKTRACE = "full"
|
||||
cargo +nightly clippy --all-features --no-deps --tests --examples --benches -- -Z macro-backtrace
|
||||
cargo clippy --all-features --no-deps --tests --examples --benches
|
||||
|
||||
# Exit unsuccessfully on clippy error
|
||||
if (!$?) {
|
||||
@ -55,7 +55,7 @@ else {
|
||||
|
||||
# First run it on all default members
|
||||
$env:RUST_BACKTRACE = "full"
|
||||
cargo +nightly clippy --all-features --no-deps --tests --examples --benches -- -Z macro-backtrace
|
||||
cargo clippy --all-features --no-deps --tests --examples --benches
|
||||
|
||||
# Exit unsuccessfully on clippy error
|
||||
if (!$?) {
|
||||
|
@ -3,8 +3,7 @@
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
|
||||
cd "$SCRIPT_DIR/.." || exit 1
|
||||
|
||||
CLIPPY_CMD="RUST_BACKTRACE=full cargo +nightly clippy --no-deps --tests --examples --benches"
|
||||
RUSTC_FLAGS="-Z macro-backtrace"
|
||||
CLIPPY_CMD="RUST_BACKTRACE=full cargo clippy --no-deps --tests --examples --benches"
|
||||
|
||||
set -e
|
||||
# Function to run Clippy on a single directory
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Script to find .rs files that don't get built.
|
||||
|
||||
cargo +nightly build --examples --all-features --tests --examples --benches
|
||||
cargo build --examples --all-features --tests --examples --benches
|
||||
|
||||
# Find all files in deps, then compare to all actual .d files. Ignore a range of files.
|
||||
grep --no-filename '^[^/].*\.rs:$' target/debug/deps/*.d | sed 's/:$//' | sort -u | diff - <(find . -name '*.rs' | sed 's/\.\///' | sort -u) | grep -Ev '(target/|scripts/|symcc_runtime/|build.rs|fuzzers/)'
|
@ -58,8 +58,7 @@ def main():
|
||||
options = "-D clippy::pedantic" if args.pedantic else ""
|
||||
|
||||
cmd_default = f"cargo clippy -- -D warnings {options}"
|
||||
cmd_nightly = f"cargo +nightly clippy -- -D warnings {options}"
|
||||
for cmd in [cmd_default, cmd_nightly]:
|
||||
for cmd in [cmd_default]:
|
||||
logging.info(f"[{fuzzer}] Running: {cmd}")
|
||||
if args.dry_run:
|
||||
continue
|
||||
|
@ -132,7 +132,6 @@ async fn run_cargo_generate_lockfile(cargo_file_path: PathBuf, verbose: bool) ->
|
||||
let mut gen_lockfile_cmd = Command::new("cargo");
|
||||
|
||||
gen_lockfile_cmd
|
||||
.arg("+nightly")
|
||||
.arg("generate-lockfile")
|
||||
.arg("--manifest-path")
|
||||
.arg(cargo_file_path.as_path());
|
||||
@ -177,7 +176,6 @@ async fn run_cargo_fmt(cargo_file_path: PathBuf, is_check: bool, verbose: bool)
|
||||
let mut fmt_command = Command::new("cargo");
|
||||
|
||||
fmt_command
|
||||
.arg("+nightly")
|
||||
.arg("fmt")
|
||||
.arg("--manifest-path")
|
||||
.arg(cargo_file_path.as_path());
|
||||
@ -325,16 +323,10 @@ async fn main() -> io::Result<()> {
|
||||
.collect();
|
||||
|
||||
// cargo version
|
||||
println!(
|
||||
"Using {}",
|
||||
get_version_string("cargo", &["+nightly"]).await?
|
||||
);
|
||||
println!("Using {}", get_version_string("cargo", &[]).await?);
|
||||
|
||||
// rustfmt version
|
||||
println!(
|
||||
"Using {}",
|
||||
get_version_string("cargo", &["+nightly", "fmt"]).await?
|
||||
);
|
||||
println!("Using {}", get_version_string("cargo", &["fmt"]).await?);
|
||||
|
||||
let mut tokio_joinset = JoinSet::new();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user