Integrated: 8263995: Incorrect double-checked locking in Types.arraySuperType()

Aleksey Shipilev shade at openjdk.java.net
Tue Mar 23 17:51:39 UTC 2021


On Mon, 22 Mar 2021 18:19:39 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> In Types.arraySuperType(), SonarCloud reports:
>  Remove this dangerous instance of double-checked locking.
> 
> Indeed, the `arraySuperType` is not `volatile`, while `IntersectionClassType` has non-`final` fields (both in itself and in superclasses). This is an incorrect DCL.

This pull request has now been integrated.

Changeset: c087f3ed
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/c087f3ed
Stats:     8 lines in 1 file changed: 0 ins; 4 del; 4 mod

8263995: Incorrect double-checked locking in Types.arraySuperType()

Reviewed-by: mcimadamore, jlahoda

-------------

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


More information about the compiler-dev mailing list