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

Re: [PATCH] async_die_is_recursing: fix use of pthread_getspecific for Fedora

From
Jeff King <peff@peff.net>
Date
Nov 4, 2021, 05:56 UTC
Message-ID
<YYN1+tonXZgL9dDa@coredump.intra.peff.net>
In-Reply-To
<CAPUEspjnu8ySiM5damzCoPWhLv+azZFxsZun5Lztjwd-fDopaw@mail.gmail.com>
On Wed, Nov 03, 2021 at 08:20:56PM -0700, Carlo Arenas wrote:
Show 8 quoted lines
> Agree it is OK as a minimal fix, but also AFAIK nothing is really
> stuck either, so something as simple as :
> 
>   s/&ret/&async_die_counter/g
> 
> Would make it as minimal, and less likely to trigger something else in
> the future (I am surprised nothing warns about local variables being
> used out of scope).

It's in scope when we call the function. The potential for bugs only happens because we know pthread_setspecific() is going to hold on to it. So the compiler complaining would imply that it knows the semantics of the pthread function.

-Peff
Previous: Carlo ArenasNext: Victoria Dye via GitGitGadget
Message 5 of 15 in “async_die_is_recursing: fix use of pthread_getspecific for Fedora”
  1. async_die_is_recursing: fix use of pthread_getspecific for FedoraVictoria Dye via GitGitGadget, Nov 4, 2021
  2. Carlo ArenasNov 4, 2021
  3. Jeff KingNov 4, 2021
  4. Carlo ArenasNov 4, 2021
  5. Jeff KingNov 4, 2021
  6. async_die_is_recursing: work around GCC v11.x issue on FedoraVictoria Dye via GitGitGadget, Nov 4, 2021
  7. Jeff KingNov 4, 2021
  8. Junio C HamanoNov 4, 2021
  9. Ævar Arnfjörð BjarmasonNov 4, 2021
  10. Derrick StoleeNov 4, 2021
  11. Junio C HamanoNov 4, 2021
  12. Junio C HamanoNov 5, 2021
  13. Johannes SchindelinNov 4, 2021
  14. Carlo ArenasNov 4, 2021
  15. Johannes SchindelinNov 4, 2021

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.