invalid-integer-operation
Default severity: error · Identifier: weavec::invalid-integer-operation
What it means
Section titled “What it means”A definitely invalid supported integer operation (RFC 0017). Message: invalid integer operation: <reason>, at the source operation. Reasons: signed integer overflow, division by zero, signed division overflow, invalid shift count, invalid signed left shift, and nonpositive variable array dimension. Possibly invalid arithmetic is conservative, without a definite-error claim or using undefined behavior to discard a reachable path.
How to resolve it
Section titled “How to resolve it”Validate operands before the operation: divisors must be nonzero, shifts must have valid counts, signed results must be representable, and VLA dimensions must be positive. Check multiplication and conversion before using a result as an allocation size. See integers and bounds.