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
|
||||
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
|
||||
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"
|
||||
exit 1
|
||||
}
|
||||
|
@ -2,27 +2,23 @@ use std::marker::PhantomData;
|
||||
|
||||
use libafl::{
|
||||
corpus::{Corpus, CorpusId, HasTestcase, SchedulerTestcaseMetadata, Testcase},
|
||||
inputs::{Input, UsesInput},
|
||||
observers::{CanTrack, ObserversTuple},
|
||||
schedulers::{
|
||||
HasQueueCycles, MinimizerScheduler, RemovableScheduler, Scheduler, TestcaseScore,
|
||||
},
|
||||
state::{HasCorpus, HasRand, State},
|
||||
inputs::Input,
|
||||
schedulers::{HasQueueCycles, RemovableScheduler, Scheduler},
|
||||
state::HasCorpus,
|
||||
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>),
|
||||
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
|
||||
I: Input,
|
||||
Q: 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(
|
||||
&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
|
||||
I: Input,
|
||||
Q: 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> {
|
||||
match self {
|
||||
@ -103,7 +99,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<W, Q> HasQueueCycles for SupportedSchedulers<W, Q>
|
||||
impl<Q, W> HasQueueCycles for SupportedSchedulers<Q, W>
|
||||
where
|
||||
Q: HasQueueCycles,
|
||||
W: HasQueueCycles,
|
||||
|
@ -34,8 +34,8 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub type PacketLenMinimizerScheduler<CS, O, S> =
|
||||
MinimizerScheduler<CS, PacketLenTestcaseScore, PacketData, MapIndexesMetadata, O, S>;
|
||||
pub type PacketLenMinimizerScheduler<CS, S> =
|
||||
MinimizerScheduler<CS, PacketLenTestcaseScore, MapIndexesMetadata, S>;
|
||||
|
||||
#[derive(Serialize, Deserialize, Default, Clone, Debug)]
|
||||
pub struct PacketLenFeedback {
|
||||
|
@ -50,6 +50,15 @@ where
|
||||
fn next(&mut self, _state: &mut S) -> Result<CorpusId, Error> {
|
||||
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> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user