[OpenJDK 2D-Dev] RFR: 8260695: The java.awt.color.ICC_Profile#getData/getData(int) are not thread safe
Sergey Bylokhov
serb at openjdk.java.net
Mon Feb 1 09:09:02 UTC 2021
Both methods are implemented in a similar way.
1. Requests the size of the profile/tag data
2. Creates an array of the correct size
3. Requests the data and copy it to the array
If the data will be changed concurrently between steps 2. and 3. then we will get a mismatch between the array and copied data.
In the fix, all steps above are merged to just one step return the data when requested.
-------------
Commit messages:
- cleanup
- Merge branch 'JDK-8260695' of https://github.com/mrserb/jdk into JDK-8260695
- Update LCMSProfile.java
- Update LCMSProfile.java
- Create MTGetData.java
- Initial fix
Changes: https://git.openjdk.java.net/jdk/pull/2330/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2330&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8260695
Stats: 295 lines in 7 files changed: 138 ins; 110 del; 47 mod
Patch: https://git.openjdk.java.net/jdk/pull/2330.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2330/head:pull/2330
PR: https://git.openjdk.java.net/jdk/pull/2330
More information about the 2d-dev
mailing list