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

Re: [Bug] hook: -Wanalyzer-deref-before-check warning in run_hooks_opt

From
Ben Knoble <ben.knoble@gmail.com>
Date
Jan 9, 2026, 16:02 UTC
Message-ID
<7BD989A0-30B1-418E-9257-1731724DCB72@gmail.com>
In-Reply-To
<aWDm_n2YgjvaRmpV@pks.im>
> Le 9 janv. 2026 à 06:31, Patrick Steinhardt <ps@pks.im> a écrit :
[snip]
> And we'd reliably
> segfault anyway if we dereference the pointer, even though we would not
> get a clean error message. Not sure whether that really is worth the
> hassle though.
I think you’re probably right in practice, but doesn’t the standard just say dereferencing a NULL pointer is undefined behavior? Just wondering for my own curiosity :)

Best, Ben

Previous: Adrian RatiuNext: Patrick Steinhardt
Message 4 of 7 in “[Bug] hook: -Wanalyzer-deref-before-check warning in run_hooks_opt”
  1. correctmostJan 9, 2026
  2. Patrick SteinhardtJan 9, 2026
  3. Adrian RatiuJan 9, 2026
  4. Ben KnobleJan 9, 2026
  5. Patrick SteinhardtJan 9, 2026
  6. brian m. carlsonJan 9, 2026
  7. Adrian RatiuJan 11, 2026

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.