RFR: 8366149: JNI exception pending in Java_sun_awt_X11GraphicsDevice_pGetBounds of awt_GraphicsEnv.c:1484 [v3]

Alexey Ivanov aivanov at openjdk.org
Fri Sep 19 09:38:53 UTC 2025


On Thu, 18 Sep 2025 23:30:07 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:

>> 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:
> 
>   Move XFree. Revert spacing.

Marked as reviewed by aivanov (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/27110#pullrequestreview-3244038745


More information about the client-libs-dev mailing list