Re: RFR: 8259021 avoid double racy reads from non-volatile fields of SharedSecrets [v2]

2021-01-04 Thread Richard Reingruber
On Mon, 4 Jan 2021 15:11:27 GMT, Roger Riggs  wrote:

>> Peter Levart has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   revert the unrelated change
>
> The bug title and the PR title need to be the same.
> Editing either one is fine.

But wouldn't it be legal for a compiler (java to bytecode or bytecode to
machinecode) to replace references of my_local_copy with references to
static_field?

Foo my_local_copy = static_field;
if (my_copy == null) {
   initialize();
   my_local_copy = static_field;
}
return my_local_copy;

Only if static_field was volatile this would be illegal, wouldn't it?

-

PR: https://git.openjdk.java.net/jdk/pull/1914


Re: RFR: 8259021 avoid double racy reads from non-volatile fields of SharedSecrets [v2]

2021-01-04 Thread Roger Riggs
On Mon, 4 Jan 2021 14:27:09 GMT, Peter Levart  wrote:

>> See: https://bugs.openjdk.java.net/browse/JDK-8259021
>> See also discussion in thread: 
>> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-December/072798.html
>
> Peter Levart has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   revert the unrelated change

The bug title and the PR title need to be the same.
Editing either one is fine.

-

Marked as reviewed by rriggs (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1914


Re: RFR: 8259021 avoid double racy reads from non-volatile fields of SharedSecrets [v2]

2021-01-04 Thread Claes Redestad
On Mon, 4 Jan 2021 14:27:09 GMT, Peter Levart  wrote:

>> See: https://bugs.openjdk.java.net/browse/JDK-8259021
>> See also discussion in thread: 
>> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-December/072798.html
>
> Peter Levart has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   revert the unrelated change

Marked as reviewed by redestad (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/1914


Re: RFR: 8259021 avoid double racy reads from non-volatile fields of SharedSecrets [v2]

2021-01-04 Thread Peter Levart
> See: https://bugs.openjdk.java.net/browse/JDK-8259021
> See also discussion in thread: 
> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-December/072798.html

Peter Levart has updated the pull request incrementally with one additional 
commit since the last revision:

  revert the unrelated change

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1914/files
  - new: https://git.openjdk.java.net/jdk/pull/1914/files/d3b4c98f..dd1447a0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=1914=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=1914=00-01

  Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1914.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1914/head:pull/1914

PR: https://git.openjdk.java.net/jdk/pull/1914