overflows in SLDivNode
Raffaello Giulietti
raffaello.giulietti at supsi.ch
Sun Apr 26 15:51:16 UTC 2015
Hi,
I'm just studying the SL implementation in the last Graal/Truffle update.
The long specialization of the division wrongly assumes that
/* No overflow is possible on a division. */
When left is Long.MIN_VALUE and right is -1 the division overflows.
OK, OK, OK, this is the only case and has a ridiculous
(cryptography-like) probability of 2^-128 to happen randomly. And, no,
neither java.lang.Math nor ExactMath cover this rare case of overflow.
Greetings
Raffaello
More information about the graal-dev
mailing list