On 8/24/21 8:11 AM, Darren Kenny wrote: > Is there a specific set of assertions already present that ensure that > the circumstances you outline above are always in place? If by "assertion" you mean using DEBUG_ASSERT to pacify Coverity, I think that the answer is currently "no" but if you apply something like the attached patch then the answer becomes "yes". You'll have to check this though, as Coverity won't give me access to its tools or source code. If by "assertion" you mean using to verify each of the statements I made, then this is not the sort of thing that one can easily ensure via assertions. It'd be like asking "Is there a specific set of assertions that I can add to 'grep' to ensure that the output of 'grep' is correct?" The answer to that question is "No, there's no practical way to do it." > At present at least, we're not building GRUB with DEBUG, but maybe it is > something to consider for Coverity builds. With the attached patch, I hope your Coverity builds can be either with or without DEBUG.