You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coverity scan complains about this like in regexec.c (and re_exec.c):
assert(!(FLAGS(scan) & ~RXf_PMf_COMPILETIME));
With the message:
CID 451332 (#1-3 of 3): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)result_independent_of_operands: scan->head.data.u_8.flags & 4294965248U /* ~(((((((((1U << 0 + 0) | (1U << 0 + 1)) | (1U << 0 + 2)) | (1U << 0 + 3)) | (1U << 0 + 4)) | (1U << 0 + 6)) | (1U << 0 + 5)) | (7U << 0 + 7)) | (1U << 0 + 10)) */ is always 0 regardless of the values of its operands. This occurs as the logical operand of !.
which happens since the flags member is only and 8 bit value and this code masks it with 4294965248U, which is 0xfffff800.
From looking at the code that uses the flags that make up RXf_PMf_COMPILETIME I'm pretty sure this shouldn't be testing against the flags of the current op, but either against RExC_flags or ARG2i(scan).
@demerphq recently changed this from scan->flags to FLAGS(scan) which I don't think is the cause of Coverity's complaint but the original assertion was added in ec841a2 by @iabyn
Module:
Description
Coverity scan complains about this like in regexec.c (and re_exec.c):
With the message:
which happens since the flags member is only and 8 bit value and this code masks it with 4294965248U, which is 0xfffff800.
From looking at the code that uses the flags that make up RXf_PMf_COMPILETIME I'm pretty sure this shouldn't be testing against the flags of the current op, but either against
RExC_flags
orARG2i(scan)
.@demerphq recently changed this from
scan->flags
toFLAGS(scan)
which I don't think is the cause of Coverity's complaint but the original assertion was added in ec841a2 by @iabynSteps to Reproduce
N/A
Expected behavior
N/A
Perl configuration
The text was updated successfully, but these errors were encountered: