We're updating the issue view to help you get more done. 

Missing write barrier in java/lang/ref/Reference.java?

Description

I stumbled across this today, it looks to me to be a simple copy-paste bug: NEEDS_OBJECT_GETFIELD_BARRIER is used where NEEDS_OBJECT_PUTFIELD_BARRIER should have been, cutting and pasting the code from getInternal(), a few lines above. I encountered it while reading the code, not during debugging. Although to me it looks pretty clearly to be a bug, I'm not familiar enough with the code to be 100% sure.

If anyone knows the code well, perhaps they can confirm. If no one has a contrary opinion, I'm inclined to apply the patch and see whether it has any impact on regressions (my basic testing shows that it does not make things worse). It looks fairly obscure so it may not register any change in behavior across our suites. Any other suggestions?

Environment

None

Status

Assignee

Steve Blackburn

Reporter

Steve Blackburn

Labels

None

External issue ID

None

Components

Priority

Medium