Skip to content

Commit

Permalink
[Java-Integration] : Push in and test on java-callgraph component (#539)
Browse files Browse the repository at this point in the history
* Push in and test on java-callgraph component

Signed-off-by: Arthur Chan <[email protected]>

* Add jazzer for compilation of FuzzDataProvider

Signed-off-by: Arthur Chan <[email protected]>

* Add in base jar and build script for java testcases

Signed-off-by: Arthur Chan <[email protected]>

* Save jar result for testcases

Signed-off-by: Arthur Chan <[email protected]>

Signed-off-by: Arthur Chan <[email protected]>
  • Loading branch information
arthurscchan authored Oct 6, 2022
1 parent 25e1672 commit b84513c
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontends/java/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java-callgraph
12 changes: 12 additions & 0 deletions frontends/java/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Java backend

This is work in progress.

Depends on OpenJDK+JRE 11.0 or later
Depends on https://github.com/gousiosg/java-callgraph, which has compiled and packed as a jar file (javacg-0.1-SNAPSHOT-static.jar)

It requires the target source code compiled and packed into jar file.

The resulting call tree are shown in stdout.

Example of running: `java -jar javacg-0.1-SNAPSHOT-static.jar <TARGET_JAR_FILE>`
Binary file added frontends/java/javacg-0.1-SNAPSHOT-static.jar
Binary file not shown.
Binary file added frontends/java/jazzer_api_deploy.jar
Binary file not shown.
Binary file added frontends/java/test-jar/test1.jar
Binary file not shown.
Binary file added frontends/java/test-jar/test2.jar
Binary file not shown.
Binary file added frontends/java/test-jar/test3.jar
Binary file not shown.
Binary file added frontends/java/test-jar/test4.jar
Binary file not shown.
Binary file added frontends/java/test-jar/test5.jar
Binary file not shown.
Binary file added tests/java/jazzer_api_deploy.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions tests/java/test1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.class
*.jar
7 changes: 7 additions & 0 deletions tests/java/test1/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

rm -f ./*.class
rm -f ./*.jar
javac -cp ../jazzer_api_deploy.jar *.java
jar cfv test1.jar *.class
rm -f ./*.class
2 changes: 2 additions & 0 deletions tests/java/test2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.class
*.jar
7 changes: 7 additions & 0 deletions tests/java/test2/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

rm -f ./*.class
rm -f ./*.jar
javac -cp ../jazzer_api_deploy.jar *.java
jar cfv test2.jar *.class
rm -f ./*.class
2 changes: 2 additions & 0 deletions tests/java/test3/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.class
*.jar
7 changes: 7 additions & 0 deletions tests/java/test3/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

rm -f ./*.class
rm -f ./*.jar
javac -cp ../jazzer_api_deploy.jar *.java
jar cfv test3.jar *.class
rm -f ./*.class
2 changes: 2 additions & 0 deletions tests/java/test4/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.class
*.jar
7 changes: 7 additions & 0 deletions tests/java/test4/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

rm -f ./*.class
rm -f ./*.jar
javac -cp ../jazzer_api_deploy.jar *.java
jar cfv test4.jar *.class
rm -f ./*.class
2 changes: 2 additions & 0 deletions tests/java/test5/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.class
*.jar
7 changes: 7 additions & 0 deletions tests/java/test5/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

rm -f ./*.class
rm -f ./*.jar
javac -cp ../jazzer_api_deploy.jar *.java
jar cfv test5.jar *.class
rm -f ./*.class

0 comments on commit b84513c

Please sign in to comment.