RFR: 8358452: JNI exception pending in Java_sun_awt_screencast_ScreencastHelper_remoteDesktopKeyImpl of screencast_pipewire.c:1214 (ID: 51119)
Prasanta Sadhukhan
psadhukhan at openjdk.org
Tue Jun 3 08:37:56 UTC 2025
On Tue, 3 Jun 2025 03:39:31 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
> After calling `AWT_UNLOCK()`, `GetStringUTFChars` may be called with a pending exception.
src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c line 1209:
> 1207: AWT_UNLOCK();
> 1208:
> 1209: if (key == NoSymbol || (*env)->ExceptionCheck(env)) {
I guess we normally call ExceptionCheck after we call some JNI methods like (*env)->NewString or (*env)->CallObjectMethod. Here before this check we are not calling any JNI method so I think we should do it after we call (*env)->GetStringUTFChars ie. after l1214
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25605#discussion_r2123135632
More information about the client-libs-dev
mailing list