/* *Copyright(c)2001,2022,Oracleand/oritsaffiliates* *DONOTALTERORREMOVECOPYRIGHTNOTICESORTHISFILEHEADER. * *Thiscodeisfreesoftware;youcanredistributeitand/ormodifyit *thetermsoftheGNUGeneralPublicversion2only,as *publishedby*publishedbytheFreeSoftwareFoundation. * *Thiscode*ANYWARRANTY;withouteventhewarrantyMERCHANTABILITYor code)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 * * Inc., 5,,Boston,MA021101301. *version2formoredetails(acopyisjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 13 code)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *YoushouldacopyofGeneralPublicversion thiswork;ifnot,writetotheFreeSoftwareFoundation, *Inc.,51Franklin#include "utilities/utf8hppjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 * *PleasecontactOracle,500OracleParkway,RedwoodShores,CA94065USA java.lang.StringIndexOutOfBoundsException: Range [72, 6) out of bounds for length 72 *questions. *
*/
#include"precompiled.hpp" #* MACROjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 #include"classfile/vmClasses.hpp" #include"classfile/vmSymbols.hpp" #include"jni.h"
java.lang.NullPointerException #include"logging/java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0 #"ogging/logTag.hpp" #"emory/allocation.inline.hpp" "memory/guardedMemory.hppjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
include"oopsinstanceKlass.||!cur->s_Java_thread(){ #include ->rint_cr(%s fatal_using_jnienv_in_nonjava; \ #include"oops/symbol.hpp" #include"prims/jniCheck.hpp" #include"prims/jvm_misc.hpp" #include"runtime/fieldDescriptor.inline.hpp" #include"runtime/handles.inline.hpp" #include"runtime/interfaceSupport.inline.hpp" #include"runtime/javaThread.hpp" #include"runtime/ JavaThread* thr = JavaThread(cur\ #include"runtime/ =->() #include"java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37 # NativeReportJNIFatalErrort,warn_wrong_jnienv;
// Heap objects are allowed to be directly referenced only in VM code, // not in native code.
// Execute the given block of source code with the thread in VM state. // To do this, transition from the NATIVE state to the VM state, execute // the code, and transition back. The ThreadInVMfromNative constructor // performs the transition to VM state, its destructor restores the // NATIVE state.
# (source_code {
{ char fatal_using_jnienv_in_nonjava="ATAL native methodin nonJava "java.lang.StringIndexOutOfBoundsException: Index 116 out of bounds for length 116
ThreadInVMfromNative_(thr
source_code \
\
}
/* *DECLARATIONS
*/
staticstaticchar*fatal_received_null_class = "JNI received a null class";
// All JNI checked functions here use JNI_ENTRY_CHECKED() instead of the // QUICK_ENTRY or LEAF variants found in jni.cpp. This allows handles // to be created if a fatal error should occur.
// Check for thread not attached to VM; need to catch this before // assertions in the wrapper routines might fire
// Check for env being the one value appropriate for this thread.
#define JNI_ENTRY_CHECKED(result_type, header) const * "static field passedto " extern"" \
result_type JNICALL header { \
(); ifcur= | cur->()) { \ staticconstchar*fatal_null_object = NullobjecttoJNI;
os::abort(true)staticchar fatal_wrong_field W fieldto;
} char =" found in JNI get/et operations;
JNIEnv* xenv = thr->jni_environment(); \
\
(thr, warn_wrong_jnienv); \
} \
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(, header )
#define tty->print_cr(" innativemethod:s,msg)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 staticstaticvoid (JavaThread , const *sg java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
} staticvoidNativeReportJNIWarning thr msg { static char*fatal_using_jnienv_in_nonjava =FATALERROR innative JNIEnv non-avathread; staticconstchar * warn_other_function_in_critical = "Warning: Calling other JNI functions in the scope of " \
} staticconstchar * java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0 staticconstchar * java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 3 char* "JNI received a class argument that is aclass"; staticconstchar * fatal_class_not_a_throwable_class = "JNI Throw or ThrowNew received a class argument that is not a Throwable or Throwable subclass"; staticconstchar * fatal_wrong_class_or_method = "Wrong object class or methodID passed to JNI call"; staticconstchar * fatal_non_weak_method = "non-weak methodID passed to JNI call"; staticconstchar * fatal_unknown_array_object = "Unknown array object passed to JNI array operations"; staticconstchar * fatal_object_array_expected = "Object array expected but not received for JNI array operation"; staticconstchar * fatal_prim_type_array_expected = "Primitive type * totheJNISpecification ("jni/spec/design.html#java_exceptions"): static java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 staticchar*fatal_element_type_mismatch="element mismatch JNI"java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87 staticconstchar * fatal_should_be_static = "Non-static field ID passed to JNI"; staticconstchar * fatal_wrong_static_field = "Wrong static field ID passed to JNI"; staticconstchar * fatal_static_field_not_found = "Static field not found in JNI get/set field operations"; static * able tocheckancode: staticconstchar * fatal_should_be_nonstatic = "Static field ID passed to JNI"; staticconst *
*fatal_wrong_field ="rong field passed to JNI" staticconstchar * fatal_instance_field_not_found = "Instance field not found in JNI get/set field operations"; staticconstchar * fatal_instance_field_mismatch = "Field type (instance) mismatch in JNI get/set field operations"; staticconstchar * fatal_non_string = "JNI * The programmer must call ExceptionOccurred() to exceptions
* theexecution Javamethod staticconstchar * fatal_non_utf8_class_name2 = "\"";
// When in VM state: staticvoid ReportJNIWarning(JavaThread* thr, constchar **
tty->print_cr("WARNING in native method: %s", msg);
thr->rint_stack()
}
// When in NATIVE state: staticvoid NativeReportJNIFatalError(JavaThread* thr, constchar *msg) {
IN_VM(
ReportJNIFatalError(thr, msg);
)
}
/** *staticinline * if thr>as_pending_exception(){ * Therearetwocaseswheretheprogrammerneedstocheckforexceptionswithout *beingabletofirstcheckanerrorcode: * TheJNI JavamethodreturntheresultoftheJavamethod. ceptionOccurred()toforexceptions *that tty->print_cr%",warn_other_function_in_critical)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *-Someof-print_cr(%s,); *throwanArrayIndexOutOfBoundsExceptionorjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 29 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *InallothercheckStaticFieldID(*thrfid,jclasscls,ftype) * *Programmersoftendefendagainstjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *forthesefunctionswouldbepedantic.
*/ staticinlinevoid if (!_oop>is_subtype_of(f_oop)) if (thr- ReportJNIFatalError(thr, fatal_wrong_static_field);
NativeReportJNIWarning(thr, "JNI call made with exception pending");
} if ( (!id->ind_local_field(&fd))
IN_VM(
tty-> ReportJNIFatalError(thr, fatal_static_field_not_found);
thr->get_pending_jni_exception_check());
thr->print_stack();
)
thr-> !(fd.field_type() == T_ARRAYftype = T_OBJECT){
}
}
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 3
cal(JavaThread*thr
{
check_pending_exception);
}
/*
functionEnter(JavaThread* thr)
{ if (thr->in_critical()) {
tty-print_cr(s,warn_other_function_in_critical
}
check_pending_exception/* validate the object being passed and then get its class */
}
staticinlinevoid
java.lang.StringIndexOutOfBoundsException: Range [46, 29) out of bounds for length 46
{ if (thr->in_critical()) {
Klassk_oop=oopObj>lass(;
}
}
inlinevoid
functionExit( ReportJNIFatalError, fatal_wrong_field);
{ // No checks at this time
}
staticinlinevoid
(JavaThread*thr,jfieldID fid,jclass cls int ftype)
{
fieldDescriptor fd;
/* make sure it is a static field */
!:is_static_jfieldID))
ReportJNIFatalError false, &fd))
/* validate the class being passed */
ReportJNIFatalErro(,fatal_instance_field_not_found)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
Klass* k_oop = !fdfield_type(= T_ARRAY & ftype = T_OBJECT)){
/* check for proper subclass hierarchy */
JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fid);
Klass* f_oop = id->holder(); if (!k_oopjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ReportJNIFatalError(thr, fatal_wrong_static_field);
/* check for proper field type */(JavaThread thr,jstring js) if (! ASSERT_OOPS_ALLOWED;
ReportJNIFatalError(thr, fatal_static_field_not_found);
(fd.ield_type( ! ftype &java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
!(fdfield_type( = T_ARRAY & = T_OBJECT) {
ReportJNIFatalError, fatal_non_string);
}
}
/* make sure it is an instance field */ if (fieldIDWorkaround:s_static_jfieldID(fid))
ReportJNIFatalError(thr, fatal_should_be_nonstatic);
/* validate the object being passed and then get its class */
ASSERT_OOPS_ALLOWED;
oop oopObj = jniCheck::validate_object(thr, obj);
ReportJNIFatalError(thr, fatal_non_array);
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 3
}
Klass inline arrayOop
if !jfieldIDWorkaround:is_valid_jfieldID(_op,fid)) {
NIFatalError(thr,fatal_wrong_field);
}
/* make sure the field exists */ int ::rom_instance_jfieldID(k_oop,fid); if (InstanceKlass:(k_oop)-contains_field_offset)
ReportJNIFatalError(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 14
/* check for proper field type */
check_primitive_array_typeJavaThread*thr,jarray , BasicTypeelementType
array_type
(thr fatal_instance_field_not_found);
staticinline check_is_obj_array*,jarrayjArray java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 if(aOop>is_objArray(){
{
ASSERT_OOPS_ALLOWED;
ReportJNIFatalError(thr, fatal_object_array_expected); if ((s == NULL) || !java_lang_String::is_instance(s))
ReportJNIFatalError
}
staticinline Copy wraparrayelementsforcheckingjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
check_is_array(JavaThread* thr, jarray dedMemory:()
{
ASSERT_OOPS_ALLOWED;
arrayOop aOop;
aOop =(arrayOop)::alidate_objectt,jArray); if (aOop == NULL || !aOop->is_array()) {
talErrorthr, );
} return aOopoop =JNIHandles:esolve_non_nullarray)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
}
if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ReportJNIFatalError(thr, fatal_prim_type_array_expected);
} return aOop;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
aOop = if (!guarded.verify_guards {
::cast->()>() if"carray , p2io,p2i(carray))java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
(thr err_msg"s:failed check" );
}
}
staticinline
tty->print_cr-print_cr"s:unrecognized elements.:" carray "PTR_FORMAT
(,jArray); if (!aOop (print_ontty; java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
ReportJNIFatalErrorthr );
}
}
/* wraparrayelementsforbounds. edMemory::get_tag())
*/ staticvoid check_jni_wrap_copy_array(JavaThread* thr,jarray array, void* orig_elements) { void* resultsize_t ;
(
oopswitch(){
size_t len = arrayOop(a)->length() < case0:
TypeArrayKlass::castjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 37
result/
) return;
}
staticvoid* check_wrapped_array(} void* : if (carray == NULL) {
tty>rint_cr("%s: elements vector NULL" PTR_FORMAT, fn_name, p2i(obj));
NativeReportJNIFatalError(thr, "Elements vector NULL");
}
GuardedMemory tty->print_cr(s mode %i releasing array " void* orig_result = guarded.get_tag();
PTR_FORMAT"elements PTR_FORMAT, fn_name,mode,p2i(),p2i())java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
tty->rint_cr(%: arraycheckincorrect ?array: "
PTR_FORMAT " carray: " PTR_FORMAT }
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
(thr ("s failed bounds , fn_name;
} if( = NULL){
tty->print_cr("%s: unrecognized elements. array: ;
fn_name,p2io), p2i()java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
DEBUG_ONLY (thr fatal_bad_ref_to_jni);
NativeReportJNIFatalError(thr, err_msg("%s: unrecognized elements", fn_name));
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*rsz =guarded.get_user_size();
} return orig_result;
}
* check_wrapped_array_releaseJavaThread thrconst* fn_namejava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 void* Method* m = Method::checked_resolve_jmethod_id(m
size_t sz; void* orig_result = check_wrapped_array(thr, fn_name, obj, carray, &sz); switch (mode){ case0:
(orig_result ,sz;
GuardedMemory:ree_copycarray) break; case JNI_COMMIT:
(orig_result,carray,sz);
(thr, ); // For ReleasePrimitiveArrayCritical we must free the internal buffer ;
GuardedMemory:o jniCheck::alidate_objectJavaThread** thr,jobjectobj
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 break; case JNI_ABORT:
GuardedMemory::free_copy if (oopObj=NULL) break; default:
tty->print_crreturn ;
PTR_FORMAT
NativeReportJNIFatalError(thr, "Unrecognizeded unless they are
} return orig_result;
}
oop jniCheck::validate_handle(JavaThread* thr, jobject obj) { if ((obj !=NULL & (NIHandles:handle_type(, )! JNIInvalidRefType)) {
ASSERT_OOPS_ALLOWED;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
}
ReportJNIFatalError(hr fatal_bad_ref_to_jni)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 return NULL;
}
char;
/java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
Method* (,msg) if m= ) java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
ReportJNIFatalErrorthr,fatal_wrong_class_or_method;
} // jmethodIDs are handles in the class loader data, // but that can be expensive so check it last(msgJVM_MAXPATHLEN %%ss,fatal_non_utf8_class_name1,name ) elseif !:is_method_idmethod_id)){
ReportJNIFatalError(thr, fatal_non_weak_method);
} return m;
}
oop jniCheck::validate_object(JavaThread* thr, jobject obj) { if (obj == NULL) return NULL;
ASSERT_OOPS_ALLOWED;
oop oopObj =jniCheck:validate_handle(thr, obj); if (oopObj mirror {
);
} return
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// Warn if a class descriptor is in decorated form; class descriptors // passed to JNI findClass should not be decorated unless they are // array descriptors. void jniCheck: !k=NULL| allow_primitive &java_lang_Class:is_primitive(irror)){ if (name == NULL) return; // implementation accepts NULL so just returnt,fatal_class_not_a_class;
size_t len = strlentoid java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1
if (len >= 2 &&
name0] =JVM_SIGNATURE_CLASS& // 'L'
name[len-1] char[JVM_MAXPATHLEN;
jio_snprintf(msg, JVM_MAXPATHLEN, "%s%s%s Klass k jniCheck:validate_class(hr,clazz,false);
// Check that method is in the,mustbe
ReportJNIWarning(thr, msg);
}
// Verify that the class name given is a valid utf8 string if (!UTF8::is_legal_utf8((const} char msg[JVM_MAXPATHLEN];
jio_snprintf
ReportJNIFatalError if (obj != NULL) {
}
}
Klass assert(recv !=NULL,"validate_object checks that");
ASSERT_OOPS_ALLOWED;
oopmirror=jniCheck::validate_handle(thr, clazz); if (mirror == NULL) {
// Check that object is a subtype of method holder too.
}
if (mirror- ,java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Range [27, 23) out of bounds for length 54
}
*/ // Make allowances for primitive classes ... if (!( (JNIEnv*,
ReportJNIFatalError(thr, fatal_class_not_a_class);
} return k;
}
java.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 43
(klass! ,klass java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 60
!i)|
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
,)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
}
}
iffunctionEnter(hr;
Klass* k = jniCheck::validate_class(thr, clazz (
methodisin theclass,must bebe InstanceKlass if (!InstanceKlass::cast(k)- )
ReportJNIFatalError(thr, fatal_wrong_class_or_method);
}
}
if (obj != NULL) {
oop jniCheck:validate_object(,obj;
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
Klass* rk = recv->klasschecked_jni_FromReflectedMethod *nv
// Check that the object is a subtype of method holder too. if (!rk-f(thr);
ReportJNIFatalError(thr,fatal_wrong_class_or_method)
}
}
)
/* IMPLEMENTATIONFUNCTIONSTABLE
*/
JNI_ENTRY_CHECKED(jclass,
checked_jni_DefineClass(JNIEnvjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 23 const *
jobject loader, const jbyte java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
(JNIEnv*,
functionEnter(thr);
jmethodID ,
jniCheck::validate_object(thr jboolean )
)
jclass result = UNCHECKED()->DefineClass(env, name,IN_VM
() return result;
result=UNCHECKED)>(env,cls ,
JNI_ENTRY_CHECKED(jclass,
checked_jni_FindClassthr; constchar *name))
functionEnter(thr)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
IN_VM(
jniCheck:(thr,name);
)
jclass result = UNCHECKED( java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKEDJNI_ENTRY_CHECKEDjbooleanjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
checked_jni_FromReflectedMethod ,
jobject )
functionEntert);
IN_VM(
:validate_objectthr method)
)
jmethodID result = UNCHECKED()->FromReflectedMethod(env, method);
functionExit return;
JNI_END functionExit(thr);
JNI_ENTRY_CHECKED(jfieldID,
checked_jni_FromReflectedField(JNIEnv *env,
jobject )
functionEnter(thr);
IN_VM(
jniCheck::java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
)
jfieldID result = UNCHECKED()->FromReflectedField(env, field);
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKED(jobject,
checked_jni_ToReflectedMethod(JNIEnv * (thr;
jclass cls,
jmethodID methodID,
isStatic)
functionEnter(thr);
IN_VM(
jniCheck::validate_call(thr, cls, methodID) ()java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
)
jobjectJNI_ENTRY_CHECKED(int
isStatic;
functionExit(thr);
jint,
(JNIEnv*nv,
jthrowable obj))
functionEnter(thr)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
jthrow result = UNCHECKED)-(envjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
oop = jniCheck:validate_object(thr, obj); if (oopObj == NULL) { // Unchecked Throw tolerates a NULL obj, so just warn
(thr," with NULL ");
} else {
jniCheck::UNCHECKED()->ExceptionDescribe(env);
}
)
jint result = UNCHECKED()->Throw(env, obj);
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKED(int
checked_jni_ThrowNewthr->lear_pending_jni_exception_check();
jclass clazz, constchar *msg))
UNCHECKED(>xceptionClear(env)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
IN_VM(
Klass* k = jniCheck::validate_class( (thr)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
assert(k !=JNI_ENTRY_CHECKEDvoid,
::(thr,k;
)
jint result = UNCHECKED()-> constchar *))
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKED(voidJNI_ENTRY_CHECKEDj,
ribe(JNIEnv *env)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
functionEnterExceptionAllowed(thr);
UNCHECKED()->ExceptionDescribe =UNCHECKED)-(env,result)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
functionExit(return res;
JNI_END
JNI_ENTRY_CHECKED(void,
checked_jni_ExceptionClearJNI_END
thr->clear_pending_jni_exception_check();
functionEnterExceptionAllowed(
UNCHECKED()-JNI_ENTRY_CHECKED(jobject,
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 22
JNI_END
JNI_ENTRY_CHECKED( (
iflobj ! NULL){ constchar *msg))
thr->clear_pending_jni_exception_check();
functionEnter( java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
UNCHECKED()->FatalError(env, msg);
functionExit(thr);
JNI_END
JNI_ENTRY_CHECKED(jint,
checked_jni_PushLocalFrame(JNIEnv *env checked_jni_DeleteGlobalRefJNIEnv *env,
jint capacity))
(;
IN_VM(
NativeReportJNIFatalError(thr, "negative capacity");
jint
UNCHECKED-(env)
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
JNI_ENTRY_CHECKED(
java.lang.StringIndexOutOfBoundsException: Range [34, 27) out of bounds for length 40
jobject)
functionEnterExceptionAllowed(thr);
jobject res = UNCHECKED java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 32
functionExit(thr); return UNCHECKED()>DeleteLocalRef(env,);
JNI_END
JNI_ENTRY_CHECKED(jobject,
functionExit(hr)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
jobject lobjJNI_ENTRY_CHECKED(,
functionEnter(thr)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
IN_VM(
)
java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 10
}
)
jobject result = UNCHECKED()->NewGlobalRef(env,lobj);
functionExit(thr); return result;
JNI_END
(oid
jniCheck: ;
}
java.lang.StringIndexOutOfBoundsException: Range [37, 33) out of bounds for length 39
}
jniCheck::validate_object(thr, gref); if (gref && !JNIHandlesjboolean result UNCHECKED(->IsSameObjectenvo,obj2)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
ReportJNIFatalError(thr, "java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
}
)
UNCHECKED()-> ref)
functionExit(thr) (
r =NULL {
(,
checked_jni_DeleteLocalRef(JNIEnv *env,
)
result=UNCHECKED)-(env ref)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
IN_VM(
jniCheck::validate_object(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 if (obj && !(JNIHandles java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 23
JNIHandles )java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
jint=)Ejava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 66 "Invalid java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 18
)
UNCHECKED()->DeleteLocalRef checked_jni_AllocObject(*nv
functionExit()
JNI_END
JNI_ENTRY_CHECKED(jboolean,
checked_jni_IsSameObjectJNIEnv *nvjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
result UNCHECKED)>llocObjectenvc)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
jobject obj2))
functionEnterExceptionAllowed(thr);
IN_VM( /* This JNI function can be used to compare weak global references *toNULLobjects.Ifthejava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 36 *'tthe
*/ if (obj1 != NULL && jobject result = UNCHECKED()->clazzmethodIDargsjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
jniCheck
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(*nv,
jniCheck::validate_object(thr, obj2);
}
)
jboolean result =UNCHECKED()>IsSameObject(env,obj1,obj2);
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKEDjobject,
checked_jni_NewLocalRef(JNIEnv *env,
ref))
functionEnter(thr);
IN_VM jniCheck:validate_call(hr, clazz,methodID) if (ref != jobject ()>(,lazz,methodID,rgs)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
jniCheck:java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}
)
jobject result =UNCHECKED)>(env ref)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
functionExit(thr);
result;
JNI_END
JNI_ENTRY_CHECKED(jint,
ity(JNIEnv *envjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 23
IN_VM if ( jniCheck:validate_call(,clazz,methodID;
NativeReportJNIFatalError(thr, "negative capacity");
}
jintresult =UNCHECKED(-,capacity;
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKED(jobject,
checked_jni_NewObject
clazz,
jmethodID *
...))
functionEnter(thr);
va_list args;
IN_VM(
jniCheck::( ,)
)
va_start(args,methodID;
jobject result = UNCHECKED()->NewObjectV(env,clazz,methodID,args);
va_endjboolean result =(->java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 63
functionExit(thrJNI_END return result;
JNI_END
JNI_ENTRY_CHECKED(jobject,
checked_jni_NewObjectV(JNIEnv *env,
jclass
jmethodID char*,
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 10
functionEnter(thr);
IN_VM =UNCHECKED(-GetMethodIDenvclazz,name,,name,sig);
jniCheck::validate_call(java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 18
)
jobject result (-NewObjectVenv,lazzmethodIDargs;
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKED(jboolean,
(JNIEnv *env,
jobject obj, obj,\
) java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
functionEnter(thr);
IN_VM(
jniCheck::validate_object(thr, obj);
jniCheck::alidate_class(thr, clazz, true);
)
jboolean result = UNCHECKED()->IsInstanceOf(env,obj,clazz);
; return result;
JNI_END
JNI_ENTRY_CHECKED(jmethodID,
checked_jni_GetMethodID(JNIEnv *env,
clazz, constchar *name, constchar *JNI_END java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
functionEnter( ####( *env,\
IN_VM(
jniCheck::validate_classjmethodID methodID java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
)
jmethodID result functionEnter() java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
jniCheck:(, NULL ,obj) java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 return result result=UNCHECKED)>#Result#ethodA(env,obj ,
#define WRAPPER_CallMethod(ResultType, Result) \
JNI_ENTRY_CHECKED(ResultType, \
checked_jni_Call##esult##ethod( env,\
obj java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
jmethodID methodID, \
...))(L)
functionEnter(thr); \
va_list args; \
IN_VM(,
jniCheck checked_jni_CallVoidMethod(*, java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
) \
(,methodID) \
ResultType result =
args); args;
va_end() \
thr->set_pending_jni_exception_check("Call"#Result"Method"); \
functionExitva_start(rgs,; return result; \
JNI_END \
\
JNI_ENTRY_CHECKED(ResultType, \ ##Result##(NIEnvenv, \
obj java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 23
va_list args)) \
functionEnter(thr); \
IN_VM(\
jniCheck:: (;
) \
IN_VM(
WRAPPER_CallMethodjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [27, 18) out of bounds for length 36
RAPPER_CallMethod(jbyteB)
WRAPPER_CallMethod(jshort,Short)
WRAPPER_CallMethod(,Char)
WRAPPER_CallMethod(jint,Int)
WRAPPER_CallMethod(jlong,Long)
WRAPPER_CallMethod(jfloat, jclassclazz, \
WRAPPER_CallMethod(jdouble,Double)
JNI_ENTRY_CHECKED(void,
checked_jni_CallVoidMethod(JNIEnv *env, \
jobject obj, \
jmethodID methodID, \
..))
functionEnter()java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
va_list args;
IN_VM)\
(,methodID); \
)
(args,)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
UNCHECKED()->CallVoidMethodV(env,obj,methodID,args);
va_end(rgs)
thr-set_pending_jni_exception_check"allVoidMethod");
functionExit(thr);
JNI_END
JNI_ENTRY_CHECKED(void,
checked_jni_CallVoidMethodV(JNIEnv *nv,
jobject obj,
jmethodID methodID,
va_list args))
functionEnter(thr)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
IN_VM(
jniCheck::validate_call(thr, NULL, methodID, objJNI_END \
)
UNCHECKEDJNI_ENTRY_CHECKEDResultType, java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
-set_pending_jni_exception_check"")
functionExit(thr);
JNI_END
JNI_ENTRY_CHECKED(void,
checked_jni_CallVoidMethodA(JNIEnv *nv,
jobject obj,
jmethodID methodID, const jvalue * args))
ionEnter)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
IN_VM(
jniCheck:validate_call(hr NULL,methodID,obj)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
)
UNCHECKED()-> obj,\
thr->set_pending_jni_exception_check("CallVoidMethodA");
functionExit(thr);
JNI_END
#define WRAPPER_CallNonvirtualMethod(ResultType, Result) \
JNI_ENTRY_CHECKED(ResultType, \
checked_jni_CallNonvirtual thr>set_pending_jni_exception_check("allNonvirtual"Result"MethodV") java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
,\
java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 ####MethodA *env,\
... ,\
functionEnter(thr); \
va_list args; \ const *args)\
jniCheck::validate_call(thr, clazz, methodID functionEnterthr;\
) \
va_start(args,jniCheck::validate_call,clazz,methodID, obj) java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
result )>##env,\
obj, \
clazz, \
methodID,\
args); \
va_endargs;
thr->set_pending_jni_exception_check thr-set_pending_jni_exception_check""#esult"MethodA);\
functionExit(thr); \ return; \
JNI_END \
\
JNI_ENTRY_CHECKED(ResultType,\
checked_jni_CallNonvirtual##java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 7
,\
jclass clazz, \
jmethodID WRAPPER_CallNonvirtualMethodjshort,Short)
va_list args)) \
functionEnter(thr); \
IN_VM( \
jniCheck:validate_callthr,clazz,methodID,obj) java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
) \
ResultType result =UNCHECKED()->CallNonvirtual##Result##MethodV(env, \
obj, \
clazz, \
methodID, jclassclazz,
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 44
-set_pending_jni_exception_check("CallNonvirtual"#Result"MethodV"); \
functionExit(thr); \ return result; \
JNI_END \
\
JNI_ENTRY_CHECKED(ResultType, \
checked_jni_CallNonvirtual##Result##MethodA(JNIEnv *env, \
jobject obj, \
jclass clazz, \
jmethodID methodID, \ const jvalue * args)) \
functionEnter(thr); \
IN_VM( \
jniCheck::validate_call(thr, clazz, methodID, obj); \
) \
ResultType result = UNCHECKED()->CallNonvirtual##Result##MethodA(env, \
obj, \
clazz, \
methodID,\
args); \
thr->set_pending_jni_exception_check("CallNonvirtual"#Result"MethodA"); \
functionExit(thr); \ return result; \
JNI_END
#define WRAPPER_GetField(ReturnType,ResultJNI_ENTRY_CHECKED(jfieldID,
JNI_ENTRY_CHECKED(ReturnType, \
checked_jni_Get##esult#Field(JNIEnv *env,\
jobject obj, \
jfieldID fieldID)) \
functionEnter(thr); \
IN_VM( \
checkInstanceFieldID(thr, )java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
ReturnType result Jjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 20
#define WRAPPER_SetFieldjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
JNI_ENTRY_CHECKED(void, \
checked_jni_Set##Result##Field *env \
jobject obj, \
jfieldID fieldID, \
ValueType val)) \
functionEnter(thr); \
IN_VM( \
checkInstanceFieldID(WRAPPER_GetField(jint, Intjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
) \
UNCHECKED()->Set##Result##Field(envWRAPPER_GetFieldjdouble , T_DOUBLE
functionExit(thr); \
JNI_END
WRAPPER_SetField(jobject, Object, checked_jni_Set##Result##Field(JNIEnv *env##Field(JNIEnv*nv \
WRAPPER_SetField(jboolean, Boolean, T_BOOLEAN)
WRAPPER_SetField(jbyte, Byte, T_BYTE)
WRAPPER_SetField(jshort, Short, T_SHORT)
WRAPPER_SetField(jchar, CharIN_VM java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
WRAPPER_SetField(jint (>###(,java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 59
WRAPPER_SetField((, ,T_OBJECT
,T_FLOAT
, , )
JNI_ENTRY_CHECKED(jmethodID,
(JNIEnv*,
jclass clazzW(longLong,T_LONG)
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 constchar (
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 5
IN_VMjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
jniCheck::validate_class(thr, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 22
)
jmethodID =UNCHECKED(-GetStaticMethodID,,name,ig)
functionExit(thr); return result;
JNI_END
#define WRAPPER_CallStaticMethod(ReturnType,java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 32
checked_jni_CallStatic##esult( java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 55
checked_jni_CallStatic..java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
jclass clazz IN_VM( \
jmethodID methodID, \
...)) \
functionEnter(thr); \
va_list argsva_start(methodID)\
IN_VM( \
, ,methodID);\
) \
va_start(args,methodID); \
ReturnType result = UNCHECKED()->CallStatic## , \
clazz, \
->set_pending_jni_exception_check(CallStatic"#Result"Method"); \
;\
va_end(args); \
-set_pending_jni_exception_check"CallStatic"Result") \
functionExit(thr); \ return java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 32
jmethodID,
\
JNI_ENTRY_CHECKED(ReturnType, \
checked_jni_CallStatic##Result##MethodV(JNIEnv java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
jclass clazz, \
jmethodID methodID,\
va_list args)) \
functionEnter(thr) \
IN_VM( \
jniCheck::validate_call(thr, clazz, methodID); \
) \
ReturnType result = UNCHECKED()-> args);\
\
methodID, \
checked_jni_CallStaticResult## *,\
functionExit(thr); \ return result;\
JNI_END \
\
JNI_ENTRY_CHECKED(ReturnType, \
checked_jni_CallStatic##Result##ethodAJNIEnv*env, \
jclass clazz, \
jmethodID methodID, \ const jvalue *)\
functionEnter(thr); \
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 71
jniCheck::validate_callm,\
) \
ReturnType result = UNCHECKED()->CallStatic##Result##MethodA(env, \
clazz, \
methodID, \
args); \
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 42
; return
JNI_END
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Range [47, 24) out of bounds for length 47
WRAPPER_CallStaticMethod(jbyte,Byte)
WRAPPER_CallStaticMethod(jshort,Short)
WRAPPER_CallStaticMethod(jchar,Char)
WRAPPER_CallStaticMethod(jint,Int)
WRAPPER_CallStaticMethod(jlong,Long)
WRAPPER_CallStaticMethod(jfloat,Float)
WRAPPER_CallStaticMethod(jdouble,Double)
JNI_ENTRY_CHECKED(void,
checked_jni_CallStaticVoidMethod(JNIEnv *env,
-java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 65
jmethodID methodID,
...))
functionEnter(thr);
va_list args;
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
jniCheck::validate_call(thr, cls, methodID) java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
)
va_start(args,methodID-java.lang.StringIndexOutOfBoundsException: Range [42, 38) out of bounds for length 62
UNCHECKED()->CallStaticVoidMethodV(
va_end(args);
thr->set_pending_jni_exception_check("CallStaticVoidMethod");
functionExit(thr);
JNI_END
JNI_ENTRY_CHECKED(void,
checked_jni_CallStaticVoidMethodV(JNIEnv *env,
jclass cls,
jmethodID methodID
va_list args) )
functionEnter(thr);
IN_VM(
:validate_call(hr , methodID)
)
UNCHECKED()->CallStaticVoidMethodV(env,cls,methodID,args);
thr->java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 7
JNI_ENTRY_CHECKED(fieldID
JNI_END
JNI_ENTRY_CHECKED(void,
checked_jni_CallStaticVoidMethodA( jclass clazzjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
jclass cls,
methodID methodID, const jvalue * args))
functionEnter(thr);
IN_VM(
jniCheck::validate_call(thr, cls, methodID);
)
KED()>CallStaticVoidMethodA(env,cls,methodID,args);
thr->set_pending_jni_exception_check:(,clazz )java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
functionExit(thr);
JNI_END
JNI_ENTRY_CHECKED(jfieldID,
checked_jni_GetStaticFieldID(JNIEnv *JNI_END
jclassjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
JNI_ENTRY_CHECKED(ReturnType java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 charsig))
functionEnter(thr);
IN_VM(
jniCheck:: jfieldID fieldID) \
)
jfieldID = UNCHECKED(-GetStaticFieldID(env,clazz,name,sig);
functionExit(thr); returnresult;;
JNI_END
defineWRAPPER_GetStaticField(ReturnTypeResult,) \
JNI_ENTRY_CHECKED(ReturnType, \
checked_jni_GetStatic##Result##Field(JNIEnv *env, \
fieldID); \
jfieldID fieldID)) \
functionEnter(java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 20
(java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
jniCheck:alidate_class(thr,clazz,false \
checkStaticFieldID(thr, fieldIDWRAPPER_GetStaticFieldjbyte,Byte, T_BYTE)
) \
WRAPPER_GetStaticField(jshort,Short, T_SHORTjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
clazz, \
fieldID); \
functionExit(thr); \ return result; \
JNI_END
WRAPPER_GetStaticField(jobject,#efine ValueType,esult,FieldType)\
WRAPPER_GetStaticField(jboolean, Boolean, T_BOOLEAN)
WRAPPER_GetStaticField(jbyte, Byte, T_BYTE)
WRAPPER_GetStaticField(jshort, Short T_SHORTjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
WRAPPER_GetStaticField(jchar, Char, T_CHAR)
WRAPPER_GetStaticField(jint, Int, T_INT)
WRAPPER_GetStaticField(jlong, Long, T_LONG)
WRAPPER_GetStaticField functionEnter(hr) \
WRAPPER_GetStaticField(jdouble, Double, T_DOUBLE)
WRAPPER_SetStaticField(jobject, Object, T_OBJECT)
java.lang.StringIndexOutOfBoundsException: Range [31, 22) out of bounds for length 52
WRAPPER_SetStaticField(jbyte, Byte, java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
WRAPPER_SetStaticField(jshort, Shortconstjchar *nicodejava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
WRAPPER_SetStaticField(jchar, java.lang.StringIndexOutOfBoundsException: Range [22, 17) out of bounds for length 23
WRAPPER_SetStaticField(jint, Int, T_INT)
WRAPPER_SetStaticField(jlongreturnresult;
WRAPPER_SetStaticField(jfloat, Float, T_FLOAT)
WRAPPER_SetStaticField(jdouble, Double, T_DOUBLE)
JNI_ENTRY_CHECKEDjstring java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
checked_jni_NewString env,
jcharunicode,
jsize len))
onEnter(hr;
jstring resultfunctionExit()java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKED(const jchar *,
checked_jni_GetStringCharsJNIEnv *env,
jstring str,vm_exit_out_of_memory , "hecked_jni_GetStringChars)java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
jboolean *isCopy
functionEnterthr)
IN_VM(
checkString(thr functionExit(thr)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 const jchar *result = UNCHECKEDchecked_jni_ReleaseStringChars(JNIEnv *env,
assert (isCopy == NULL || * str if( !NULL) {
size_t len = UNCHECKED()->GetStringLength(env,str) + 1; // + 1 for NULL termination
len *= sizeof(jchar);
new_result = (jchar*) GuardedMemory checkString(,str; if (new_result == NULL) {
vm_exit_out_of_memory(len, OOM_MALLOC_ERROR, "checked_jni_GetStringChars");
} // Avoiding call to UNCHECKED()->ReleaseStringChars() since that will fire unexpected dtrace probes // Note that the dtrace arguments for the allocated memory will not match up with this solution.
(*)esult)
}
); return new_result;
JNI_END
JNI_ENTRY_CHECKED(void,
JNIEnv *env
jstring "release chars failed bounds chec)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 const jchar *chars)
functionEnterExceptionAllowed(thr);
IN_VM
checkString(thr, str);
) if (chars == NULL) { // still do the unchecked call to allow dtrace probesstr) java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 34
UNCHECKED()->ReleaseStringChars(env,str,chars);
} else {
GuardedMemory guarded) ,
( jchar)guarded());
tty->print_cr("ReleaseStringChars: release chars failed bounds check. " "string: " PTR_FORMAT " java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
guarded.print_on( *)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
jstring result = UNCHECKED()-,)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 "java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for lengtbsp; jobjectArray array,
jsize index,
jobject val))
functionEnter(thr);
IN_VM(
check_is_obj_array(thr, array);
)
UNCHECKED()->SetObjectArrayElement(env,array,index,val);
functionExit(thr);
JNI_END
WRAPPER_NewScalarArray(,Boolean
WRAPPER_NewScalarArray(jbyteArray, Byte)"release failed check.)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
WRAPPER_NewScalarArray(jshortArray, Short)
WRAPPER_NewScalarArray(jcharArray, Char)
WRAPPER_NewScalarArray(jintArray, Int)
WRAPPER_NewScalarArray(jlongArray, Long)
WRAPPER_NewScalarArray(jfloatArray, Float)
WRAPPER_NewScalarArray(jdoubleArray, Double)
#define (, R "
ElementType* \
checked_jni_Get##Result##ArrayElements(JNIEnv *env, \
ElementType#Array array,\
jboolean *isCopy)) \
functionEnter(thr); \
IN_VM( \
check_primitive_array_type(thr, array, java.lang.StringIndexOutOfBoundsException: Range [0, 55) out of bounds for length 5
) \
ElementType *result = UNCHECKED()->Getjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
array, \
isCopy); \ if (result != NULL) { \
( * check_jni_wrap_copy_array(hr,array, result) java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
} \
functionExit(thr); \ return result; \
JNI_END
WRAPPER_GetScalarArrayElements(T_BOOLEAN, jboolean, Boolean)
(T_BYTE, jbyte, )
WRAPPER_GetScalarArrayElements( ;
WRAPPER_GetScalarArrayElementsjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
WRAPPER_GetScalarArrayElementsT, ,
WRAPPER_GetScalarArrayElements(T_LONG, jsize,
WRAPPER_GetScalarArrayElements( ,
WRAPPER_GetScalarArrayElementsT_DOUBLE )
#define WRAPPER_ReleaseScalarArrayElements(ElementTag (-NewObjectArray,lenclazzinit;
JNI_ENTRY_CHECKED(void, \ ##ArrayElements(NIEnv env,\
ElementType##Array array, \
ElementType *elems, \
jint mode) java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
functionEnterExceptionAllowed(thr); \
IN_VM( \
check_primitive_array_type(thr, array, ElementTag); \
ASSERT_OOPS_ALLOWED; \
typeArrayOop a = typeArrayOop(JNIHandles::resolve_non_null(array)); \
) \
ElementType*
thr,
()>##java.lang.StringIndexOutOfBoundsException: Range [51, 47) out of bounds for length 81
(;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
(T_BYTE Byte, )
WRAPPER_ReleaseScalarArrayElements(T_SHORT, jshort, Short, short)
WRAPPER_ReleaseScalarArrayElements(T_CHAR, jchar, Char, char)
WRAPPER_ReleaseScalarArrayElements(T_INT, jint, Int, intjobjectval)
WRAPPER_ReleaseScalarArrayElements(T_LONG, jlong, Long, long)
T,Float)
WRAPPER_ReleaseScalarArrayElementsJjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 27
NI_ENTRY_CHECKEDvoid, java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
WRAPPER_GetScalarArrayRegion(T_BOOLEANWRAPPER_NewScalarArrayjintArray, Int
jbyte, )
WRAPPER_GetScalarArrayRegion(T_SHORT,WRAPPER_NewScalarArray(,Float
r, Char)
WRAPPER_GetScalarArrayRegion(T_INT, jint, Int)
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
WRAPPER_GetScalarArrayRegion(T_FLOAT, jfloat, Float)
WRAPPER_GetScalarArrayRegion(T_DOUBLE, jdouble, Double)
# ElementType#Array ,\
JNI_ENTRY_CHECKED(void, \
checked_jni_Set##Result jbooleanisCopy)) java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
ElementType#Array array, \
jsize start, \
jsize len \ const ElementType *buf)) \
functionEnter(thr); \
IN_VM( \
check_primitive_array_type(thr, array, ElementTag); \
) \
UNCHECKED()->Set##Result##ArrayRegion(env,array,start,len,buf); \
functionExit(thr); \
JNI_END
JNI_ENTRY_CHECKED(jint,
checked_jni_RegisterNativesJNIEnv *env,
clazzjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 const JNINativeMethodjava.lang.StringIndexOutOfBoundsException: Range [37, 30) out of bounds for length 57
jint nMethods))
functionEnter(thr);
jint result = UNCHECKED()->RegisterNatives(env,clazz(T_DOUBLE, jdouble, )
functionExit(java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0 return result;
JNI_END
JNI_ENTRY_CHECKED(jint,
checked_jni_UnregisterNativesJNIEnv *nv,
jclass clazz))
functionEnterthr)
jint result = UNCHECKED()-> ElementType#Arrayarray,\
functionExit(thr); returnresultjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
JNI_END
JNI_ENTRY_CHECKED(jint,
checked_jni_MonitorEntercheck_primitive_array_type,array, ElementTag;java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
jobject obj))
functionEnter(thr);
IN_VM(
jniCheck:(,obj)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
jint )>#Result#rrayElements(,array , );\
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKED(void *,
checked_jni_GetPrimitiveArrayCritical thr;\
jarray array,
jboolean *isCopy))
functionEnterCritical(thr);
IN_VM(
check_is_primitive_array(thr, array);
) void *result = UNCHECKED()->GetPrimitiveArrayCritical(env(T_CHAR,jchar ) if (result != NULL) {
result = check_jni_wrap_copy_array(thr, array, result);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
functionExit(WRAPPER_SetScalarArray(, java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 57 return result;
JNI_ENTRY_CHECKED(void,
java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 56
array, void *carray,
jint mode))
(thr);
IN_VM(
check_is_primitive_array(thr, array);
) // Check the element array... void* orig_result = check_wrapped_array_release(thr, "ReleasePrimitiveArrayCritical",
array, carray, mode, JNI_TRUE);
UNCHECKED()->ReleasePrimitiveArrayCritical(env, ()
functionExit(thr);
JNI_END
JNI_ENTRY_CHECKED ( *java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
functionEnter;
java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
jboolean *isCopy))
functionEnterCritical(thr);
IN_VM
checkString(thr, string);
) const jchar *result = UNCHECKED()->GetStringCritical(env, string, isCopy);
functionExit(thr); returnresult;
JNI_END
JNI_ENTRY_CHECKED(void,
obj))
functionEnterExceptionAllowed(hr; const jchar *chars))
functionEnterCriticalExceptionAllowed(thr))
IN_VM(
checkString(thr, str);
) /* The Hotspot JNI code does not use the parameters, so just check the *stringparameterasaminorsanitycheck
*/
UNCHECKED()->ReleaseStringCritical(env, str, chars);
checkString )
JNI_END
JNI_ENTRY_CHECKEDGetStringRegionenv,str start,len,
checked_jni_NewWeakGlobalRef(JNIEnv *env,
jobject obj))
functionEnter(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
IN_VM str, if (obj != NULL) {
jniCheck:validate_handlethr obj)
}
)
result=UNCHECKED)>NewWeakGlobalRef(nv,obj)
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKED(jboolean,
checked_jni_ExceptionCheck env)
thr->clear_pending_jni_exception_check();
functionEnterExceptionAllowed(thr);
jboolean result java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
functionExit(thr); returnresult;
JNI_END
JNI_ENTRY_CHECKED(jobject,
checked_jni_NewDirectByteBuffer(JNIEnv *env, void *address,
jlong capacity))
functionEnterfunctionExit(thr)
jobject result = java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 18
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKED(java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 33
jobject buf))
functionEnter(thr);
jlong result=UNCHECKED)>GetDirectBufferCapacityenv,buf)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKED(jobjectRefType,
checked_jni_GetObjectRefTypeJNIEnv*env,
jobject obj))
functionEnter( checked_jni_GetString(JNIEnv *env, /* validate the object being passed */
IN_VM(
vjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 42
)
jobjectRefType UNCHECKED)->etObjectRefTypee,obj);
functionExit(thr); return result;
JNI_END
JNI_ENTRY_CHECKED(jint,
java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 38
functionEnter(>clear_pending_jni_exception_check
result)->();
jboolean resultUNCHECKED(->xceptionCheck(env; return(thr;
ret ;
checked_jni_Throw,
checked_jni_ThrowNew,
checked_jni_ExceptionOccurred,
checked_jni_ExceptionDescribe,
functionExit(hr)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
checked_jni_FatalError,
ld,
checked_jni_SetStaticBooleanField,
checked_jni_SetStaticByteField,
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 32
checked_jni_SetStaticShortField,
checked_jni_CallNonvirtualObjectMethodA,
checked_jni_SetStaticLongField,
checked_jni_SetStaticFloatField,
checked_jni_SetStaticDoubleField,
checked_jni_NewBooleanArray,
checked_jni_CallNonvirtua,
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
checked_jni_NewShortArray,
checked_jni_NewIntArray,
checked_jni_NewLongArray,
checked_jni_CallNonvirtual,
checked_jni_NewDoubleArray,
java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
checked_jni_GetByteArrayElements,
checked_jni_GetCharArrayElements,
checked_jni_GetShortArrayElements,,
checked_jni_GetIntArrayElements,
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
checked_jni_GetFloatArrayElements,
checked_jni_GetDoubleArrayElements,
// Returns the function structure struct JNINativeInterface_*checked_jni_NewShortArray
checked_jni_NewFloatArray,
// make sure the last pointer in the checked table is not null, indicating // an addition to the JNINativeInterface_ structure without initializing // it in the checked table.
debug_only(int *checked_jni_GetShortArrayElements, sizeof(*unchecked_jni_NativeInterface) - sizeof(char *));)
checked_jni_GetLongArrayElements, "Mismatched JNINativeInterface tables, check for new entries");
// with -verbose:jni this message will print
log_debug(jni, resolve)("Checked JNI functions java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 41
returnchecked_jni_ReleaseLongArrayElements
}
Messung V0.5 in Prozent
sp;checked_jni_CallIntMethodVjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
checked_jni_GetStaticObjectF
checked_jni_CallLongMethodA,
checked_jni_CallFloatMethod,
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
checked_jni_CallFloatMethodA,
checked_jni_CallDoubleMethodjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
checked_jni_CallDoubleMethodV,
checked_jni_SetStaticObjectFie,
checked_jni_CallVoidMethod,
checked_jni_CallVoidMethodV,
checked_jni_CallVoidMethodA,
checked_jni_CallNonvirtualObjectMethod,
checked_jni_CallNonvirtualObjectMethodV,
java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
checked_jni_CallNonvirtualBooleanMethodjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
checked_jni_CallNonvirtualBooleanMethodV,
checked_jni_CallNonvirtualBooleanMethodA checked_jni_ReleaseStringChars
lByteMethod
checked_jni_GetStringUTFLength
checked_jni_CallNonvirtualByteMethodA,
checked_jni_CallNonvirtualCharMethod,
java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 42
checked_jni_CallNonvirtualCharMethodA,
checked_jni_CallNonvirtualShortMethod,
checked_jni_CallNonvirtualShortMethodV,
checked_jni_CallNonvirtualShortMethodA,
lIntMethod
checked_jni_NewCharArray,
checked_jni_CallNonvirtualIntMethodA,
checked_jni_CallNonvirtualLongMethod,
checked_jni_CallNonvirtualLongMethodV,
checked_jni_CallNonvirtualLongMethodA,
checked_jni_CallNonvirtualFloatMethod,
FloatMethodV
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 31
checked_jni_CallNonvirtualDoubleMethod,
checked_jni_CallNonvirtualDoubleMethodV,
checked_jni_CallNonvirtualDoubleMethodA,
checked_jni_CallNonvirtualVoidMethod,
checked_jni_CallNonvirtualVoidMethodV,
checked_jni_CallNonvirtualVoidMethodA
checked_jni_SetObjectField,
checked_jni_GetLongArrayElements,
checked_jni_SetByteField,
checked_jni_SetCharFieldjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 39
checked_jni_SetShortField,
checked_jni_ReleaseShort,
checked_jni_SetLongField,
checked_jni_SetFloatField,
checked_jni_SetDoubleField,
,
checked_jni_CallStaticObjectMethod,
checked_jni_SetBooleanArrayRegion,
checked_jni_CallStaticObjectMethodA,
checked_jni_CallStaticBooleanMethod,
checked_jni_CallStaticBooleanMethodV,
checked_jni_CallStaticBooleanMethodA,
od,
checked_jni_CallStaticByteMethodVjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
checked_jni_CallStaticCharMethod
checked_jni_CallStaticCharMethodV
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
checked_jni_CallStaticShortMethodV,
checked_jni_CallStaticShortMethodA,
checked_jni_CallStaticIntMethod,
checked_jni_CallStaticIntMethodV,
checked_jni_CallStaticIntMethodA,
d,
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [45, 38) out of bounds for length 46
checked_jni_CallStaticFloatMethod,
checked_jni_CallStaticFloatMethodV,
checked_jni_CallStaticFloatMethodA,
checked_jni_CallStaticDoubleMethod,
checked_jni_CallStaticDoubleMethodV,
checked_jni_CallStaticDoubleMethodA,
checked_jni_CallStaticVoidMethod,
checked_jni_CallStaticVoidMethodV,
checked_jni_CallStaticVoidMethodA,
checked_jni_SetStaticObjectField,
checked_jni_SetStaticBooleanField,
checked_jni_SetStaticByteField,
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
,
checked_jni_SetStaticLongField,
checked_jni_SetStaticFloatField, ,
checked_jni_SetStaticDoubleField,
checked_jni_NewString,
checked_jni_GetStringLength,
checked_jni_GetStringChars,
checked_jni_ReleaseStringCharsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
checked_jni_NewBooleanArray,
// Returns the function structure
checked_jni_NewCharArray,
,
checked_jni_NewIntArray,
checked_jni_NewLongArray,
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 30
checked_jni_NewDoubleArray,
checked_jni_GetBooleanArrayElements,
checked_jni_GetByteArrayElements,
checked_jni_GetCharArrayElements,
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
checked_jni_GetIntArrayElements,
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
checked_jni_GetFloatArrayElements,
checked_jni_GetDoubleArrayElements,
checked_jni_ReleaseBooleanArrayElements,
checked_jni_ReleaseByteArrayElements,
checked_jni_ReleaseCharArrayElements,
checked_jni_ReleaseShortArrayElements,
checked_jni_ReleaseIntArrayElements
,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
checked_jni_ReleaseDoubleArrayElements,
// make sure the last pointer in the checked table is not null, indicating // an addition to the JNINativeInterface_ structure without initializing // it in the checked table.
debug_only(int *lastPtr = (int *)((char *)&checked_jni_NativeInterface + \ sizeof(*unchecked_jni_NativeInterface) - sizeof(char *));)
assert(*lastPtr != 0, "Mismatched JNINativeInterface tables, check for new entries");
// with -verbose:jni this message will print
log_debug(jni, resolve)("Checked JNI functions are being used to validate JNI usage");
return &checked_jni_NativeInterface;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.74 Sekunden
(vorverarbeitet am 2026-10-12)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.