RFR: 8263995: Incorrect double-checked locking in Types.arraySuperType() [v2]
Aleksey Shipilev
shade at openjdk.java.net
Mon Mar 22 19:06:00 UTC 2021
On Mon, 22 Mar 2021 18:31:01 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Drop synchronization and volatileness
>
> I'm a bit surprised to see use of volatile/synchronized here as I'm pretty sure that javac is *not* thread safe.
> It seems like the synchronized block has been there from a long time (e.g. it was there since the dawn of OpenJDK :-)). I wonder if a better fix would be simply to drop synchronization and volatileness.
> I'm a bit surprised to see use of volatile/synchronized here as I'm pretty sure that javac is _not_ thread safe.
> It seems like the synchronized block has been there from a long time (e.g. it was there since the dawn of OpenJDK :-)). I wonder if a better fix would be simply to drop synchronization and volatileness.
Yeah, I just did the most obvious semantics-preserving thing in this first patch. See new commit that drops `synchronized` instead as to not confuse both humans and tools about this. Still passes `langtools:tier1`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3129
More information about the compiler-dev
mailing list