hg: jdk8/tl/jdk: 4243978: (ref) Race condition in Reference.enqueue(); ...

y.s.ramakrishna at oracle.com y.s.ramakrishna at oracle.com
Tue Nov 1 00:40:01 UTC 2011

Changeset: 5f2838744544
Author:    ysr
Date:      2011-10-31 17:38 -0700
URL:       http://hg.openjdk.java.net/jdk8/tl/jdk/rev/5f2838744544

4243978: (ref) Race condition in Reference.enqueue()
4268317: (ref) Reference.isEnqueued() can return true when instance not enqueued
Summary: The reference handler now declares, and assumes, that the discovered field, rather than the next field, is (to be) used to link the entries in the pending list, thus allowing a reference object to be safely enqueued even while it is in the pending state. Also added slightly modified regression tests from the two bug reports.
Reviewed-by: mchung, alanb, jcoomes

! src/share/classes/java/lang/ref/Reference.java
! src/share/javavm/export/jvm.h
! src/share/native/common/jdk_util.c
+ test/java/lang/ref/ReferenceEnqueue.java
+ test/java/lang/ref/ReferenceEnqueuePending.java

More information about the core-libs-dev mailing list