RFR: 8366149: JNI exception pending in Java_sun_awt_X11GraphicsDevice_pGetBounds of awt_GraphicsEnv.c:1484 [v2]
Damon Nguyen
dnguyen at openjdk.org
Thu Sep 11 03:13:13 UTC 2025
> In the scenario where AWT's UNLOCK API encounters a pendingException, the env pointer throws the pendingException (as seen in `awt.h`). However, in `Java_sun_awt_X11GraphicsDevice_pGetBounds`, after `AWT_UNLOCK`, the bounds var is set. The exception check does not occur until after the bounds is set, so the bounds may be set to an undesired value. This fix adds another exception check to look for this pendingException after `AWT_UNLOCK`.
Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision:
Change fix to return NULLs instead.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27110/files
- new: https://git.openjdk.org/jdk/pull/27110/files/f5e1521b..5b00dc81
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27110&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27110&range=00-01
Stats: 10 lines in 1 file changed: 4 ins; 4 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/27110.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27110/head:pull/27110
PR: https://git.openjdk.org/jdk/pull/27110
More information about the client-libs-dev
mailing list