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

Re: [PATCH v3] http API: fix dangling pointer issue noted by GCC 12.0

From
Taylor Blau <me@ttaylorr.com>
Date
Mar 25, 2022, 18:11 UTC
Message-ID
<Yj4FwuyEW0b5ImEC@nand.local>
In-Reply-To
<patch-v3-1.1-69190804c67-20220325T143322Z-avarab@gmail.com>
On Fri, Mar 25, 2022 at 03:34:49PM +0100, Ævar Arnfjörð Bjarmason wrote:
> This isn't the only caller that assigns to "slot->finished", see see
s/see see/see ?
Show 7 quoted lines
> the assignments in http-walker.c:process_alternates_response() and
> http.c:finish_active_slot().
>
> But those assignments are both to the pointer to our local variable
> here, so this fix is correct. The only way that code in http-walker.c
> could have done its assignments is to the pointer to this specific
> variable.

Got it; this is the key piece that I was missing in my earlier review. Sorry about that, this looks completely safe to me now.

Thanks, Taylor

Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 11 of 15 in “http API: fix dangling pointer issue noted by GCC 12.0”
  1. http API: fix dangling pointer issue noted by GCC 12.0Ævar Arnfjörð Bjarmason, Jan 26, 2022
  2. Taylor BlauJan 26, 2022
  3. Junio C HamanoJan 27, 2022
  4. Junio C HamanoJan 27, 2022
  5. Ævar Arnfjörð BjarmasonJan 27, 2022
  6. Junio C HamanoJan 27, 2022
  7. http API: fix dangling pointer issue noted by GCC 12.0Ævar Arnfjörð Bjarmason, Feb 25, 2022
  8. Junio C HamanoFeb 25, 2022
  9. Taylor BlauFeb 26, 2022
  10. http API: fix dangling pointer issue noted by GCC 12.0Ævar Arnfjörð Bjarmason, Mar 25, 2022
  11. Taylor BlauMar 25, 2022
  12. Junio C HamanoMar 26, 2022
  13. Ævar Arnfjörð BjarmasonApr 14, 2022
  14. Junio C HamanoApr 14, 2022
  15. Ævar Arnfjörð BjarmasonApr 15, 2022

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.