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

Re: [PATCH v3 0/3] Add a static analysis job to prevent assertions with side effects

From
Taylor Blau <me@ttaylorr.com>
Date
Mar 19, 2025, 22:27 UTC
Message-ID
<Z9tE7Bo6uVkXUaEC@nand.local>
In-Reply-To
<pull.1881.v3.git.1742401378.gitgitgadget@gmail.com>
On Wed, Mar 19, 2025 at 04:22:55PM +0000, Elijah Newren via GitGitGadget wrote:
Show 27 quoted lines
> Changes since v1:
>
>  * Tweaked commit message for patch 2 Changes since v2:
>  * Rename BUT_IF_NOT() -> ASSERT(). Didn't have a strong opinion on the set
>    of alternatives Junio gave, so went with Taylor's small preference. If
>    anyone has a strong preference here, I can pick a different alternative.
>  * Fixed shell style issues (indentation, multi-line pipes, multiple lines
>    with stderr redirects) in patch 2
>
> Elijah Newren (3):
>   git-compat-util: introduce ASSERT() macro
>   ci: add build checking for side-effects in assert() calls
>   treewide: replace assert() with ASSERT() in special cases
>
>  Makefile                      |  4 ++++
>  ci/check-unsafe-assertions.sh | 18 ++++++++++++++++++
>  ci/run-static-analysis.sh     |  2 ++
>  diffcore-rename.c             |  2 +-
>  git-compat-util.h             |  8 ++++++++
>  merge-ort.c                   |  4 ++--
>  merge-recursive.c             |  2 +-
>  object-file.c                 |  2 +-
>  parallel-checkout.c           |  2 +-
>  scalar.c                      |  4 ++--
>  sequencer.c                   |  2 +-
>  11 files changed, 41 insertions(+), 9 deletions(-)
>  create mode 100755 ci/check-unsafe-assertions.sh
Thanks, this version LGTM.

Thanks, Taylor

Previous: Taylor Blau
Message 30 of 30 in “Add a static analysis job to prevent assertions with side effects”
  1. 0/3 Add a static analysis job to prevent assertions with side effectsElijah Newren via GitGitGadget, Mar 14, 2025
  2. 1/3 git-compat-util: introduce BUG_IF_NOT() macroElijah Newren via GitGitGadget, Mar 14, 2025
  3. 2/3 ci: add build checking for side-effects in assert() callsElijah Newren via GitGitGadget, Mar 14, 2025
  4. Junio C HamanoMar 14, 2025
  5. brian m. carlsonMar 14, 2025
  6. Junio C HamanoMar 14, 2025
  7. Elijah NewrenMar 14, 2025
  8. Junio C HamanoMar 14, 2025
  9. Elijah NewrenMar 16, 2025
  10. Elijah NewrenMar 17, 2025
  11. Junio C HamanoMar 17, 2025
  12. 3/3 treewide: replace assert() with BUG_IF_NOT() in special casesElijah Newren via GitGitGadget, Mar 14, 2025
  13. 0/3 Add a static analysis job to prevent assertions with side effectsElijah Newren via GitGitGadget, Mar 16, 2025
  14. 1/3 git-compat-util: introduce BUG_IF_NOT() macroElijah Newren via GitGitGadget, Mar 16, 2025
  15. Junio C HamanoMar 17, 2025
  16. Taylor BlauMar 17, 2025
  17. 2/3 ci: add build checking for side-effects in assert() callsElijah Newren via GitGitGadget, Mar 16, 2025
  18. Taylor BlauMar 17, 2025
  19. Elijah NewrenMar 19, 2025
  20. Taylor BlauMar 19, 2025
  21. Junio C HamanoMar 17, 2025
  22. 3/3 treewide: replace assert() with BUG_IF_NOT() in special casesElijah Newren via GitGitGadget, Mar 16, 2025
  23. Taylor BlauMar 17, 2025
  24. Taylor BlauMar 17, 2025
  25. 0/3 Add a static analysis job to prevent assertions with side effectsElijah Newren via GitGitGadget, Mar 19, 2025
  26. 1/3 git-compat-util: introduce ASSERT() macroElijah Newren via GitGitGadget, Mar 19, 2025
  27. 2/3 ci: add build checking for side-effects in assert() callsElijah Newren via GitGitGadget, Mar 19, 2025
  28. 3/3 treewide: replace assert() with ASSERT() in special casesElijah Newren via GitGitGadget, Mar 19, 2025
  29. Taylor BlauMar 19, 2025
  30. Taylor BlauMar 19, 2025

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.