Mercurial > hg > graal-jvmci-8
diff src/cpu/sparc/vm/sparc.ad @ 13042:208ebea980f8
8027445: SIGSEGV at TestFloatingDecimal.testAppendToDouble()I
Summary: String.equals() intrinsic shouldn't use integer length input in pointer arithmetic without an i2l.
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Mon, 04 Nov 2013 21:59:54 +0100 |
parents | b4aa8fc5d0d5 |
children | f3e0bcfff3ab da862781b584 |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/sparc.ad Fri Nov 01 08:35:58 2013 -0700 +++ b/src/cpu/sparc/vm/sparc.ad Mon Nov 04 21:59:54 2013 +0100 @@ -2916,6 +2916,9 @@ __ bind(LSkip2); } + // We have no guarantee that on 64 bit the higher half of limit_reg is 0 + __ signx(limit_reg); + __ subcc(limit_reg, 1 * sizeof(jchar), chr1_reg); __ br(Assembler::equal, true, Assembler::pn, Ldone); __ delayed()->mov(O7, result_reg); // result is difference in lengths @@ -2973,6 +2976,9 @@ Register chr1_reg = result_reg; Register chr2_reg = tmp1_reg; + // We have no guarantee that on 64 bit the higher half of limit_reg is 0 + __ signx(limit_reg); + //check for alignment and position the pointers to the ends __ or3(str1_reg, str2_reg, chr1_reg); __ andcc(chr1_reg, 0x3, chr1_reg);