Re: [PATCH v2 3/3] treewide: replace assert() with BUG_IF_NOT() in special cases
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Mar 17, 2025, 22:33 UTC
- Message-ID
- <Z9ijIkCU+Tmt9H8i@nand.local>
- In-Reply-To
- <20c763f295105bda9a701b9bf5b9aa47af5bf1e1.1742107322.git.gitgitgadget@gmail.com>
On Sun, Mar 16, 2025 at 06:42:02AM +0000, Elijah Newren via GitGitGadget wrote:
> When the compiler/linker cannot verify that an assert() invocation is > free of side effects for us (e.g. because the assertion includes some > kind of function call), replace the use of assert() with BUG_IF_NOT().
Nice. I guess since this is split out into its own patch, we wouldn't be able to cleanly run CI on the previous commit, but I think that's fine, since we don't treat CI as being nearly as precious as being able to 'make' anywhere in history.
You didn't realign any multi-line assert() statements, but I actually think that's preferable in this case to demonstrate that the patch does not change the behavior of these assertions.
Thanks, Taylor