C2 compilation gives incorrect results

Christian Thalinger christian.thalinger at oracle.com
Wed Jan 9 12:17:00 PST 2013


[Moving to hotspot-compiler-dev; bcc'ing hotspot-dev.]

On Jan 9, 2013, at 3:44 AM, Andrew Haley <aph at redhat.com> wrote:

> Here's a nice one, reported at bug 2396372.  Test case at
> https://bugzilla.redhat.com/attachment.cgi?id=605282
> The bug seems to have been in HotSpot for many years.
> 
> The test case runs through many iterations until:
> 
> $ java -XX:+PrintCompilation PolynomialRoot
> 
> !!!!!!!!n=4 test 1431
> !!!!!!!!n=4 test 1432
>     96   37       3       PolynomialRoot::root4 (1560 bytes)   made not entrant
>     96  112       4       PolynomialRoot::root2 (183 bytes)
>     96   45       4       PolynomialRoot::checkValues (360 bytes)   made not entrant
> Exception in thread "main"      97   56   !   3       sun.nio.cs.US_ASCII$Encoder::encodeArrayLoop (356 bytes)   made not entrant
> java.lang.RuntimeException: order=4     p[0]=-0.09965134319016089;p[1]=0.0;p[2]=0.30234383793894914;p[3]=-0.18180230156481425;p[4]=0.5206321058295245;
>         x.r=0.134302716567836 x.i=0.4911858311805498
> res/sabs=-0.03744084182425251 ims/sabs=0.007299470095647275 sabs=3.553068664639566
> res=-0.13302988186347808 ims=0.02593551846531791 n=4 eps=1.0E-6  sabs>1/eps=false f1=true f2=true  t=1432
>        at PolynomialRoot.checkValues(PolynomialRoot.java:424)
>        at PolynomialRoot.testRoots(PolynomialRoot.java:491)
>        at PolynomialRoot.main(PolynomialRoot.java:762)
> 
> mercury:~ $ java -version
> openjdk version "1.8.0-internal"
> OpenJDK Runtime Environment (build 1.8.0-internal-aph_2013_01_09_11_31-b00)
> OpenJDK 64-Bit Server VM (build 25.0-b15, mixed mode)

Thanks for reporting this one, Andrew.  I filed:

8005956: C2: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG defined in this block

It seems there is a problem in liveness analysis and a product VM produces wrong code.

-- Chris

> 
> Andrew.



More information about the hotspot-compiler-dev mailing list