[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Integrated: 8302849: SurfaceManager might expose partially constructed object
From:       Per Minborg <pminborg () openjdk ! org>
Date:       2023-02-22 11:48:56
Message-ID: VnJSyqyw76KueGp8U5cBmSCzjk3dyJVHfVL6_KKExGw=.2c9e139c-8cb3-43f9-9530-b2836d27b0b3 () github ! com
[Download RAW message or body]

On Mon, 20 Feb 2023 10:25:34 GMT, Per Minborg <pminborg@openjdk.org> wrote:

> This PR proposes to add `volatile` to a variable declaration in order to prevent \
> partially initialized objects to be observed by threads. 
> `SurfaceManager` is using a lazily initialized cacheMap that is initialized using a \
> double-checked locking mechanism. Generally, objects initialized using such \
> constructs need to be declared volatile.  
> See https://en.wikipedia.org/wiki/Double-checked_locking#Usage_in_Java

This pull request has now been integrated.

Changeset: 63ef2143
Author:    Per Minborg <pminborg@openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/63ef2143289f4aac52c8b2a6b555ed2b33dc1c07
                
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8302849: SurfaceManager might expose partially constructed object

Reviewed-by: serb

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

PR: https://git.openjdk.org/jdk/pull/12654


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic