sequential inputs for copter
This commit is contained in:
parent
25d1e590fc
commit
ddf7fd85f9
@ -27,6 +27,10 @@ __attribute__((noinline)) static void trigger_job_done( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static unsigned char fuzz_char_next(int tasknum) {
|
static unsigned char fuzz_char_next(int tasknum) {
|
||||||
|
#ifndef FUZZ_BYTES
|
||||||
|
return 255;
|
||||||
|
#endif
|
||||||
|
#ifdef PARTITION_INPUT
|
||||||
if (INPUT_POINTERS[tasknum] == 0) {
|
if (INPUT_POINTERS[tasknum] == 0) {
|
||||||
INPUT_POINTERS[tasknum] = tasknum * (MAX_INPUT_BYTES / NUM_TASKS);
|
INPUT_POINTERS[tasknum] = tasknum * (MAX_INPUT_BYTES / NUM_TASKS);
|
||||||
}
|
}
|
||||||
@ -34,6 +38,18 @@ static unsigned char fuzz_char_next(int tasknum) {
|
|||||||
trigger_Qemu_break();
|
trigger_Qemu_break();
|
||||||
}
|
}
|
||||||
FUZZ_INPUT[INPUT_POINTERS[tasknum]++];
|
FUZZ_INPUT[INPUT_POINTERS[tasknum]++];
|
||||||
|
#else
|
||||||
|
// printf("Get next Input from %lx \n",FUZZ_INPUT);
|
||||||
|
if (INPUT_POINTERS[0] < FUZZ_LENGTH) {
|
||||||
|
INPUT_POINTERS[0]++;
|
||||||
|
// printf("Input no. %d %x\n",FUZZ_POINTER-1,FUZZ_INPUT[FUZZ_POINTER-1]);
|
||||||
|
return FUZZ_INPUT[INPUT_POINTERS[0]-1];
|
||||||
|
} else {
|
||||||
|
// puts("End of Input");
|
||||||
|
// Exausted inputs early
|
||||||
|
trigger_Qemu_break();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
volatile int RNG_STATES[NUM_TASKS] = {};
|
volatile int RNG_STATES[NUM_TASKS] = {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user