Integer Overflow - Techniques For Mitigating Integer Overflow Problems

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 (1902–1968)

    Oh! that thy love might overflow my Heart!
    To fire the same with Love: for Love I would.
    But oh! my streight’ned Breast! my Lifeless Sparke!
    My Fireless Flame! What Chilly Love, and Cold?
    In measure small! In Manner Chilly! See!
    Lord, blow the Coal: Thy Love Enflame in mee.
    Edward Taylor (1645–1729)

    The Settlement ... is an experimental effort to aid in the solution of the social and industrial problems which are engendered by the modern conditions of life in a great city. It insists that these problems are not confined to any one portion of the city. It is an attempt to relieve, at the same time, the overaccumulation at one end of society and the destitution at the other ...
    Jane Addams (1860–1935)