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

Re: Porting git to HP NonStop

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 22, 2012, 18:26 UTC
Message-ID
<7vy5l67pgj.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CA+sFfMedWVAgqvHS67V6L=ROjdN6M3p3pYTUDk98xgozX4djEw@mail.gmail.com>
Brandon Casey <drafnel@gmail.com> writes:
Show 23 quoted lines
> On Wed, Aug 22, 2012 at 10:41 AM, Johannes Sixt <j6t@kdbg.org> wrote:
>> Am 22.08.2012 19:00, schrieb Brandon Casey:
>>>  So I think the body of [compat_mkdir] can become
>>> something like:
>>>
>>>    if (len && dir[len-1] == '/')
>>>        dir = tmp_dir = xstrndup(dir, len-1);
>>
>> Don't use x* wrappers in the compat layer, at least not those that
>> allocate memory: They behave unpredictably due to try_to_free_routine
>> and may lead to recursive invocations.
>
> I thought that rule only applied to die handlers.  i.e. don't use the
> x* wrappers to allocate memory in a die handler like
> compat/win32/syslog.c.  At least that's what I wrote in 040a6551 when
> you pointed out this issue back then.
>
> Admittedly, it could get pretty sticky trying to trace the die
> handlers to ensure they don't invoke your new compat/ function.  So,
> yeah, adopting this rule of not using x* wrappers that allocate memory
> in compat/ generally seems like a good idea.
>
> Should we also try to detect recursive invocation of die and friends?
> In theory recursion could be triggered by any die handler that makes
> use of a code path that calls an x* wrapper that allocates memory,
> couldn't it?
Correct, but at that point we will end up dying anyway, so...
Previous: Junio C HamanoNext: Joachim Schmitz
Message 35 of 39 in “RE: Porting git to HP NonStop”
  1. Joachim SchmitzAug 10, 2012
  2. Shawn PearceAug 10, 2012
  3. Joachim SchmitzAug 10, 2012
  4. Shawn PearceAug 10, 2012
  5. Joachim SchmitzAug 19, 2012
  6. Junio C HamanoAug 19, 2012
  7. Joachim SchmitzAug 20, 2012
  8. Junio C HamanoAug 20, 2012
  9. Joachim SchmitzAug 20, 2012
  10. Junio C HamanoAug 20, 2012
  11. Joachim SchmitzAug 22, 2012
  12. Brandon CaseyAug 22, 2012
  13. Brandon CaseyAug 22, 2012
  14. Joachim SchmitzAug 22, 2012
  15. Brandon CaseyAug 22, 2012
  16. Joachim SchmitzAug 22, 2012
  17. Junio C HamanoAug 22, 2012
  18. Joachim SchmitzAug 22, 2012
  19. Junio C HamanoAug 22, 2012
  20. Joachim SchmitzAug 22, 2012
  21. Johannes SixtAug 22, 2012
  22. Joachim SchmitzAug 22, 2012
  23. Johannes SixtAug 22, 2012
  24. Joachim SchmitzAug 22, 2012
  25. Brandon CaseyAug 22, 2012
  26. Brandon CaseyAug 22, 2012
  27. Junio C HamanoAug 22, 2012
  28. Brandon CaseyAug 22, 2012
  29. Joachim SchmitzAug 22, 2012
  30. Junio C HamanoAug 22, 2012
  31. Joachim SchmitzAug 22, 2012
  32. Junio C HamanoAug 22, 2012
  33. Joachim SchmitzAug 22, 2012
  34. Junio C HamanoAug 22, 2012
  35. Junio C HamanoAug 22, 2012
  36. Joachim SchmitzAug 10, 2012
  37. Johannes SixtAug 11, 2012
  38. Joachim SchmitzAug 14, 2012
  39. Junio C HamanoAug 14, 2012

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.