git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>, git <git@vger.kernel.org>
Subject: Re: [PATCH] repository: fix free problem with repo_clear(the_repository)
Date: Thu, 10 May 2018 18:27:51 +0900	[thread overview]
Message-ID: <xmqqbmdnkgh4.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAGZ79kbFiULj1NJARm6ObYrqv_Fu+U2sb8h_sNJwdWur+JqrvQ@mail.gmail.com> (Stefan Beller's message of "Wed, 9 May 2018 10:50:00 -0700")

Stefan Beller <sbeller@google.com> writes:

> So this would go with the latest sb/object-store-alloc ?
>
> My impression was that we never call repo_clear() on
> the_repository, which would allow us to special case
> the_repository further just as I did in v2 of that series[1] by
> having static allocations for certain objects in case of \
> the_repository.
>
> [1] https://public-inbox.org/git/20180501213403.14643-14-sbeller@google.com/
>
> We could just deal with all the exceptions, but that makes repo_clear
> ugly IMHO.

So perhaps

         void repo_clear(...)
         {
        +       if (repo == the_repository)
        +               BUG("repo_clear() called on the repository");
                ...

or something?

  parent reply	other threads:[~2018-05-10  9:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 17:04 [PATCH] repository: fix free problem with repo_clear(the_repository) Nguyễn Thái Ngọc Duy
2018-05-09 17:17 ` Brandon Williams
2018-05-09 17:42 ` Elijah Newren
2018-05-09 17:54   ` Duy Nguyen
2018-05-09 17:50 ` Stefan Beller
2018-05-09 18:00   ` Duy Nguyen
2018-05-09 18:09     ` Stefan Beller
2018-05-10  6:18     ` Duy Nguyen
2018-05-10  9:27   ` Junio C Hamano [this message]
2018-05-10 16:34     ` Stefan Beller
2018-05-10  6:13 ` [PATCH v2] " Nguyễn Thái Ngọc Duy

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbmdnkgh4.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=sbeller@google.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).