codeql-coding-standards icon indicating copy to clipboard operation
codeql-coding-standards copied to clipboard

`A0-4-4`: More domain cases

Open lcartey opened this issue 2 years ago • 2 comments

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:

  • abs on "the most negative number" is undefined behaviour.
  • The second parameter of fmod should not be zero.
  • l?lrint[fl]? and l?lround[fl]? where the rounded input value is outside the range of the return type.
  • frexp on NaN or infinity

lcartey avatar Feb 22 '23 13:02 lcartey

pole error on log of 0?

lcartey avatar Jan 29 '24 23:01 lcartey

In general we seem to be missing all the pole cases.

lcartey avatar Jan 29 '24 23:01 lcartey