[OpenJDK 2D-Dev] RFR: 8255575: java.awt.color.ICC_ColorSpace is not thread-safe

Sergey Bylokhov serb at openjdk.java.net
Thu Nov 5 01:40:04 UTC 2020

The ICC_ColorSpace class uses a couple of internal data caches that might be used w/o any synchronization by different threads.

The solution is to wrap the initialization of the cached data by the DLC. I have checked performance impact by the J2DBench and it seems no big difference before/after the fix.

BTW jdk16 in some cases x10 times faster than 8u and 11u. Probably we should backport something, will check that.


Commit messages:
 - Update ICC_ColorSpace.java
 - Update MTICC_ColorSpaceToFrom.java
 - Update ICC_ColorSpace.java
 - Initial fix

Changes: https://git.openjdk.java.net/jdk/pull/1069/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1069&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8255575
  Stats: 182 lines in 2 files changed: 114 ins; 4 del; 64 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1069.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1069/head:pull/1069

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

More information about the 2d-dev mailing list