RFR: 8358107: Rollback JDK-8357299 changeset
Sergey Bylokhov
serb at openjdk.org
Fri May 30 04:16:02 UTC 2025
The patch for [JDK-8357299](https://bugs.openjdk.org/browse/JDK-8357299) does not completely fix the regression it was intended to address. Instead of bailing out on overflow, it introduces additional logic around src and clip, which might lead to attempts to draw invalid source pixels.
A test case demonstrating the issue is attached to [JDK-8358103](https://bugs.openjdk.org/browse/JDK-8358103)(passed on jdk22 failed on latest openjdk/jdk).
There are some unresolved discussions related to that patch, see [PR](https://github.com/openjdk/jdk/pull/25340). I believe it would be better to bail out early in case of overflow than risk incorrect calculations.
Therefore, I propose reverting [JDK-8357299](https://bugs.openjdk.org/browse/JDK-8357299) until a proper fix is available. This approach would also simplify backports, since only the patch for [JDK-8358103](https://bugs.openjdk.org/browse/JDK-8358103) would need to be backported
@prsadhuk, @prrace please take a look
-------------
Commit messages:
- Revert "8357299: Graphics copyArea doesn't copy any pixels when there is overflow"
Changes: https://git.openjdk.org/jdk/pull/25537/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25537&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8358107
Stats: 74 lines in 2 files changed: 5 ins; 62 del; 7 mod
Patch: https://git.openjdk.org/jdk/pull/25537.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25537/head:pull/25537
PR: https://git.openjdk.org/jdk/pull/25537
More information about the client-libs-dev
mailing list