git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/4] cleanup: use internal memory allocation wrapper functions everywhere

From
Brandon Casey <drafnel@gmail.com>
Date
Sep 15, 2011, 15:39 UTC
Message-ID
<CA+sFfMdVntk+U13UeMO=k1SCKJGhPfTpC9_i9kFOkbUJXrF-qg@mail.gmail.com>
In-Reply-To
<4E71A0C7.8080602@viscovery.net>
On Thu, Sep 15, 2011 at 1:52 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 19 quoted lines
> 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
Previous: Johannes SixtNext: Brandon Casey
Message 5 of 19 in “Honor core.ignorecase for attribute patterns”
  1. 0/4 Honor core.ignorecase for attribute patternsBrandon Casey, Sep 15, 2011
  2. 1/4 attr.c: avoid inappropriate access to strbuf "buf" memberBrandon Casey, Sep 15, 2011
  3. 2/4 cleanup: use internal memory allocation wrapper functions everywhereBrandon Casey, Sep 15, 2011
  4. Johannes SixtSep 15, 2011
  5. Brandon CaseySep 15, 2011
  6. 3/4 builtin/mv.c: plug miniscule memory leakBrandon Casey, Sep 15, 2011
  7. 4/4 attr.c: respect core.ignorecase when matching attribute patternsBrandon Casey, Sep 15, 2011
  8. Junio C HamanoSep 15, 2011
  9. Junio C HamanoSep 15, 2011
  10. Brandon CaseySep 15, 2011
  11. Jeff KingSep 15, 2011
  12. Brandon CaseySep 15, 2011
  13. Brandon CaseyOct 6, 2011
  14. Johannes SixtOct 6, 2011
  15. Alexey ShumkinOct 6, 2011
  16. Brandon CaseyOct 6, 2011
  17. Erik Faye-LundOct 6, 2011
  18. Erik Faye-LundOct 6, 2011
  19. Brandon CaseyOct 6, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.