C2 compilation gives incorrect results
Vladimir Kozlov
vladimir.kozlov at oracle.com
Wed Jan 9 12:26:59 PST 2013
Andrew,
I was not able to reproduce it with jdk6 (and updates). It starts
failing with 7u4. Do you see the same?
And Christian created bug 8005956 for this issue.
Thanks,
Vladimir
On 1/9/13 3:44 AM, Andrew Haley 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)
>
> Andrew.
>
More information about the hotspot-dev
mailing list