Java - Incorrect JIT optimization (suppose)

Bug #1314291 reported by Sławomir Domagała
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-6 (Ubuntu)
New
Undecided
Unassigned

Bug Description

The Program creates a graph including: 20 vertex and 19 edges. Every edge can crash with probability 0.95. The aim of program is to estimate the probability of that the graph stays connected in one component. In this case the probability should be about 0.37.
If you run program you will see 0.37, but if you comment line: "System.out.println(niezawodnosc)" in method IsProper in class Krawedz, you will see 0.56 (incorrect). It looks like jre is trying to optimize method IsProper. Additionaly the last line shows the random generator works well.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: openjdk-6-jre 6b31-1.13.3-1ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Apr 29 18:41:17 2014
DistributionChannelDescriptor:
 # This is a distribution channel descriptor
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-precise-amd64-20130203-1
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-03-03 (56 days ago)
InstallationMedia: Ubuntu 12.04 "Precise" - Build amd64 LIVE Binary 20130203-13:50
SourcePackage: openjdk-6
UpgradeStatus: Upgraded to trusty on 2014-03-04 (55 days ago)

Revision history for this message
Sławomir Domagała (slawomir-karol-domagala) wrote :
Revision history for this message
Sławomir Domagała (slawomir-karol-domagala) wrote :

In openjdk-7-jre the bug doesn't exist.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.