RFR: 8197812: (ref) Data race in Finalizer

mandy chung mandy.chung at oracle.com
Thu Feb 15 23:20:21 UTC 2018

Hi Martin,

On 2/14/18 9:47 PM, Martin Buchholz wrote:
> Embarrassed by my failure to take runFinalizersOnExit into account, I 
> tried to redo the patch to be actually correct.
> http://cr.openjdk.java.net/~martin/webrevs/jdk/Finalizer-data-race/ 
> <http://cr.openjdk.java.net/%7Emartin/webrevs/jdk/Finalizer-data-race/>
> even though we may succeed in making runFinalizersOnExit go away, and 
> I'm not planning to submit any time soon.
> The runFinalizersOnExit case needs different mechanics for removing 
> elements from "unfinalized".
> The simple invariant is that you need to run the finalizer whenever an 
> element is unlinked from unfinalized.

I have posted RFR to remove runFinalizersOnExit.   I think your patch 
would become cleaner as you may keep the remove method or inline in 
runFinalizer method as your original patch has.

Do you want to wait until JDK-8198249?  or proceed this patch without 


More information about the core-libs-dev mailing list