* fix * apt update * apt update * a * split even more * tmate * ci * can't fix this shit * s
This commit is contained in:
parent
61718c4e88
commit
001e132186
157
.github/workflows/build_and_test.yml
vendored
157
.github/workflows/build_and_test.yml
vendored
@ -92,7 +92,7 @@ jobs:
|
|||||||
- name: Remove existing clang and LLVM
|
- name: Remove existing clang and LLVM
|
||||||
run: sudo apt purge llvm* clang* lld* lldb* opt*
|
run: sudo apt purge llvm* clang* lld* lldb* opt*
|
||||||
- name: Install and cache deps
|
- name: Install and cache deps
|
||||||
run: sudo apt install ninja-build shellcheck libgtk-3-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev
|
run: sudo apt update && sudo apt install ninja-build shellcheck libgtk-3-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev
|
||||||
- name: Add nightly rustfmt and clippy
|
- name: Add nightly rustfmt and clippy
|
||||||
run: rustup toolchain install nightly --component rustfmt --component clippy --component miri --allow-downgrade
|
run: rustup toolchain install nightly --component rustfmt --component clippy --component miri --allow-downgrade
|
||||||
- name: Install ucd-generate
|
- name: Install ucd-generate
|
||||||
@ -143,7 +143,7 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- name: Install and cache deps
|
- name: Install and cache deps
|
||||||
run: sudo apt install ninja-build shellcheck libgtk-3-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev
|
run: sudo apt update && sudo apt install ninja-build shellcheck libgtk-3-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev
|
||||||
- name: Add nightly rustfmt and clippy
|
- name: Add nightly rustfmt and clippy
|
||||||
run: rustup toolchain install nightly --component clippy --allow-downgrade && rustup default nightly
|
run: rustup toolchain install nightly --component clippy --allow-downgrade && rustup default nightly
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -178,7 +178,7 @@ jobs:
|
|||||||
- name: Remove existing clang and LLVM
|
- name: Remove existing clang and LLVM
|
||||||
run: sudo apt purge llvm* clang*
|
run: sudo apt purge llvm* clang*
|
||||||
- name: Install and cache deps
|
- name: Install and cache deps
|
||||||
run: sudo apt install ninja-build clang-format shellcheck libgtk-3-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev
|
run: sudo apt update && sudo apt install ninja-build clang-format shellcheck libgtk-3-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev
|
||||||
- name: Install cargo-hack
|
- name: Install cargo-hack
|
||||||
run: curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
|
run: curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
|
||||||
- name: Install ucd-generate
|
- name: Install ucd-generate
|
||||||
@ -282,7 +282,7 @@ jobs:
|
|||||||
directory: ${{ runner.temp }}/llvm
|
directory: ${{ runner.temp }}/llvm
|
||||||
version: 17
|
version: 17
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: sudo apt install nasm ninja-build gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-mipsel-linux-gnu g++-mipsel-linux-gnu gcc-powerpc-linux-gnu g++-powerpc-linux-gnu libc6-dev-i386-cross libc6-dev libc6-dev-i386 lib32gcc-11-dev lib32stdc++-11-dev libgtk-3-dev pax-utils libz3-dev
|
run: sudo apt update && sudo apt install nasm ninja-build gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-mipsel-linux-gnu g++-mipsel-linux-gnu gcc-powerpc-linux-gnu g++-powerpc-linux-gnu libc6-dev-i386-cross libc6-dev libc6-dev-i386 lib32gcc-11-dev lib32stdc++-11-dev libgtk-3-dev pax-utils libz3-dev
|
||||||
- name: pip install
|
- name: pip install
|
||||||
run: python3 -m pip install msgpack jinja2 find_libpython
|
run: python3 -m pip install msgpack jinja2 find_libpython
|
||||||
# Note that nproc needs to have coreutils installed on macOS, so the order of CI commands matters.
|
# Note that nproc needs to have coreutils installed on macOS, so the order of CI commands matters.
|
||||||
@ -356,7 +356,7 @@ jobs:
|
|||||||
directory: ${{ runner.temp }}/llvm
|
directory: ${{ runner.temp }}/llvm
|
||||||
version: 17
|
version: 17
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: sudo apt install nasm ninja-build gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-mipsel-linux-gnu g++-mipsel-linux-gnu gcc-powerpc-linux-gnu g++-powerpc-linux-gnu libc6-dev-i386-cross libc6-dev libc6-dev-i386 lib32gcc-11-dev lib32stdc++-11-dev libgtk-3-dev pax-utils libz3-dev
|
run: sudo apt update && sudo apt install nasm ninja-build gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-mipsel-linux-gnu g++-mipsel-linux-gnu gcc-powerpc-linux-gnu g++-powerpc-linux-gnu libc6-dev-i386-cross libc6-dev libc6-dev-i386 lib32gcc-11-dev lib32stdc++-11-dev libgtk-3-dev pax-utils libz3-dev
|
||||||
- name: pip install
|
- name: pip install
|
||||||
run: python3 -m pip install msgpack jinja2 find_libpython
|
run: python3 -m pip install msgpack jinja2 find_libpython
|
||||||
# Note that nproc needs to have coreutils installed on macOS, so the order of CI commands matters.
|
# Note that nproc needs to have coreutils installed on macOS, so the order of CI commands matters.
|
||||||
@ -387,6 +387,153 @@ jobs:
|
|||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: RUN_ON_CI=1 RUN_QEMU_FUZZER=1 LLVM_CONFIG=llvm-config ./scripts/test_all_fuzzers.sh
|
run: RUN_ON_CI=1 RUN_QEMU_FUZZER=1 LLVM_CONFIG=llvm-config ./scripts/test_all_fuzzers.sh
|
||||||
|
|
||||||
|
baby_fuzzers:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
uses: jlumbroso/free-disk-space@main
|
||||||
|
with:
|
||||||
|
# this might remove tools that are actually needed,
|
||||||
|
# if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: false
|
||||||
|
|
||||||
|
# all of these default to true, but feel free to set to
|
||||||
|
# "false" if necessary for your workflow
|
||||||
|
android: true
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: true
|
||||||
|
- name: Add nightly rustfmt and clippy
|
||||||
|
run: rustup toolchain install nightly --component rustfmt --component clippy --allow-downgrade
|
||||||
|
- name: Add no_std toolchain
|
||||||
|
run: rustup toolchain install nightly-x86_64-unknown-linux-gnu ; rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||||
|
- name: Add wasm target
|
||||||
|
run: rustup target add wasm32-unknown-unknown
|
||||||
|
- name: Install ucd-generate
|
||||||
|
run: cargo install -f ucd-generate
|
||||||
|
- name: Remove obsolete llvm (Linux)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: sudo apt purge llvm* clang*
|
||||||
|
- name: Install LLVM and Clang
|
||||||
|
uses: KyleMayes/install-llvm-action@v1
|
||||||
|
with:
|
||||||
|
directory: ${{ runner.temp }}/llvm
|
||||||
|
version: 17
|
||||||
|
- name: Install deps
|
||||||
|
run: sudo apt update && sudo apt install nasm ninja-build gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-mipsel-linux-gnu g++-mipsel-linux-gnu gcc-powerpc-linux-gnu g++-powerpc-linux-gnu libc6-dev-i386-cross libc6-dev libc6-dev-i386 lib32gcc-11-dev lib32stdc++-11-dev libgtk-3-dev pax-utils libz3-dev
|
||||||
|
- name: pip install
|
||||||
|
run: python3 -m pip install msgpack jinja2 find_libpython
|
||||||
|
# Note that nproc needs to have coreutils installed on macOS, so the order of CI commands matters.
|
||||||
|
- name: enable mult-thread for `make`
|
||||||
|
run: export MAKEFLAGS="-j$(expr $(nproc) \+ 1)"
|
||||||
|
- name: install cargo-make
|
||||||
|
uses: baptiste0928/cargo-install@v1.3.0
|
||||||
|
with:
|
||||||
|
crate: cargo-make
|
||||||
|
- name: install wasm-pack
|
||||||
|
uses: baptiste0928/cargo-install@v1.3.0
|
||||||
|
with:
|
||||||
|
crate: wasm-pack
|
||||||
|
- name: install chrome
|
||||||
|
uses: browser-actions/setup-chrome@v1
|
||||||
|
with:
|
||||||
|
chrome-version: stable
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true # recursively checkout submodules
|
||||||
|
fetch-depth: 0 # to diff with origin/main
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
- name: Symlink Headers
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
# We can't install gcc-multilib which would usually do this for us due to collisions with other packages
|
||||||
|
run: sudo ln -s /usr/include/asm-generic /usr/include/asm
|
||||||
|
- name: Build and run example fuzzers (Linux)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: RUN_ON_CI=1 RUN_BABY_FUZZER=1 LLVM_CONFIG=llvm-config ./scripts/test_all_fuzzers.sh
|
||||||
|
|
||||||
|
libpng_fuzzers:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
uses: jlumbroso/free-disk-space@main
|
||||||
|
with:
|
||||||
|
# this might remove tools that are actually needed,
|
||||||
|
# if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: false
|
||||||
|
|
||||||
|
# all of these default to true, but feel free to set to
|
||||||
|
# "false" if necessary for your workflow
|
||||||
|
android: true
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
large-packages: false
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: true
|
||||||
|
- name: Add nightly rustfmt and clippy
|
||||||
|
run: rustup toolchain install nightly --component rustfmt --component clippy --allow-downgrade
|
||||||
|
- name: Add no_std toolchain
|
||||||
|
run: rustup toolchain install nightly-x86_64-unknown-linux-gnu ; rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||||
|
- name: Add wasm target
|
||||||
|
run: rustup target add wasm32-unknown-unknown
|
||||||
|
- name: Install ucd-generate
|
||||||
|
run: cargo install -f ucd-generate
|
||||||
|
- name: Remove obsolete llvm (Linux)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: sudo apt purge llvm* clang*
|
||||||
|
- name: Install LLVM and Clang
|
||||||
|
uses: KyleMayes/install-llvm-action@v1
|
||||||
|
with:
|
||||||
|
directory: ${{ runner.temp }}/llvm
|
||||||
|
version: 17
|
||||||
|
- name: Install deps
|
||||||
|
run: sudo apt update && sudo apt install nasm ninja-build gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-mipsel-linux-gnu g++-mipsel-linux-gnu gcc-powerpc-linux-gnu g++-powerpc-linux-gnu libc6-dev-i386-cross libc6-dev libc6-dev-i386 lib32gcc-11-dev lib32stdc++-11-dev libgtk-3-dev pax-utils libz3-dev
|
||||||
|
- name: pip install
|
||||||
|
run: python3 -m pip install msgpack jinja2 find_libpython
|
||||||
|
# Note that nproc needs to have coreutils installed on macOS, so the order of CI commands matters.
|
||||||
|
- name: enable mult-thread for `make`
|
||||||
|
run: export MAKEFLAGS="-j$(expr $(nproc) \+ 1)"
|
||||||
|
- name: install cargo-make
|
||||||
|
uses: baptiste0928/cargo-install@v1.3.0
|
||||||
|
with:
|
||||||
|
crate: cargo-make
|
||||||
|
- name: install wasm-pack
|
||||||
|
uses: baptiste0928/cargo-install@v1.3.0
|
||||||
|
with:
|
||||||
|
crate: wasm-pack
|
||||||
|
- name: install chrome
|
||||||
|
uses: browser-actions/setup-chrome@v1
|
||||||
|
with:
|
||||||
|
chrome-version: stable
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true # recursively checkout submodules
|
||||||
|
fetch-depth: 0 # to diff with origin/main
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
- name: Symlink Headers
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
# We can't install gcc-multilib which would usually do this for us due to collisions with other packages
|
||||||
|
run: sudo ln -s /usr/include/asm-generic /usr/include/asm
|
||||||
|
- name: Build and run example fuzzers (Linux)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: RUN_ON_CI=1 RUN_LIBPNG_FUZZER=1 LLVM_CONFIG=llvm-config ./scripts/test_all_fuzzers.sh
|
||||||
|
|
||||||
nostd-build:
|
nostd-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -101,6 +101,8 @@ rm -rf libafl_unix_shmem_server || true
|
|||||||
timeout 31s ./${FUZZER_NAME} --cores 0 --input ./corpus >fuzz_stdout.log 2>/dev/null || true
|
timeout 31s ./${FUZZER_NAME} --cores 0 --input ./corpus >fuzz_stdout.log 2>/dev/null || true
|
||||||
if grep -qa "corpus: 30" fuzz_stdout.log; then
|
if grep -qa "corpus: 30" fuzz_stdout.log; then
|
||||||
echo "Fuzzer is working"
|
echo "Fuzzer is working"
|
||||||
|
elif grep -qa "objectives: 1" fuzz_stdout.log; then
|
||||||
|
echo "Fuzzer finds timeout or crash"
|
||||||
else
|
else
|
||||||
echo "Fuzzer does not generate any testcases or any crashes"
|
echo "Fuzzer does not generate any testcases or any crashes"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -362,7 +362,10 @@ pub unsafe extern "system" fn handle_exception(
|
|||||||
.as_mut()
|
.as_mut()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.ExceptionCode;
|
.ExceptionCode;
|
||||||
let exception_code = ExceptionCode::try_from(code.0).unwrap();
|
let exception_code = match ExceptionCode::try_from(code.0) {
|
||||||
|
Ok(x) => x,
|
||||||
|
Err(_) => ExceptionCode::Other,
|
||||||
|
};
|
||||||
log::info!("Received exception; code: {}", exception_code);
|
log::info!("Received exception; code: {}", exception_code);
|
||||||
internal_handle_exception(exception_code, exception_pointers)
|
internal_handle_exception(exception_code, exception_pointers)
|
||||||
}
|
}
|
||||||
|
@ -15,12 +15,18 @@ else
|
|||||||
export PROFILE_DIR=debug
|
export PROFILE_DIR=debug
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${RUN_QEMU_FUZZER}" ]]; then
|
if [[ -n "${RUN_QEMU_FUZZER}" ]]; then
|
||||||
fuzzers=$(echo "$fuzzers" | tr ' ' '\n' | grep -v "qemu")
|
|
||||||
backtrace_fuzzers=$(echo "$backtrace_fuzzers" | tr ' ' '\n' | grep -v "qemu")
|
|
||||||
else
|
|
||||||
fuzzers=$(echo "$fuzzers" | tr ' ' '\n' | grep "qemu")
|
fuzzers=$(echo "$fuzzers" | tr ' ' '\n' | grep "qemu")
|
||||||
backtrace_fuzzers=$(echo "$backtrace_fuzzers" | tr ' ' '\n' | grep "qemu")
|
backtrace_fuzzers=$(echo "$backtrace_fuzzers" | tr ' ' '\n' | grep "qemu")
|
||||||
|
elif [[ -n "${RUN_BABY_FUZZER}" ]]; then
|
||||||
|
fuzzers=$(echo "$fuzzers" | tr ' ' '\n' | grep "baby")
|
||||||
|
backtrace_fuzzers=$(echo "$backtrace_fuzzers" | tr ' ' '\n' | grep "baby")
|
||||||
|
elif [[ -n "${RUN_LIBPNG_FUZZER}" ]]; then
|
||||||
|
fuzzers=$(echo "$fuzzers" | tr ' ' '\n' | grep "libpng")
|
||||||
|
backtrace_fuzzers=$(echo "$backtrace_fuzzers" | tr ' ' '\n' | grep "libpng")
|
||||||
|
else
|
||||||
|
fuzzers=$(echo "$fuzzers" | tr ' ' '\n' | grep -v "qemu" | grep -v "baby" | grep -v "libpng")
|
||||||
|
backtrace_fuzzers=$(echo "$backtrace_fuzzers" | tr ' ' '\n' | grep -v "qemu" | grep -v "baby" | grep -v "libpng")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
libafl=$(pwd)
|
libafl=$(pwd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user