Skip to content

Commit

Permalink
More logs to help debug no binary
Browse files Browse the repository at this point in the history
  • Loading branch information
DonggeLiu committed Aug 25, 2024
1 parent c82ace4 commit 6d972e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/fuzzer_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ def dockerfiles(self):
def get_fuzz_target_binary(search_directory: str,
fuzz_target_name: str) -> Optional[str]:
"""Return target binary path."""
logs.info(f'Searching for fuzz target binary named {fuzz_target_name} under'
f' directory {search_directory}')
logs.info(f'Search diretory {os.path.abspath(search_directory)} exists: '
f'{os.path.exists(os.path.abspath(search_directory))}')
logs.info(f'list Search diretory {search_directory}: '
f'{os.listdir(search_directory)}')
if fuzz_target_name:
fuzz_target_binary = os.path.join(search_directory, fuzz_target_name)
if os.path.exists(fuzz_target_binary):
Expand Down
2 changes: 2 additions & 0 deletions experiment/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ def run_fuzzer(max_total_time, log_filename):
input_corpus = environment.get('SEED_CORPUS_DIR')
output_corpus = os.environ['OUTPUT_CORPUS_DIR']
fuzz_target_name = environment.get('FUZZ_TARGET')
logs.info('all ENV VAR '
f'{[f"{key}: {value}" for key, value in os.environ.items()]}')
target_binary = fuzzer_utils.get_fuzz_target_binary(FUZZ_TARGET_DIR,
fuzz_target_name)
if not target_binary:
Expand Down

0 comments on commit 6d972e8

Please sign in to comment.