RFR: 6995195: Static initialization deadlock in sun.java2d.loops.Blit and GraphicsPrimitiveMgr [v3]

Dmitry Cherepanov dcherepanov at openjdk.org
Fri Apr 14 15:58:26 UTC 2023


> This PR suggests to move generalPrimitives array to a new static nested GeneralPrimitives class to eliminate the possible deadlock. The Blit class (and other classes that register as general primitives) calls to GeneralPrimitives.register from the static initializer block without acquiring lock on the GraphicsPrimitiveMgr class.
> 
> This PR also includes a jtreg regression test which reproduces this issue without the patch and passes with the patch. Running tests from test/jdk/sun/java2d didn't reveal any issues with this patch.

Dmitry Cherepanov has updated the pull request incrementally with one additional commit since the last revision:

  remove commented line

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13459/files
  - new: https://git.openjdk.org/jdk/pull/13459/files/0727c25b..e6754209

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13459&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13459&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/13459.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13459/head:pull/13459

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



More information about the client-libs-dev mailing list