Skip to content

Fix Several Bugs in the fuzz_submodule Causing a lot of False Alarms in the OSS-Fuzz Bug Tracker #1950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix order of environment setup and git module import
The environment setup must happen before the `git` module is imported,
otherwise GitPython won't be able to find the Git executable and raise
an exception that causes the ClusterFuzz fuzzer runs to fail.
  • Loading branch information
DaveLak committed Aug 9, 2024
commit 2ed33345667706c5755708e88c989ede06f2414f
2 changes: 1 addition & 1 deletion fuzzing/fuzz-targets/fuzz_submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import tempfile
from configparser import ParsingError
from git import Repo, GitCommandError, InvalidGitRepositoryError
from utils import (
setup_git_environment,
handle_exception,
Expand All @@ -12,6 +11,7 @@

# Setup the git environment
setup_git_environment()
from git import Repo, GitCommandError, InvalidGitRepositoryError


def TestOneInput(data):
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ lint.unfixable = [
"test/**" = [
"B018", # useless-expression
]
"fuzzing/fuzz-targets/**" = [
"E402", # environment setup must happen before the `git` module is imported, thus cannot happen at top of file
]


[tool.codespell]
ignore-words-list="gud,doesnt"
Expand Down
Loading