From 5c64e66fa23bf18c5e9c63a922be0be48aec75f9 Mon Sep 17 00:00:00 2001 From: Zhaolin Deng <zhaolin.deng@student.unimelb.edu.au> Date: Sat, 13 Oct 2018 14:35:15 +0800 Subject: [PATCH] update fuzzer --- fuzzer/Fuzzer.java | 2 +- src/machine-vuln4.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fuzzer/Fuzzer.java b/fuzzer/Fuzzer.java index 7e80788..039f239 100644 --- a/fuzzer/Fuzzer.java +++ b/fuzzer/Fuzzer.java @@ -31,7 +31,7 @@ public class Fuzzer { pw.println("ADD R"+(x+1)+" R"+x +" R"+x); }; pw.println("RET R31");*/ - pw.println("JZ R0 -2"); + //pw.println("JZ R0 -2"); pw.println("RET R0"); }catch (Exception e){ diff --git a/src/machine-vuln4.c b/src/machine-vuln4.c index 28dd68a..46b0e2e 100644 --- a/src/machine-vuln4.c +++ b/src/machine-vuln4.c @@ -57,7 +57,7 @@ unsigned int count = 0; /* counts number of instructions executed so far */ static void machine_init(void){ memory = malloc(sizeof(int32_t)*MEMORY_SIZE); regs = malloc(sizeof(int32_t)*NUM_REGS); - //memset(memory,0,sizeof(int32_t)*MEMORY_SIZE); + //Zmemset(memory,0,sizeof(int32_t)*MEMORY_SIZE); //memset(regs,0,sizeof(int32_t)*NUM_REGS); count = 0; } @@ -385,7 +385,7 @@ int execute(const unsigned int progLength, const int cycles, int32_t * res){ /* this should never overflow given constraints on both pc and offs */ pc = pc + offs; count++; - // continue; /* avoid default increment of pc below */ + continue; /* avoid default increment of pc below */ }else{ return -1; } -- GitLab