codeql-coding-standards
codeql-coding-standards copied to clipboard
`A0-4-4`: More domain cases
Affected rules
-
A0-4-4
Description
There are a number of math function domain errors we didn't previously capture, because they result in unspecified or undefined behaviour:
-
abson "the most negative number" is undefined behaviour. - The second parameter of
fmodshould not be zero. -
l?lrint[fl]?andl?lround[fl]?where the rounded input value is outside the range of the return type. -
frexpon NaN or infinity
pole error on log of 0?
In general we seem to be missing all the pole cases.