Techniques For Mitigating Integer Overflow Problems
List of techniques and methods that might be used to mitigate the consequences of integer overflow:
- The effects of integer-based attacks for C/C++ and how to defend against them by using subtyping in Efficient and Accurate Detection of Integer-based Attacks.
- CERT As-if Infinitely Ranged (AIR) integer model - a largely automated mechanism for eliminating integer overflow and integer truncation As-if Infinitely Ranged Integer Model
In languages with native support for Arbitrary-precision arithmetic and type safety (an example being Common Lisp), numbers are promoted to a larger size automatically when overflows occur, or exceptions thrown (conditions signaled) when a range constraint exists. Using such languages may thus be helpful to mitigate this issue. In some such languages, situations are however still possible where an integer overflow could occur. An example is explicit optimization of a code path which is considered a bottleneck by the profiler. In the case of Common Lisp, this is possible by using an explicit declaration to type-annotate a variable to a machine-size word (fixnum) and lower the type safety level to zero for a particular code block.
Read more about this topic: Integer Overflow
Famous quotes containing the words techniques for, techniques, overflow and/or problems:
“It is easy to lose confidence in our natural ability to raise children. The true techniques for raising children are simple: Be with them, play with them, talk to them. You are not squandering their time no matter what the latest child development books say about purposeful play and cognitive learning skills.”
—Neil Kurshan (20th century)
“The techniques of opening conversation are universal. I knew long ago and rediscovered that the best way to attract attention, help, and conversation is to be lost. A man who seeing his mother starving to death on a path kicks her in the stomach to clear the way, will cheerfully devote several hours of his time giving wrong directions to a total stranger who claims to be lost.”
—John Steinbeck (19021968)
“A mans interest in the world is only the overflow from his interest in himself. When you are a child your vessel is not yet full; so you care for nothing but your own affairs. When you grow up, your vessel overflows; and you are a politician, a philosopher, or an explorer and adventurer. In old age the vessel dries up: there is no overflow: you are a child again.”
—George Bernard Shaw (18561950)
“An interesting play cannot in the nature of things mean anything but a play in which problems of conduct and character of personal importance to the audience are raised and suggestively discussed.”
—George Bernard Shaw (18561950)