On Thu, 27 May 2021 16:56:25 GMT, Martin Doerr <[email protected]> wrote:
>> We need a fix for crashes in get_current_contended_monitor due to concurrent >> modification of memory locations which are not declared volatile. See bug >> for details. > > Martin Doerr has updated the pull request incrementally with one additional > commit since the last revision: > > Add comments as suggested by Dan. Hi Martin, I'm with @stefank. This special case is a race condition and the solution for that is Atomic::load/store. Given Atomic::load/store don't actually need to do anything in practice (other than act as marker of a race) I don't have any qualms about using them all the time. Seperately, I'm unclear why we allow this race to exist. I thought we took snapshots when threads were known to be safe and stable. But that is a separate issue. Cheers, David ------------- PR: https://git.openjdk.java.net/jdk/pull/4224
