Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swen90006-a2-2018
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Callum Bradshaw
swen90006-a2-2018
Commits
0e1b4df5
Commit
0e1b4df5
authored
Oct 13, 2018
by
Zhaolin Deng
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
0473a5f9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
fuzzer/Fuzzer.java
+3
-2
3 additions, 2 deletions
fuzzer/Fuzzer.java
src/machine-vuln4.c
+3
-3
3 additions, 3 deletions
src/machine-vuln4.c
with
6 additions
and
5 deletions
fuzzer/Fuzzer.java
+
3
−
2
View file @
0e1b4df5
...
@@ -24,13 +24,14 @@ public class Fuzzer {
...
@@ -24,13 +24,14 @@ public class Fuzzer {
}
}
pw.println("RET R0");
pw.println("RET R0");
*/
*/
/
/
pw.println("RET R-1");
/
*
pw.println("RET R-1");
pw.println("MOV R0 200");
pw.println("MOV R0 200");
//pw.println("DIV R0 R0 R1");
//pw.println("DIV R0 R0 R1");
for(int x=0;x<31;x++){
for(int x=0;x<31;x++){
pw.println("ADD R"+(x+1)+" R"+x +" R"+x);
pw.println("ADD R"+(x+1)+" R"+x +" R"+x);
};
};
pw
.
println
(
"RET R31"
);
pw.println("RET R31");*/
pw
.
println
(
"RET R0"
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
e
.
printStackTrace
(
System
.
err
);
e
.
printStackTrace
(
System
.
err
);
System
.
exit
(
1
);
System
.
exit
(
1
);
...
...
This diff is collapsed.
Click to expand it.
src/machine-vuln4.c
+
3
−
3
View file @
0e1b4df5
...
@@ -57,14 +57,14 @@ unsigned int count = 0; /* counts number of instructions executed so far */
...
@@ -57,14 +57,14 @@ unsigned int count = 0; /* counts number of instructions executed so far */
static
void
machine_init
(
void
){
static
void
machine_init
(
void
){
memory
=
malloc
(
sizeof
(
int32_t
)
*
MEMORY_SIZE
);
memory
=
malloc
(
sizeof
(
int32_t
)
*
MEMORY_SIZE
);
regs
=
malloc
(
sizeof
(
int32_t
)
*
NUM_REGS
);
regs
=
malloc
(
sizeof
(
int32_t
)
*
NUM_REGS
);
memset
(
memory
,
0
,
sizeof
(
int32_t
)
*
MEMORY_SIZE
);
//
memset(memory,0,sizeof(int32_t)*MEMORY_SIZE);
memset
(
regs
,
0
,
sizeof
(
int32_t
)
*
NUM_REGS
);
//
memset(regs,0,sizeof(int32_t)*NUM_REGS);
count
=
0
;
count
=
0
;
}
}
static
void
machine_free
(
void
){
static
void
machine_free
(
void
){
free
(
memory
);
free
(
memory
);
//
free(regs);
free
(
regs
);
}
}
static
void
do_add
(
unsigned
int
dest
,
unsigned
int
src1
,
unsigned
int
src2
)
static
void
do_add
(
unsigned
int
dest
,
unsigned
int
src1
,
unsigned
int
src2
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment