From: Junio C Hamano <gitster@pobox.com>
To: "Arthur Chan via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Arthur Chan <arthur.chan@adalogics.com>
Cc: Josh Steadmon <steadmon@google.com>
Cc: David Korczynski <david@adalogics.com>
Subject: Re: [PATCH] fuzz: reorganise the path for existing oss-fuzz fuzzers
Date: Fri, 16 Sep 2022 14:55:57 -0700 [thread overview]
Message-ID: <xmqqo7vff0gi.fsf@gitster.g> (raw)
In-Reply-To: pull.1353.git.1663355009333.gitgitgadget@gmail.com
"Arthur Chan via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Arthur Chan <arthur.chan@adalogics.com>
>
> This patch is aimed to provide a better organisation for oss-fuzz
> fuzzers, allowing more fuzzers for the git project to be added
> in a later development.
>
> A new folder oss-fuzz has been created and existing fuzzers are
> moved into the new folders. Makefile has been fixed accordingly.
"folder" -> "directory" everywhere.
> Makefile | 6 +++---
> fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c | 0
> fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c | 0
> fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c | 0
> 4 files changed, 3 insertions(+), 3 deletions(-)
> rename fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c (100%)
> rename fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c (100%)
> rename fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c (100%)
It is curious that we do not have any changes to .gitignore
patterns.
$ git grep fuzz .gitignore Makefile
.gitignore:/fuzz-commit-graph
.gitignore:/fuzz_corpora
.gitignore:/fuzz-pack-headers
.gitignore:/fuzz-pack-idx
Makefile:FUZZ_OBJS += fuzz-commit-graph.o
Makefile:FUZZ_OBJS += fuzz-pack-headers.o
Makefile:FUZZ_OBJS += fuzz-pack-idx.o
Makefile:.PHONY: fuzz-objs
Makefile:fuzz-objs: $(FUZZ_OBJS)
Makefile:# Always build fuzz objects even if not testing, to prevent bit-rot.
Makefile:# Building fuzz targets generally requires a special set of compiler flags that
Makefile:# CFLAGS="-fsanitize=fuzzer-no-link,address" \
Makefile:# LIB_FUZZING_ENGINE="-fsanitize=fuzzer" \
Makefile:# fuzz-all
Makefile:.PHONY: fuzz-all
Makefile:fuzz-all: $(FUZZ_PROGRAMS)
I do not know what "fuzz_corpora" is, which step in build creates
it, and why we do not have to bother removing it in "make clean",
the last of which is not the fault of this patch, but I suspect that
at least other three existing entries that name $(FUZZ_PROGRAMS)
need to be updated, because ...
> diff --git a/Makefile b/Makefile
> index d9247ead45b..2d56aae7a1d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -686,9 +686,9 @@ SCRIPTS = $(SCRIPT_SH_GEN) \
>
> ETAGS_TARGET = TAGS
>
> -FUZZ_OBJS += fuzz-commit-graph.o
> -FUZZ_OBJS += fuzz-pack-headers.o
> -FUZZ_OBJS += fuzz-pack-idx.o
> +FUZZ_OBJS += oss-fuzz/fuzz-commit-graph.o
> +FUZZ_OBJS += oss-fuzz/fuzz-pack-headers.o
> +FUZZ_OBJS += oss-fuzz/fuzz-pack-idx.o
... FUZZ_OBJS now live in the oss-fuzz/ directory, and Makefile has
FUZZ_PROGRAMS += $(patsubst %.o,%,$(FUZZ_OBJS))
$(FUZZ_PROGRAMS): all
$(QUIET_LINK)$(CXX) $(FUZZ_CXXFLAGS) $(LIB_OBJS) $(BUILTIN_OBJS) \
$(XDIFF_OBJS) $(EXTLIBS) git.o $@.o $(LIB_FUZZING_ENGINE) -o $@
neither of which has been touched by the patch, so presumably the
executables are now created in the oss-fuzz/ directory as well, and
they are what .gitignore should be listing, right?
Also, compiling the exectuable files would not be the end of the
story, right? Do folks (like test script, makefile targets and CI
recipes) who used to run ./fuzz-commit-graph need to be told that
they now need to run oss-fuzz/fuzz-commit-graph instead? They may
not be inside my tree, but what's the best way to inform them? Add
entries to release notes (not asking you to add one immediately ---
asking you to help formulating the plans).
Thanks.
next prev parent reply other threads:[~2022-09-16 21:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 19:03 [PATCH] fuzz: reorganise the path for existing oss-fuzz fuzzers Arthur Chan via GitGitGadget
2022-09-16 21:55 ` Junio C Hamano [this message]
2022-09-17 0:45 ` Arthur Chan
2022-09-17 23:28 ` [PATCH v2] " Arthur Chan via GitGitGadget
2022-09-18 23:08 ` [PATCH v3] " Arthur Chan via GitGitGadget
2022-09-19 11:10 ` Ævar Arnfjörð Bjarmason
2022-09-19 14:36 ` [PATCH v4] " Arthur Chan via GitGitGadget
2022-09-19 16:38 ` Junio C Hamano
2022-09-19 16:40 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqo7vff0gi.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=arthur.chan@adalogics.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).