Remove qemu_arm_launcher test from CI (#1179)
* remove qemu arm * trigger all * debug * revert * api chg * fix * try * debug * remove qemu * no_std * Update build_and_test.yml * llvm16 * revert z3 * macos * fix * remove test * don't grep on mac * fix * ok * f * f * f * aaa
This commit is contained in:
parent
590d3655cd
commit
ccd1211cd2
@ -102,7 +102,7 @@ dependencies = [ "fuzzer", "harness" ]
|
||||
# Test
|
||||
[tasks.test]
|
||||
linux_alias = "test_unix"
|
||||
mac_alias = "test_unix"
|
||||
mac_alias = "test_mac"
|
||||
windows_alias = "test_windows"
|
||||
|
||||
[tasks.test_unix]
|
||||
@ -119,6 +119,15 @@ fi
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness" ]
|
||||
|
||||
# Don't grep and check the result on macOS because it's unstable
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 10s ./${FUZZER_NAME} -F LLVMFuzzerTestOneInput -H ./libpng-harness.so -l ./libpng-harness.so >fuzz_stdout.log || true
|
||||
'''
|
||||
dependencies = [ "fuzzer", "harness" ]
|
||||
|
||||
[tasks.test_windows]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
|
@ -78,14 +78,7 @@ windows_alias = "unsupported"
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 10s cargo run --release -- --libafl-in ../libfuzzer_libpng/corpus --libafl-out ./out ./${FUZZER_NAME} >fuzz_stdout.log || true
|
||||
if [ -z "$(grep "corpus: 5" fuzz_stdout.log)" ]; then
|
||||
echo "Fuzzer does not generate any testcases or any crashes"
|
||||
exit 1
|
||||
else
|
||||
echo "Fuzzer is working"
|
||||
fi
|
||||
echo "This test is skipped. QEMU-based fuzzer doesn't work on Github runners"
|
||||
'''
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
|
||||
|
@ -78,14 +78,7 @@ windows_alias = "unsupported"
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 10s cargo run --release -- --libafl-in ../libfuzzer_libpng/corpus --libafl-out ./out ./${FUZZER_NAME} >fuzz_stdout.log || true
|
||||
if [ -z "$(grep "corpus: 5" fuzz_stdout.log)" ]; then
|
||||
echo "Fuzzer does not generate any testcases or any crashes"
|
||||
exit 1
|
||||
else
|
||||
echo "Fuzzer is working"
|
||||
fi
|
||||
echo "This test is skipped. QEMU-based fuzzer doesn't work on Github runners"
|
||||
'''
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
|
||||
|
@ -97,7 +97,7 @@ windows_alias = "unsupported"
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 11s ./${FUZZER_NAME} >fuzz_stdout.log &
|
||||
(timeout 11s ./${FUZZER_NAME} >fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
timeout 10s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
|
||||
if [ -z "$(grep "corpus: 30" fuzz_stdout.log)" ]; then
|
||||
|
@ -152,14 +152,14 @@ dependencies = [ "fuzzer_crash" ]
|
||||
# Test
|
||||
[tasks.test]
|
||||
linux_alias = "test_unix"
|
||||
mac_alias = "test_unix"
|
||||
mac_alias = "test_mac"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 11s ./${FUZZER_NAME} >fuzz_stdout.log &
|
||||
(timeout 11s ./${FUZZER_NAME} >fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
timeout 10s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
|
||||
if [ -z "$(grep "corpus: 30" fuzz_stdout.log)" ]; then
|
||||
@ -171,6 +171,16 @@ fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
(timeout 11s ./${FUZZER_NAME} >fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
timeout 10s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
linux_alias = "clean_unix"
|
||||
|
@ -89,7 +89,7 @@ dependencies = [ "fuzzer" ]
|
||||
# Test
|
||||
[tasks.test]
|
||||
linux_alias = "test_unix"
|
||||
mac_alias = "test_unix"
|
||||
mac_alias = "test_mac"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
@ -106,6 +106,14 @@ fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 11s ./${FUZZER_NAME} --cores 0 --input ./corpus >fuzz_stdout.log 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
linux_alias = "clean_unix"
|
||||
|
@ -102,7 +102,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_unix]
|
||||
command = "${CARGO_TARGET_DIR}/release/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}", "-lm", "-lz", "-lz3"]
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}", "-lm", "-lz"]
|
||||
dependencies = [ "lib", "cxx", "cc" ]
|
||||
|
||||
# Crashing Harness
|
||||
@ -113,7 +113,7 @@ windows_alias = "unsupported"
|
||||
|
||||
[tasks.fuzzer_crash_unix]
|
||||
command = "${CARGO_TARGET_DIR}/release/libafl_cxx"
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}_crash", "-lm", "-lz", "-lz3"]
|
||||
args = ["${PROJECT_DIR}/harness.cc", "${PROJECT_DIR}/libpng-1.6.37/.libs/libpng16.a", "-I", "${PROJECT_DIR}/libpng-1.6.37/", "-o", "${FUZZER_NAME}_crash", "-lm", "-lz"]
|
||||
dependencies = [ "crash_lib", "crash_cxx", "crash_cc" ]
|
||||
|
||||
# Run the fuzzer
|
||||
@ -152,7 +152,7 @@ dependencies = [ "fuzzer_crash" ]
|
||||
# Test
|
||||
[tasks.test]
|
||||
linux_alias = "test_unix"
|
||||
mac_alias = "test_unix"
|
||||
mac_alias = "test_mac"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
@ -171,6 +171,16 @@ fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 11s ./${FUZZER_NAME} >fuzz_stdout.log &
|
||||
sleep 0.2
|
||||
timeout 10s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
linux_alias = "clean_unix"
|
||||
|
@ -89,7 +89,7 @@ dependencies = [ "fuzzer" ]
|
||||
# Test
|
||||
[tasks.test]
|
||||
linux_alias = "test_unix"
|
||||
mac_alias = "test_unix"
|
||||
mac_alias = "test_mac"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
@ -106,6 +106,13 @@ fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 11s ./${FUZZER_NAME} --cores 0 --input ./corpus >fuzz_stdout.log 2>/dev/null || true
|
||||
'''
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
linux_alias = "clean_unix"
|
||||
|
@ -89,7 +89,7 @@ dependencies = [ "fuzzer" ]
|
||||
# Test
|
||||
[tasks.test]
|
||||
linux_alias = "test_unix"
|
||||
mac_alias = "test_unix"
|
||||
mac_alias = "test_mac"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
@ -106,6 +106,14 @@ fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 11s ./${FUZZER_NAME} --cores 0 --input ./corpus 2>/dev/null >fuzz_stdout.log || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
linux_alias = "clean_unix"
|
||||
|
@ -53,14 +53,14 @@ dependencies = [ "fuzzer" ]
|
||||
|
||||
[tasks.test]
|
||||
linux_alias = "test_unix"
|
||||
mac_alias = "test_unix"
|
||||
mac_alias = "test_mac"
|
||||
windows_alias = "test_windows"
|
||||
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 11s ./${FUZZER_NAME} >fuzz_stdout.log &
|
||||
(timeout 11s ./${FUZZER_NAME} >fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
timeout 10s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
|
||||
if [ -z "$(grep "corpus: 30" fuzz_stdout.log)" ]; then
|
||||
@ -72,6 +72,16 @@ fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
(timeout 11s ./${FUZZER_NAME} >fuzz_stdout.log 2>/dev/null || true) &
|
||||
sleep 0.2
|
||||
timeout 10s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer"]
|
||||
|
||||
[tasks.test_windows]
|
||||
# Do nothing
|
||||
script_runner = "@shell"
|
||||
|
@ -97,7 +97,7 @@ dependencies = [ "fuzzer" ]
|
||||
# Test
|
||||
[tasks.test]
|
||||
linux_alias = "test_unix"
|
||||
mac_alias = "test_unix"
|
||||
mac_alias = "test_mac"
|
||||
windows_alias = "unsupported"
|
||||
|
||||
[tasks.test_unix]
|
||||
@ -114,6 +114,14 @@ fi
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
[tasks.test_mac]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 11s ./${FUZZER_NAME} --cores 0 >fuzz_stdout.log 2>/dev/null || true
|
||||
'''
|
||||
dependencies = [ "fuzzer" ]
|
||||
|
||||
# Clean up
|
||||
[tasks.clean]
|
||||
linux_alias = "clean_unix"
|
||||
|
@ -150,12 +150,7 @@ script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 11s ./target/release/qemu_arm_launcher ./${FUZZER_NAME} 2>/dev/null >fuzz_stdout.log || true
|
||||
if [ -z "$(grep "corpus: 30" fuzz_stdout.log)" ]; then
|
||||
echo "Fuzzer does not generate any testcases or any crashes"
|
||||
exit 1
|
||||
else
|
||||
echo "Fuzzer is working"
|
||||
fi
|
||||
echo "This test is skipped"
|
||||
'''
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
|
||||
|
@ -76,14 +76,7 @@ windows_alias = "unsupported"
|
||||
[tasks.test_unix]
|
||||
script_runner = "@shell"
|
||||
script='''
|
||||
rm -rf libafl_unix_shmem_server || true
|
||||
timeout 11s ./target/release/qemu_launcher ./${FUZZER_NAME} 2>/dev/null >fuzz_stdout.log || true
|
||||
if [ -z "$(grep "corpus: 30" fuzz_stdout.log)" ]; then
|
||||
echo "Fuzzer does not generate any testcases or any crashes"
|
||||
exit 1
|
||||
else
|
||||
echo "Fuzzer is working"
|
||||
fi
|
||||
echo "This test is skipped"
|
||||
'''
|
||||
dependencies = [ "harness", "fuzzer" ]
|
||||
|
||||
|
@ -29,7 +29,6 @@ frida_cli = ["cli"] # Commandline flags for frida-based fuzzers
|
||||
afl_exec_sec = [] # calculate exec/sec like AFL
|
||||
errors_backtrace = ["backtrace"]
|
||||
cmin = ["z3"] # corpus minimisation
|
||||
static_z3 = ["z3/static-link-z3"] # Allows us to build z3 from source, instead of installing it
|
||||
corpus_btreemap = [] # Switches from HashMap to BTreeMap for CorpusId
|
||||
gzip = ["miniz_oxide"] # Enables gzip compression in certain parts of the lib
|
||||
regex = ["std", "dep:regex"] # enables the NaiveTokenizer and StacktraceObserver
|
||||
@ -99,7 +98,7 @@ log = "0.4.17"
|
||||
|
||||
wait-timeout = { version = "0.2", optional = true } # used by CommandExecutor to wait for child process
|
||||
|
||||
z3 = { version = "0.11", optional = true } # for concolic mutation and other solving needs
|
||||
z3 = { version = "0.11", features = ["static-link-z3"], optional = true } # for concolic mutation
|
||||
|
||||
pyo3 = { version = "0.17", optional = true, features = ["serde", "macros"] }
|
||||
concat-idents = { version = "1.1.3", optional = true }
|
||||
|
@ -16,7 +16,7 @@ use crate::{
|
||||
};
|
||||
|
||||
/// A corpus that keeps a maximum number of [`Testcase`]s in memory
|
||||
/// and load them from disk, when they are being used
|
||||
/// and load them from disk, when they are being used.
|
||||
/// The eviction policy is FIFO.
|
||||
#[cfg(feature = "std")]
|
||||
#[derive(Default, Serialize, Deserialize, Clone, Debug)]
|
||||
|
@ -301,7 +301,11 @@ impl CompilerWrapper for ClangWrapper {
|
||||
|
||||
if !self.passes.is_empty() {
|
||||
if self.use_new_pm {
|
||||
if let Some(ver) = LIBAFL_CC_LLVM_VERSION {
|
||||
if ver < 16 {
|
||||
args.push("-fexperimental-new-pass-manager".into());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
args.push("-flegacy-pass-manager".into());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user