Paul Eggert <[email protected]> writes:

> On 12/1/21 13:01, Robbie Harwood wrote:
>> The reason for this issue is that we are not building with DEBUG set and
>> this in turn means that the assert() that reads the value of the
>> variable match_last is being processed out.
>
> Could you explain what goes wrong? regexec_internal.h does this:
>
>> #if defined DEBUG && DEBUG != 0
>> # include <assert.h>
>> # define DEBUG_ASSERT(x) assert (x)
>> #else
>> # define DEBUG_ASSERT(x) assume (x)
>> #endif
>
> so the later 'DEBUG_ASSERT (match_last != -1);' expands to 'assume 
> (match_last != -1);'. And verify.h defines 'assume(R)' to evaluate R so 
> match_last is used there (unless you're using Microsoft's compiler in 
> which case it is equivalent to '__assume (R)'; are you having problems 
> with Microsoft's compiler?).

(Same framing as the previous one - Coverity reported, etc.)

I believe this change predates your
79f8ee4e389f8cb1339f8abed9a7d29816e2a2d4 by several months (grub
currently starts at d271f868a8df9bbec29049d01e056481b7a1a263) and should
be therefore safe for grub to drop if it ever rolls forward.  Thanks!

Be well,
--Robbie

Attachment: signature.asc
Description: PGP signature

Reply via email to