Re: [OpenJDK 2D-Dev] RFR: 8260695: The java.awt.color.ICC_Profile#getData/getData(int) are not thread safe [v3]
On Thu, 11 Feb 2021 20:00:01 GMT, Sergey Bylokhov wrote: >> 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. > > Sergey Bylokhov has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains eight additional > commits since the last revision: > > - Merge branch 'master' into JDK-8260695 > - Merge branch 'master' into JDK-8260695 > - 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 Marked as reviewed by aivanov (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2330
Re: [OpenJDK 2D-Dev] RFR: 8260695: The java.awt.color.ICC_Profile#getData/getData(int) are not thread safe [v3]
> 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. Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision: - Merge branch 'master' into JDK-8260695 - Merge branch 'master' into JDK-8260695 - 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: - all: https://git.openjdk.java.net/jdk/pull/2330/files - new: https://git.openjdk.java.net/jdk/pull/2330/files/a9347ae3..24211666 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=2330=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk=2330=01-02 Stats: 15435 lines in 405 files changed: 8177 ins; 5003 del; 2255 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