[
https://issues.apache.org/jira/browse/BVAL-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Myers closed BVAL-173.
---------------------------
Resolution: Invalid
Never mind, the "If _x_ and _y_ are actions of the same thread and _x_ comes
before _y_ in program order, then _hb(x, y)_" rule plus transitivity gives the
required ordering.
> Unsafe double-checked locking
> -----------------------------
>
> Key: BVAL-173
> URL: https://issues.apache.org/jira/browse/BVAL-173
> Project: BVal
> Issue Type: Bug
> Reporter: John Myers
> Priority: Major
>
> The methods org.apache.bval.util.Lazy.get() and
> org.apache.bval.util.LazyInt.getAsInt() both use unsafe double-checked
> locking. In both cases, the fact that init is volatile does not, under the
> Java Memory Model, prevent an incompletely initialized value from being
> returned from the function.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)