Skip to content

Commit

Permalink
Merge pull request #10235 from JasonFengJ9/jnicheckrange
Browse files Browse the repository at this point in the history
Add -Xcheck:jni check for expected non-negative capacity numbers
  • Loading branch information
gacholio committed Jul 24, 2020
2 parents 7d491e0 + 88144c9 commit a56dcbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/jnichk/jnicwrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ checkPushLocalFrame(JNIEnv *env, jint capacity)
J9JavaVM* j9vm = ((J9VMThread*)env)->javaVM;
jint actualResult;
J9JniCheckLocalRefState refTracking;
static const U_32 argDescriptor[] = { JNIC_JINT, 0 };
static const U_32 argDescriptor[] = { JNIC_JSIZE, 0 };
static const char function[] = "PushLocalFrame";

jniCheckArgs(function, 0, CRITICAL_WARN, &refTracking, argDescriptor, env, capacity);
Expand Down Expand Up @@ -675,7 +675,7 @@ checkEnsureLocalCapacity(JNIEnv *env, jint capacity)
J9JavaVM* j9vm = ((J9VMThread*)env)->javaVM;
jint actualResult;
J9JniCheckLocalRefState refTracking;
static const U_32 argDescriptor[] = { JNIC_JINT, 0 };
static const U_32 argDescriptor[] = { JNIC_JSIZE, 0 };
static const char function[] = "EnsureLocalCapacity";

jniCheckArgs(function, 0, CRITICAL_WARN, &refTracking, argDescriptor, env, capacity);
Expand Down

0 comments on commit a56dcbd

Please sign in to comment.