Fix CI (somewhat) (#2546)
* fix ci * a * order * libafl-fuzz: fix CI cmplog (#2548) --------- Co-authored-by: Aarnav <aarnavbos@gmail.com>
This commit is contained in:
parent
7432bd0f59
commit
967449e3cb
@ -110,7 +110,7 @@ script = '''
|
|||||||
# cmplog TODO: AFL_BENCH_UNTIL_CRASH=1 instead of timeout 15s
|
# cmplog TODO: AFL_BENCH_UNTIL_CRASH=1 instead of timeout 15s
|
||||||
AFL_LLVM_CMPLOG=1 AFL_PATH=${AFL_DIR} ${AFL_CC_PATH} ./test/test-cmplog.c -o ./test/out-cmplog
|
AFL_LLVM_CMPLOG=1 AFL_PATH=${AFL_DIR} ${AFL_CC_PATH} ./test/test-cmplog.c -o ./test/out-cmplog
|
||||||
AFL_CORES=1 timeout 5 ${FUZZER} -Z -l 3 -m 0 -V30 -i ./test/seeds_cmplog -o ./test/output-cmplog -c 0 ./test/out-cmplog || true
|
AFL_CORES=1 timeout 5 ${FUZZER} -Z -l 3 -m 0 -V30 -i ./test/seeds_cmplog -o ./test/output-cmplog -c 0 ./test/out-cmplog || true
|
||||||
test -n "$( ls -A ./test/output-cmplog/fuzzer_main/crashes/)" || {
|
test -n "$( ls ./test/output-cmplog/fuzzer_main/crashes/id:0000* 2>/dev/null )" || {
|
||||||
echo "No crashes found"
|
echo "No crashes found"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -2,27 +2,23 @@ use std::marker::PhantomData;
|
|||||||
|
|
||||||
use libafl::{
|
use libafl::{
|
||||||
corpus::{Corpus, CorpusId, HasTestcase, SchedulerTestcaseMetadata, Testcase},
|
corpus::{Corpus, CorpusId, HasTestcase, SchedulerTestcaseMetadata, Testcase},
|
||||||
inputs::{Input, UsesInput},
|
inputs::Input,
|
||||||
observers::{CanTrack, ObserversTuple},
|
schedulers::{HasQueueCycles, RemovableScheduler, Scheduler},
|
||||||
schedulers::{
|
state::HasCorpus,
|
||||||
HasQueueCycles, MinimizerScheduler, RemovableScheduler, Scheduler, TestcaseScore,
|
|
||||||
},
|
|
||||||
state::{HasCorpus, HasRand, State},
|
|
||||||
Error, HasMetadata,
|
Error, HasMetadata,
|
||||||
};
|
};
|
||||||
use libafl_bolts::{serdeany::SerdeAny, tuples::MatchName, AsIter, HasRefCnt};
|
use libafl_bolts::tuples::MatchName;
|
||||||
|
|
||||||
pub enum SupportedSchedulers<W, Q> {
|
pub enum SupportedSchedulers<Q, W> {
|
||||||
Queue(Q, PhantomData<W>),
|
Queue(Q, PhantomData<W>),
|
||||||
Weighted(W, PhantomData<Q>),
|
Weighted(W, PhantomData<Q>),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<W, Q, I, S> RemovableScheduler<I, S> for SupportedSchedulers<W, Q>
|
impl<I, Q, S, W> RemovableScheduler<I, S> for SupportedSchedulers<Q, W>
|
||||||
where
|
where
|
||||||
I: Input,
|
|
||||||
Q: Scheduler<I, S> + RemovableScheduler<I, S>,
|
Q: Scheduler<I, S> + RemovableScheduler<I, S>,
|
||||||
W: Scheduler<I, S> + RemovableScheduler<I, S>,
|
W: Scheduler<I, S> + RemovableScheduler<I, S>,
|
||||||
S: UsesInput + HasTestcase + HasMetadata + HasCorpus<Input = I> + HasRand + State,
|
S: HasCorpus + HasTestcase,
|
||||||
{
|
{
|
||||||
fn on_remove(
|
fn on_remove(
|
||||||
&mut self,
|
&mut self,
|
||||||
@ -44,12 +40,12 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<W, Q, I, S> Scheduler<I, S> for SupportedSchedulers<W, Q>
|
impl<I, Q, S, W> Scheduler<I, S> for SupportedSchedulers<Q, W>
|
||||||
where
|
where
|
||||||
I: Input,
|
I: Input,
|
||||||
Q: Scheduler<I, S>,
|
Q: Scheduler<I, S>,
|
||||||
W: Scheduler<I, S>,
|
W: Scheduler<I, S>,
|
||||||
S: UsesInput + HasTestcase + HasMetadata + HasCorpus<Input = I> + HasRand + State,
|
S: HasCorpus + HasTestcase,
|
||||||
{
|
{
|
||||||
fn on_add(&mut self, state: &mut S, id: CorpusId) -> Result<(), Error> {
|
fn on_add(&mut self, state: &mut S, id: CorpusId) -> Result<(), Error> {
|
||||||
match self {
|
match self {
|
||||||
@ -103,7 +99,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<W, Q> HasQueueCycles for SupportedSchedulers<W, Q>
|
impl<Q, W> HasQueueCycles for SupportedSchedulers<Q, W>
|
||||||
where
|
where
|
||||||
Q: HasQueueCycles,
|
Q: HasQueueCycles,
|
||||||
W: HasQueueCycles,
|
W: HasQueueCycles,
|
||||||
|
@ -34,8 +34,8 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type PacketLenMinimizerScheduler<CS, O, S> =
|
pub type PacketLenMinimizerScheduler<CS, S> =
|
||||||
MinimizerScheduler<CS, PacketLenTestcaseScore, PacketData, MapIndexesMetadata, O, S>;
|
MinimizerScheduler<CS, PacketLenTestcaseScore, MapIndexesMetadata, S>;
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Default, Clone, Debug)]
|
#[derive(Serialize, Deserialize, Default, Clone, Debug)]
|
||||||
pub struct PacketLenFeedback {
|
pub struct PacketLenFeedback {
|
||||||
|
@ -50,6 +50,15 @@ where
|
|||||||
fn next(&mut self, _state: &mut S) -> Result<CorpusId, Error> {
|
fn next(&mut self, _state: &mut S) -> Result<CorpusId, Error> {
|
||||||
unimplemented!("Not suitable for actual scheduling.");
|
unimplemented!("Not suitable for actual scheduling.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn set_current_scheduled(
|
||||||
|
&mut self,
|
||||||
|
state: &mut S,
|
||||||
|
next_id: Option<CorpusId>,
|
||||||
|
) -> Result<(), Error> {
|
||||||
|
*state.corpus_mut().current_mut() = next_id;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I, S> MergeScheduler<I, S> {
|
impl<I, S> MergeScheduler<I, S> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user