From: Brandon Casey <drafnel@gmail.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: peff@peff.net, git@vger.kernel.org, gitster@pobox.com,
sunshine@sunshineco.com, bharrosh@panasas.com,
trast@student.ethz.ch, zapped@mail.ru
Subject: Re: [PATCH 2/4] cleanup: use internal memory allocation wrapper functions everywhere
Date: Thu, 15 Sep 2011 10:39:50 -0500 [thread overview]
Message-ID: <CA+sFfMdVntk+U13UeMO=k1SCKJGhPfTpC9_i9kFOkbUJXrF-qg@mail.gmail.com> (raw)
In-Reply-To: <4E71A0C7.8080602@viscovery.net>
On Thu, Sep 15, 2011 at 1:52 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> Am 9/15/2011 3:59, schrieb Brandon Casey:
>> The "x"-prefixed versions of strdup, malloc, etc. will check whether the
>> allocation was successful and terminate the process otherwise.
>>
>> A few uses of malloc were left alone since they already implemented a
>> graceful path of failure or were in a quasi external library like xdiff.
>>
>> Signed-off-by: Brandon Casey <drafnel@gmail.com>
>> ---
>> ...
>> compat/mingw.c | 2 +-
>> compat/qsort.c | 2 +-
>> compat/win32/syslog.c | 2 +-
>
> There is a danger that the high-level die() routine (which is used by the
> x-wrappers) uses one of the low-level compat/ routines. IOW, in the case
> of errors, recursion might occur. Therefore, I would prefer that the
> compat/ routines do their own error reporting (preferably via return
> values and errno).
Thanks. Will do.
-Brandon
next prev parent reply other threads:[~2011-09-15 15:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5XXEFw0WjtXKd9dpXSxpkskCcgVyG9Db1_zzVSEBNey-kpXSBbmQfYaxZ2Szg6Pbck6hZZTQ5hHzBwG4rhKYXshrdmveEFLPZ9W0V8P_lw@cipher.nrlssc.navy.mil>
2011-09-15 1:59 ` [PATCH 0/4] Honor core.ignorecase for attribute patterns Brandon Casey
2011-09-15 1:59 ` [PATCH 1/4] attr.c: avoid inappropriate access to strbuf "buf" member Brandon Casey
2011-09-15 1:59 ` [PATCH 2/4] cleanup: use internal memory allocation wrapper functions everywhere Brandon Casey
2011-09-15 6:52 ` Johannes Sixt
2011-09-15 15:39 ` Brandon Casey [this message]
[not found] ` <CA+sFfMf73K3yv_5K633DKOsVufMV6rTjd+SSunq4sBikt4jCsg@mail.gmail.com>
2011-10-06 2:00 ` Brandon Casey
2011-10-06 6:17 ` Johannes Sixt
2011-10-06 7:01 ` Alexey Shumkin
2011-10-06 16:14 ` Brandon Casey
2011-10-06 16:50 ` Erik Faye-Lund
2011-10-06 16:52 ` Erik Faye-Lund
2011-10-06 17:17 ` Brandon Casey
2011-09-15 1:59 ` [PATCH 3/4] builtin/mv.c: plug miniscule memory leak Brandon Casey
2011-09-15 1:59 ` [PATCH 4/4] attr.c: respect core.ignorecase when matching attribute patterns Brandon Casey
2011-09-15 4:01 ` Junio C Hamano
2011-09-15 4:06 ` Junio C Hamano
2011-09-15 15:38 ` Brandon Casey
2011-09-15 18:12 ` [PATCH 0/4] Honor core.ignorecase for " Jeff King
2011-09-15 20:28 ` Brandon Casey
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='CA+sFfMdVntk+U13UeMO=k1SCKJGhPfTpC9_i9kFOkbUJXrF-qg@mail.gmail.com' \
--to=drafnel@gmail.com \
--cc=bharrosh@panasas.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.com \
--cc=trast@student.ethz.ch \
--cc=zapped@mail.ru \
/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).