...
Wiki Markup |
---|
Verifiably in range operations are often preferable to treating out of range values as an error condition because the handling of these errors has been repeatedly shown to cause denial-of-service problems in actual applications. The quintessential example of this is the failure of the Ariane 5 launcher which occurred due to an improperly handled conversion error resulting in the processor being shutdown \[[Lions 96|AA. C References#Lions 96]\]. |
Faced with an integer overflow, the underlying computer system may do one of two things: (a) signal some sort of error condition, or (b) produce an integer result that is within the range of representable integers on that system. The latter semantics may be preferable in some situations in that it allows the computation to proceed, thus avoiding a denial-of-service attack. However, it raises the question of what integer result to return to the user.
...
Wiki Markup |
---|
\[[Lions 96|AA. C References#Lions 96]\] |
...
INT07-A. Use only signed or unsigned char type for numeric values 04. Integers (INT) INT09-A. Ensure enumeration constants map to unique values