RFR(S): 8166742 : SIGFPE in C2 Loop IV elimination
Vladimir Kozlov
vladimir.kozlov at oracle.com
Tue Sep 27 00:35:17 UTC 2016
Slightly different (cast after /) and jlong type:
jlong ratio_conl = (jlong) (stride_con2 / stride_con);
if ((ratio_conl * stride_con) == (jlong)stride_con2) { // Check for exact
Vladimir
On 9/26/16 5:01 PM, Chuck Rasbold wrote:
> Just to confirm, are you suggesting that the ratio be first computed as a 64 bit quantity, effectively along the lines of...
>
> long ratio_conl = ((long) stride_con2) / stride_con;
>
> if ((ratio_conl * stride_con) == stride_con2 &&
> ratio_conl < 0x8000000 ) { // Check for exact
> int ratio_con = (int) ratio_conl;
>
>
> On Mon, Sep 26, 2016 at 3:45 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com <mailto:vladimir.kozlov at oracle.com>> wrote:
>
> Hi Chuck
>
> Can you do 'long' arithmetic in existing condition to catch integer overflow instead?
>
> if ((ratio_con * stride_con) == stride_con2) { // Check for exact
>
> thanks,
> Vladimir
>
>
>
> On 9/26/16 3:18 PM, Chuck Rasbold wrote:
>
> A small fix for an edge case crash in C2...
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8166742 <https://bugs.openjdk.java.net/browse/JDK-8166742>
> Webrev: http://cr.openjdk.java.net/~rasbold/8166742/webrev.00/ <http://cr.openjdk.java.net/~rasbold/8166742/webrev.00/>
>
> Requesting a sponsor and reviews. Thanks.
>
> -- Chuck
>
>
More information about the hotspot-compiler-dev
mailing list