mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Fix issues with unaligned memory bus rd/wr. Improve fuzzing.
This commit is contained in:
parent
5fb03b7d66
commit
e5fd17aff6
5 changed files with 70 additions and 15 deletions
|
|
@ -9,14 +9,19 @@ __AFL_FUZZ_INIT();
|
|||
|
||||
int main(int argc, char *argv[]) {
|
||||
__AFL_INIT();
|
||||
uvm32_state_t vmst;
|
||||
uvm32_evt_t evt;
|
||||
|
||||
uvm32_init(&vmst);
|
||||
unsigned char *rom = __AFL_FUZZ_TESTCASE_BUF;
|
||||
while (__AFL_LOOP(10000)) {
|
||||
uvm32_load(&vmst, rom, __AFL_FUZZ_TESTCASE_LEN);
|
||||
uvm32_run(&vmst, &evt, 1000);
|
||||
uvm32_state_t *vmst = malloc(sizeof(uvm32_state_t));
|
||||
|
||||
while (__AFL_LOOP(100000)) {
|
||||
memset(vmst, 0x00, sizeof(uvm32_state_t));
|
||||
uvm32_init(vmst);
|
||||
unsigned char *rom = __AFL_FUZZ_TESTCASE_BUF;
|
||||
uvm32_load(vmst, rom, __AFL_FUZZ_TESTCASE_LEN);
|
||||
memset(&evt, 0x00, sizeof(evt));
|
||||
for (int i=0;i<10;i++) {
|
||||
uvm32_run(vmst, &evt, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue