Skip to content

add fuzz_runner_pool.py, valid_projects.txt, fail_projects in the oss-fuzz repo's python-branch#19

Merged
joyguoguo merged 15 commits into
mainfrom
python-branch
Jul 22, 2025
Merged

add fuzz_runner_pool.py, valid_projects.txt, fail_projects in the oss-fuzz repo's python-branch#19
joyguoguo merged 15 commits into
mainfrom
python-branch

Conversation

@joyguoguo
Copy link
Copy Markdown
Contributor

  • fuzz_runner_pool.py: Batch fuzz-test on items in valid_projects.txt
  • valid_projects.txt: List of python projects in the original oss-fuzz projects folder
  • fail_projects: the list of projects that failed the test.

@joyguoguo joyguoguo requested a review from EYH0602 July 21, 2025 07:04
@EYH0602
Copy link
Copy Markdown
Member

EYH0602 commented Jul 21, 2025

Please also remove your *.sh files from the project root.

Also, where are the new files?

@EYH0602
Copy link
Copy Markdown
Member

EYH0602 commented Jul 21, 2025

@joyguoguo Please put valid_projects.txt in data/ and *.py in fuzz/. Please split fuzz_runner_pool.py into two files: build_oss_fuzz.py and run_fuzz_target.py with their corresponding functionality.

@joyguoguo
Copy link
Copy Markdown
Contributor Author

I have modified it as required, please review it

@joyguoguo
Copy link
Copy Markdown
Contributor Author

I have modified it as required, please review it🙂

@joyguoguo joyguoguo merged commit c594f6c into main Jul 22, 2025
3 checks passed
Comment thread fuzz/build_oss_fuzz.py
timestamp = datetime.now().strftime("%Y%m%d%H%M%S")
return LOG_DIR / f"build_{project_name}_{timestamp}.log"

def log_and_print(message: str, log_file: Path, to_stdout: bool = True):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the logging module, see examples in other files.

Comment thread fuzz/build_oss_fuzz.py
process = subprocess.Popen(
f"yes | {cmd}", # Auto-confirm all prompts
shell=True,
stdout=subprocess.PIPE,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't really need to keep the build log for our experiments.

Comment thread fuzz/build_oss_fuzz.py
return True
log_and_print(f"❌ Command failed (exit code: {exit_code})", log_file)
return False
except Exception as e:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When catching exceptions, please be as precise as possible (i.e. know what may fail).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants