Skip to content

Commit

Permalink
[Java] Add default for project source (#1547)
Browse files Browse the repository at this point in the history
Add default for project source

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
  • Loading branch information
arthurscchan authored Jun 5, 2024
1 parent 4b761b3 commit a94e95b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion frontends/java/oss-fuzz-main.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ def run_introspector_frontend(target_class, jar_set):
package_name = os.getenv("TARGET_PACKAGE_PREFIX")
if not package_name:
package_name = "ALL"

src_path = os.getenv("SRC", None)
out_path = os.getenv("OUT", None)
if src_path and out_path:
src_dir = os.path.join(out_path, src_path)
else:
src_dir = "NULL"

cmd = [
"java",
"-Xmx6144M",
Expand All @@ -126,7 +134,7 @@ def run_introspector_frontend(target_class, jar_set):
"fuzzerTestOneInput", # entry method
package_name, # target package prefix
"\"<clinit>:finalize:main\"", # exclude method list
"NULL", # source directory
src_dir, # source directory
"False", # Auto-fuzz switch
"""===jdk.*:java.*:javax.*:sun.*:sunw.*:com.sun.*:com.ibm.*:\
com.apple.*:apple.awt.*===DEFAULT""" # include prefix === exclude prefix === sink functions
Expand Down

0 comments on commit a94e95b

Please sign in to comment.