Re: [Outreachy PATCH v6 1/3] environment: stop storing `core.attributesFile` globally
- From
Bello Olamide <belkid98@gmail.com>
- Date
- Feb 10, 2026, 08:40 UTC
- Message-ID
- <CAD=f0L8jeLE_Zy-5aW+DZrM6JNgbwRcgWCdW1f7SJ5uG_2R-yA@mail.gmail.com>
- In-Reply-To
- <88570b6c-2ff3-416f-b63f-2fb7c80c5af8@gmail.com>
On Sun, 8 Feb 2026 at 12:14, Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 46 quoted lines
> > > > On 07/02/2026 01:14, Junio C Hamano wrote: > > Olamide Caleb Bello <belkid98@gmail.com> writes: > > > >> Suggested-by: Phillip Wood <phillip.wood123@gmail.com> > >> Mentored-by: Christian Couder <christian.couder@gmail.com> > >> Mentored-by: Usman Akinyemi <usmanakinyemi202@gmail.com> > >> Helped-by: Junio C Hamano <gitster@pobox.com> > >> Signed-off-by: Olamide Caleb Bello <belkid98@gmail.com> > >> --- > >> attr.c | 7 ++++--- > >> environment.c | 12 +++++++++--- > >> environment.h | 11 ++++++++++- > >> repository.c | 12 ++++++++++++ > >> repository.h | 7 +++++++ > >> 5 files changed, 42 insertions(+), 7 deletions(-) > > > > I bisected our recent CI failures that break fuzz smoke test down to > > this change. > > The documentation for the LibFuzzer [1] notes > > * The fuzzing engine will execute the fuzz target many times with > different inputs in the same process. > > and the first thing that the callback in oss-fuzz/fuzz-commit-graph.c > does is > > initialize_repository(the_repository); > > so I think the problem is that the assumption that a process will only > initialize "the_repository" once is incompatible with the way LibFuzzer > works. Maybe we should add > > memset(the_repository, 0, sizeof(*the_repository)); > > before the call in initialize_repository()? > > Thanks > > Phillip > > [1] https://llvm.org/docs/LibFuzzer.html >
Hello Phillip, thank you for your reviews and assistance so far.
So I moved the code memset(the_repository, 0, sizeof(*the_repository)) into the fuzz-commit-graph.c Fuzzer test before the call to initialize_repository(). This made the fuzzer smoke tests pass.
But the line below,
`if (repo != the_repository)
BUG("trying to read config from wrong repository instance")`,
in the repo_config_values() accessor function
to make sure we are reading the config_values only for the_repository ,
makes many tests fail.I believe this is because repo_init() calls initialize_repository() and repo_init() is also called in repo_submodule_init() when creating a subrepo from a super project, and this subrepo passed to repo_init() is not the_repository.