RFR: 8300167: Add validation of the raster's layout before using in native
Sergey Bylokhov
serb at openjdk.org
Mon Jan 16 08:10:51 UTC 2023
Currently, we always validate image layouts passed from java to native, except for some types of rasters. One of the reasons why the rasters are skipped is that they are not public and have their own validation during construction. But it is unclear how it works in the multithreaded case. All these objects are not thread-safe - is could be possible that we can get the raster which is not completely constructed/validated?
FYI I have started to look into this method because when I did an accidental typo in pixel format in it and got the same symptoms/crash as described [here](https://bugs.openjdk.org/browse/JDK-8278101). It might be unrelated but it is safer to fix.
-------------
Commit messages:
- 8300167: Add validation of the raster's layout before using in native
Changes: https://git.openjdk.org/jdk/pull/12004/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12004&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8300167
Stats: 9 lines in 1 file changed: 5 ins; 1 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/12004.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12004/head:pull/12004
PR: https://git.openjdk.org/jdk/pull/12004
More information about the client-libs-dev
mailing list