Hi all, On Fri, 2013-05-10 at 12:52 +0200, Peter Levart wrote: > Hi David, Thomas, > > I think I understand you now, David. You want to minimize the > possibility of vacuously passing the test. So here's my attempt at that: > > > public class OOMEInReferenceHandler { > static Object[] fillHeap() { > Object[] first = null, last = null; > int size = 1 << 20; > while (size > 0) { > try { > [... new reproducer ...]
> [...] > > To be sure the order of class referencing in handlers is not disturbed > by changes in compilers, I suggest the patch to be modified to this more > explicit variant: > > try { > try { > lock.wait(); > } catch (InterruptedException x) { } > } catch (OutOfMemoryError x) {} > > > ..which also passes the test. I updated the test program and the patch in java.lang.ref.Reference accordingly. As for the problem of reproducibility, in my tests I had a 100% reproduction rate with the previous version of the test. However, now I also set -XX:-UseTLAB and -Xmx16M in the test program as suggested in some other emails. I will report back with a new webrev after some testing on more platforms as suggested by David. Hth, Thomas