# HG changeset patch # User rriggs # Date 1470678916 14400 # Node ID b5d59a6f093a1f485a51ed94211fc7ef11d0a0f2 # Parent 3f999ca3774e338407cfbab74465b4b66eb2eb96 8161431: JNI pending exceptions in ProcessHandleImpl_linux.c and ProcessHandleImpl_unix.c Reviewed-by: naoto diff -r 3f999ca3774e -r b5d59a6f093a jdk/src/java.base/linux/native/libjava/ProcessHandleImpl_linux.c --- a/jdk/src/java.base/linux/native/libjava/ProcessHandleImpl_linux.c Mon Aug 08 20:16:53 2016 +0300 +++ b/jdk/src/java.base/linux/native/libjava/ProcessHandleImpl_linux.c Mon Aug 08 13:55:16 2016 -0400 @@ -146,6 +146,7 @@ snprintf(fn, sizeof fn, "/proc/%d", pid); if (stat(fn, &stat_buf) == 0) { unix_getUserInfo(env, jinfo, stat_buf.st_uid); + JNU_CHECK_EXCEPTION(env); } /* diff -r 3f999ca3774e -r b5d59a6f093a jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c --- a/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c Mon Aug 08 20:16:53 2016 +0300 +++ b/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c Mon Aug 08 13:55:16 2016 -0400 @@ -429,7 +429,9 @@ if (nargs >= 1) { // Create a String array for nargs-1 elements - argsArray = (*env)->NewObjectArray(env, nargs - 1, JNU_ClassString(env), NULL); + jclass clazzString = JNU_ClassString(env); + CHECK_NULL(clazzString); + argsArray = (*env)->NewObjectArray(env, nargs - 1, clazzString, NULL); CHECK_NULL(argsArray); for (i = 0; i < nargs - 1; i++) {