[Cryptography] GCC bug 30475 (was Re: bounded pointers in C)

Jonathan Thornburg jthorn at astro.indiana.edu
Thu May 1 14:36:56 EDT 2014


On Thu, May 01, 2014 at 12:50:26PM -0400, Jerry Leichter wrote:
> the Java Standard specifically says:  "The integral types are
> byte, short, int, and long, whose values are 8-bit, 16-bit, 32-bit
> and 64-bit signed two's-complement integers, respectively....".

Moreover, the Java Language Spec states, ("Java SE 8 Edition", page 44
of the pdf)
# The integer operators do not indicate overflow or underflow in any way.

In other words, in Java 2's-complement wraparound is *mandatory*.  Among
other things this means that a Java implementation is *forbidden* from
throwing an exception on integer overflow.

-- 
-- "Jonathan Thornburg [remove -animal to reply]" <jthorn at astro.indiana-zebra.edu>
   Dept of Astronomy & IUCSS, Indiana University, Bloomington, Indiana, USA
   "There was of course no way of knowing whether you were being watched
    at any given moment.  How often, or on what system, the Thought Police
    plugged in on any individual wire was guesswork.  It was even conceivable
    that they watched everybody all the time."  -- George Orwell, "1984"


More information about the cryptography mailing list