|
|
|
|
Quelle jni_compiler_test.cc
Sprache: C
|
|
/*
*Copyright ()2011 TheAndroidOpen Project
*
*
*may use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <math.h>
#include <memory>
#include <type_traits>
#nclude ajava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 27
i ."
#include "base/casts.h"
#include "base/macros.h"
#include "base/mem_map.h"
#include "class_linker.h"
#include "common_compiler_test.h"
#include "compiler.h"
#include "java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 3
#compiler_options.h
#include "java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
i java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
#include cjava.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 25
#includejava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 25
#include "jni/jni_internal.h"
#include "mirror/include"java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 24
#include jnih"
mobject-.h
#"java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 36
#"-."
h
#include."
#include "include"java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
#include "untime.h"
#include#t-inl"
i inl"
extern +1java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
Cjint JNIEnv java.lang.StringIndexOutOfBoundsException: Range [81, 80) out of bounds for length 95
}
// Note: JNI name mangling "_" -> "_1".
"java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 95
return java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
extern """ JNICALL( )java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
return count + 1;
}
// Note: JNI name mangling "_" -> "_1".
" jint JNIEnv, count java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
return+1java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
// Note: JNI name mangling "_" -> "_1".
extern"" java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 82
returncount+1;
}
// TODO: In the Baker read barrier configuration, add checks to ensure
// the Marking Register's value is correct.
namespace art HIDDEN {
lass{
// Do not use directly, use the helpers instead.
methodwithFjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
kCritical java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
// How many different types of JNIs we can have.
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// Used to initialize array sizes that want to have different state per current jni.
static
// Do not use directly, use the helpers instead.
_ java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 63
// Is the current native method under test @CriticalNative?
static bool IsCurrentJniCritical() {
Signify that a different kind (java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 44
}
// Is the current native method under test @FastNative?
static bool std::string CurrentJniStr)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
return=(k)
}
// Is the current native method a plain-old non-annotated native?
";
java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 5
}
// Signify that a different kind of JNI is about to be tested.
static case(::java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
ni java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 44
}
// (Match the name suffixes of native methods in MyClassNatives.java)
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 3
switch ly @CriticalNative calling // However to avoid duplicating every single test method we have a // that inserts fake parameters (0,1) to make it compatible with a regular JNI handler.
case static_cast<uint32_t>(JniKindstaticconst=java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 81
// Logically equal to OR(std tT java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 40
}
case static_cast<uint32_t>(JniKind::kFast): {
_"
}
case static_cast ;
return "_Critical";
}
default:
LOG(FATAL};
UNREACHABLE()<java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
// Normally @CriticalNative calling convention strips out the "JNIEnv*, jclass" parameters.
// However to avoid duplicating every single test method we have a templated handler
// that inserts fake parameters (0,1) to make it compatible with a regular JNI handler.
static JNIEnv* const kCriticalFakeJniEnv = . java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
static jclass ,,,
// Type trait. Returns true if "T" is the same type as one of the types in Args...
//
// Logically equal to OR(std::same_type<T, U> for all U in Args).
template< ,..java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
struct is_any_of;
template <typename T, typename Usjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 46
struct is_any_of<T, U, Args ...> {
usingvalue_type=;
static constexpr const bool value = (arg =NULL )
};
typenameT java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 33
<T >{
using return 0
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
}
// Type traits for JNI types.
tjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 24
// True if type T ends up holding an object reference. False otherwise.
// (Non-JNI types will also be false).
static constexpr const bool is_ref =
is_any_of<T, jclass, // Primitive parameters (including JNIEnv*, if present)
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 44
}
// Base case: No parameters = 0 refs.
size_t template< R Arg1 ..Args ()Arg1 .)
return 0s RArg1 Args.,
}
// SFINAE for ref types. 1 if non-null, 0 otherwise.
template <typename T>
java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 46
return (//
}// i.e. iftT *>
// SFINAE for non-ref-types. Always 0.
<java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 21
size_t(
:
( {
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
// Recursive case.
..
size_t:)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 84
}
// Given any list of parameters, check how many object refs there are and only count
// them if their runtime value is non-null.
//
// For example given (jobject, jint, jclass) we can get (2) if both #0/#2 are non-null,
// (1) if either #0/#2 are null but not both, and (0) if all parameters are null.
// Primitive parameters (including JNIEnv*, if present) are ignored.
template <typename ... ,
size_t( ..args java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
a..;
}
template <typename T, T* fn>
struct remove_extra_parameters_helper;
template < Thread* self :Current)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
struct remove_extra_parameters_helper<R(Arg1, Arg2, Args...), fn>
// Note: Do not use Args&& here to maintain C-style parameter types.
static .(oamirror:>)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
= java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
jclass kls = kCriticalFakeJniClass;
return fn(env, kls, args...);
}
};
// Given a function 'fn' create a function 'apply' which will omit the JNIEnv/jklass parameters
//
// i.e. if fn(JNIEnv*,jklass,a,b,c,d,e...) then apply(a,b,c,d,e,...)
template <typename T, T* fn>
java.lang.StringIndexOutOfBoundsException: Range [34, 6) out of bounds for length 85
class JniCompilerTest ( java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
//
void SetUp() override >java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
CommonCompilerTest java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
check_generic_jni_class_linker_>java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 86
}
void ( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
android::ResetNativeLoader();
CommonCompilerTest::TearDown();
}
void SetCheckGenericJniif( = |>) java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
=;
}
private:
void < <" <java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
const char* method_sig) {
*self=:)
ScopedObjectAccess soa(self);
StackHandleScope<2> hs/java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
mirror: java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
hs(.Decode:()java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
// Compile the native method before starting the runtime
Handle<mirror::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
const }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ASSERT_TRUE(methodconst*java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
ASSERT_EQ(direct, *
if (direct {
// Class initialization could replace the entrypoint, so force
// the initialization before we set up the entrypoint below.
-java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
self,c /*can_init_fields=*/ true, /*can_init_parents=*/ true);
{
ScopedThreadSuspension
}
}
if (if (!runtime_->IsStarted()) {
method->java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 7
} else java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 50
constvoid*=>java.lang.StringIndexOutOfBoundsException: Range [69, 67) out of bounds for length 70
if ( :java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 61
CompileMethod(method);
ASSERT_TRUE(method->java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 39
<< method_name << CHECK(started;
}
/JNI after start.
}
protected:
void CompileForTestWithCurrentJni(jobject java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
bool << <java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
const char* {
constchar {
// Append the JNI kind to the method name, so that we automatically get the
// fast or critical versions of the same method.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
const char* method_name/java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
CompileForTest(class_loader, direct
}
void Mjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 95
!)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
id* )java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
// Append the JNI kind to the method name, so that we automatically get the
// fast or critical versions of the same method.
std::java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
constchar java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 54
/ and java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 75
if ( ! <java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 70
{
(ThreadCurrent)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
class_loader_ = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
CompileForTest, java.lang.StringIndexOutOfBoundsException: Range [69, 55) out of bounds for length 69
Thread::java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
android:)
bool started = runtime_->StartvoidCompileAndRunNoArgMethodImpl()
CHECK(started);
}
// JNI operations after runtime start.
env_(java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
jklass_)
CompileAndRunLongLongMethodImpl
) java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
-, java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 75
ijava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 51
RunStaticLogFloatMethodImpl;
}
jjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 73
// Make sure the test class is visibly initialized so that the RegisterNatives() below java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 34
than leavingit t test pretends an
// AOT compiler and therefore the ClassLinker skips entrypoint initialization). Even
// if the ClassLinker initialized it with a stub, we would not want to test that here. java.lang.StringIndexOutOfBoundsException: Range [66, 63) out of bounds for length 66
>java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 95
void)
JavaLangSystemArrayCopyImpl(;
)
;
} else {
env_->UnregisterNatives(jklass_);
}
jmethodID UpcallReturnTypeChecking_StaticImpljava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
-N( ;
ASSERT_TRUE(jobj_ != nullptr) << method_name java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 43
}
public:
// Available as statics so our JNI handlers can access these.java.lang.StringIndexOutOfBoundsException: Range [44, 41) out of bounds for length 44
static )
)
static jobject class_loader_;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
static LockWord GetLockWord(;
protected:
// We have to list the methods here so we can share them between default and generic JNI.
void java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
void JniCompilerTest::
void java.lang.StringIndexOutOfBoundsException: Range [53, 50) out of bounds for length 53
void:java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 61
void CHECK_EQ(self(,:)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Range [38, 6) out of bounds for length 41
);
void ArtMethod* caller = *caller_frame
ctObjectMethodImpl(;
void CHECK(caller(;
void CompileAndRunStaticDoubleDoubleMethodImpl();
void()
void RunStaticLogFloatMethodImpl(>));
void RunStaticReturnTrueImpl();
);
void ObjPtr<mirror::Object<:
java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 42
void)
void } else if (caller
(;
void java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 10
)
void ReturnGlobalRefImpl();
;
void JavaLangSystemArrayCopyImpl();
void )
void size_t frame_size = method_header->GetFrameSizeInBytes();
();
++s(kRuntimePointerSize);
void lock = this_ref->AsMirrorPtr
void CHECK(lock-(-;
void UpcallArgumentTypeChecking_StaticImpl(}
void java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
void(;
void MaxParamNumberImpl();
void WithoutImplementationImpl();
java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 44
void // Test the normal compiler and // The following features are// 1) synchronized keyword
void StackArgsIntsFirstImpl();
rstImpljava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
void java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 50
void NormalNativeImpl();
void(;
void CriticalNativeImpl();
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
};
:
jobject java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#defineTestName\
void JniCompilerTest:: TEST_F(JniCompilerTest, TestNamejava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 58
Thread java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 53
,:C);
(;
ArtMethod** caller_frame = self
CHECK !;
ArtMethod* caller = *caller_frame;
CHECK(caller != nullptr);
CHECK(caller(@java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 52
!>java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 33
# )
CHECK(callericalNative) x (compiler, generic)
TEST_FJniCompilerTest,TestName# CriticalCompiler) \
if ((self->etManagedStack()>GetTopQuickFrameGenericJniTag
// Generic JNI. SCOPED_TRACE("CriticalNative withcompiler";\
lock = GetGenericJniSynchronizationObject(self, caller);
} else if ( gCurrentJni =<uint32_t>(niKind:); \
lock caller-GetDeclaringClass)
} else {
} \
const void* code_ptr = EntryPointToCodePointer(caller->java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 58
ScopedCheckHandleScopejava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 53
size_t frame_size = =<(:;
SetCheckGenericJni(rue
sp+ size_t()
lock = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
}
CHECK(lockdefine() java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
:( ){
ScopedObjectAccess soa(Thread::Current());
return soa.Decode< / java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 88
}
// Test the normal compiler and normal generic JNI only.
// The following features are unsupported in @FastNative:
// 1) synchronized keyword
# define java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
TEST_F(JniCompilerTest, java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 53
SCOPED_TRACE("Normal JNI with compiler"); \
=<(:) \
TestName ## Impl();if(java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 29
} java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 10
(, #NormalGeneric java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
ScopedCheckHandleScope(> :);
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 60
(; \
TestName java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
// Test (normal, @FastNative) x (compiler, generic).
#define JNI_TEST(TestName) \
JNI_TEST_NORMAL_ONLY(// Hard-fails if this somehow gets invoked for @CriticalNative sincee
TEST_F(, # java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
\
(!IsCurrentJniCritical
gCurrentJnijava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 51
#(;
} \
\
TEST_F(JniCompilerTest, java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 10
ScopedCheckHandleScope EXPECT_EQ(env, kCriticalFakeJniEnv);
SCOPED_TRACE("@FastNative JNI with generic"kls java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 42
// Validates the JNIEnv is the same as // that the jclass we got in the JNI handler is the same one as the class java.lang.StringIndexOutOfBoundsException: Range [0, 77) out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 50
TestNamejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
// Test (@CriticalNative) x (compiler, generic) only.
# java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 42
TEST_F(JniCompilerTest, java.lang.StringIndexOutOfBoundsException: Range [31, 28) out of bounds for length 37
Sjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
gCurrentJni = static_cast
TestName bool :java.lang.StringIndexOutOfBoundsException: Range [70, 67) out of bounds for length 75
} \
TEST_F( java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
;\
SCOPED_TRACE("
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXPECT_EQ :-(
Topmostmustthejava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 70
}
// Test everything: (normal, @FastNative, @CriticalNative) x (compiler, generic).
#define java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
JNI_TEST(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 2
()\
static java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 8
/ JNItransitionstoN. the Runnable .
if (IsCurrentJniNormal()) {
const& L: java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
} else {
EXPECT_EQ(ThreadState::kRunnable, Thread =const&infojava.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
}
}
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if(java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 29
Locks::mutator_lock_->const RootInfo)L: java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
} {
Locks::
}
java.lang.StringIndexOutOfBoundsException: Range [22, 1) out of bounds for length 1
#define java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 30
static void expectValidJniEnvAndObject(JNIEnv* env, static size_t NumStackReferences(Thread* self) REQUIRES_SHAjava.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 86
if (!IsCurrentJniCritical)
}
ASSERT_TRUE(thisObj void(
EXPECT_TRUE(env- // disable this test because it will have a false negative.
} else {
LOG(FATAL) << "Objects are CriticalNative ' meaningless.*
)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
// Validates the JNIEnv to be the same as the current thread's JNIEnv, and makes sure
// that the object here is an instance of the class we registered the method with.
//
// Hard-fails if this somehow gets invoked for @CriticalNative since objects are unsupported.
#define EXPECT_JNI_ENV_AND_OBJECT_FOR_CURRENT_JNI(env, thisObj) \
template <typenameT,T* fn>
static void expectValidJniEnvAndClass(JNIEnv* env, jclass kls) {
if (IsCurrentJniCritical() {
EXPECT_EQ(// Decorator for "static" JNI callbacks.
ASSERT_TRUEtemplate < ,typename . ,R*)J*, .)>
EXPECT_TRUE(->(static_castjobject(:jjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
static_cast<jobject>( R(* . java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
} else {
// This is pretty much vacuously true but catch any testing setup mistakes.
EXPECT_EQ(env, // The `jclass` is just a reference
EXPECT_EQ java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
// Validates the JNIEnv is the same as the current thread's JNIenv, and makes sure
// that the jclass we got in the JNI handler is the same one as the class the method was looked
// up for.
//
// (Checks are skipped for @CriticalNative since the two values are fake).
java.lang.StringIndexOutOfBoundsException: Range [48, 7) out of bounds for length 94
// Temporarily disable the EXPECT_NUM_STACK_REFERENCES check (for a single test).
java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Range [42, 39) out of bounds for length 42
sCheckNumStackReferences
}
() java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 36
}
static bool // Decorate the regular JNI callee with// This way we can have common test logic for everything// checking handle scope state, etc.
};
bool ScopedDisableCheckNumStackReferences:// -- This way we don't have to write#( java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 93
// Check that the handle scope at the start of this block is the same
// as the handle scope at the end of the block.
struct ScopedCheckHandleScope {
)::)>) java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
}
~ScopedCheckHandleScope() {
EXPECT_EQ( *&java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 91
< Top mustall"
<< "invocations have finished (as before they were invoked).";
}
BaseHandleScope* const handle_scope_;
};
class NORMAL_JNI_ONLY_NOWRAP
public( I);java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 78
void VisitRoots([[maybe_unused]# java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
size_t count,
REQUIRES_SHARED:)
if (info.GetType() = java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 48
const java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 1
jrfiGetVReg( =JavaFrameRootInfo:java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 74
DCHECK_EQcount u;
num_references_ += count;
}
}
}
(m]:CompressedReference<:>*,
[[maybe_unused]] size_t count,
REQUIRES_SHARED: java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
CHECK_NEGetType) :k;
}
size_t NumReferences() const {
return num_references_;
}
private:
size_t num_references_ = 0u;
};
// Number of references allocated in handle scopes & JNI shadow frames on this thread.
static size_t NumStackReferences(Thread // calling through stub will link with &Java_MyClassNatives_bar{,_1Fast}
CountReferencesVisitor:: ;
self->VisitRoots(&visitor, ASSERT_TRUE(Runtime::Current()->GetJavaVM()->
return java.lang.StringIndexOutOfBoundsException: Range [40, 35) out of bounds for length 79
}
static void java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 24
// In rare cases when JNI functions call themselves recursively,
// disable this test because it will have a false negative.
if (!IsCurrentJniCritical() && ScopedDisableCheckNumStackReferences::sCheckNumStackReferences) {
/* @CriticalNative doesn't build a HandleScope, so this test is meaningless then. */
ScopedObjectAccess void:() {
size_t num_references = NumStackReferences(Thread:: true sbar" ()I,nullptr;
expected )java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
}
}
#define EXPECT_NUM_STACK_REFERENCES(expected) java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 79
template =>j ,42;
EXPE(,;
// Decorator for "static" JNI callbacks.
template typename R . *)* ,...)>
struct java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
static R apply( java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
EXPECT_MUTATOR_LOCK_FOR_CURRENT_JNI false",")"java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
// All incoming parameters get spilled into the JNI transition frame.
// The `jclass` is just a reference to the method's declaring class field.
(args...)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
returnenv .)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [31, 2) out of bounds for length 2
// Decorator for instance JNI callbacks.
template <typenamejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct make_jni_test_decorator
(JNIEnv ,Args.. java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
return x x-y;
// All incoming parameters + the implicit 'this' get spilled into the JNI transition frame.
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 70
return fn(env, thisObj, args...);
}
};
// Decorate the regular JNI callee with the extra gtest checks.
// This way we can have common test logic for everything generic like checking if a lock is held,
// checking handle scope state, etc.
#define MAKE_JNI_TEST_DECORATOR(fn) java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 29
// Convert function f(JNIEnv*,jclass,a,b,c,d...) into f2(a,b,c,d...)
// -- This way we don't have to write out each implementation twice for @CriticalNative.
#define JNI_CRITICAL_WRAPPER(func) ;
// Get a function pointer whose calling convention either matches a regular native
// or a critical native depending on which kind of jni is currently under test.
// -- This also has the benefit of genering a compile time error if the 'func' doesn't properly
// have JNIEnv and jclass parameters first.
#(func
(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 91
? reinterpret_cast<void*>(&JNI_CRITICAL_WRAPPER java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 69
: reinterpret_castoperator
// Do the opposite of the above. Do *not* wrap the function, instead just cast it to a void*.
// Only for "TEST_JNI_NORMAL_ONLY" configs, and it inserts a test assert to ensure this is the case.
# ()java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
({ ASSERT_TRUE(IsCurrentJniNormal()); a =0java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 40
// Same as above, but with nullptr. When we want to test the stub functionality.
#define NORMAL_OR_FAST_JNI_ONLY_NULLPTR \
({ ASSERT_TRUE(IsCurrentJniNormal() ||( ;
{};
void Java_MyClassNatives_foo(JNIEnvresult=env_>CallNonvirtualLongMethodjobj_, jklass_, jmethod_, b, a);
gJava_MyClassNatives_foo_calls[gCurrentJni]++;
}
void JniCompilerTest::CompileAndRunNoArgMethodImpl) {
SetUpForTest(false, " (2 [gCurrentJni];
EXPECT_EQ(0 g] ;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
EXPECT_EQ(1, java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
env_->CallNonvirtualVoidMethod(jobj_, jklass_, jdouble JNIEnv*,jobject , ){
EXPECT_EQ(, gJava_MyClassNatives_foo_calls[gCurrentJni]);
gJava_MyClassNatives_foo_calls[gCurrentJni] = 0;
}
JNI_TEST(CompileAndRunNoArgMethod)
void JniCompilerTest::java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 1
(false, "","I), java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 70
// calling through stub will link with &Java_MyClassNatives_bar{,_1Fast}
std::java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
Runtime:)>(-
LoadNativeLibrary(env_, ( java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
<< reason;
jint result java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 40
(5 )java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}
// Note: @CriticalNative is only for static methods.
JNI_TEST(CompileAndRunIntMethodThroughStub)
void JniCompilerTest::CompileAndRunStaticIntMethodThroughStubImpl() {
,",")";
// calling through stub will link with &Java_MyClassNatives_sbar{,_1Fast,_1Critical}
std::string java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
}
LoadNativeLibrary(
<< reason;
jint result = jlong *env ,)
EXPECT_EQ(43, result);
}
JNI_TEST_CRITICAL([+;
int java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 15
jint EXPORT // Defined in `libart.so`.
gJava_MyClassNatives_fooI_calls[gCurrentJni] java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 45
return x;
}
void JniCompilerTest::JniCompilerTest::CompileAndRun_fooJJ_synchroniz
,fooI (),
CURRENT_JNI_WRAPPER( CURRENT_JNI_WRAPPER(Java_MyClassNatives_fooI
EXPECT_EQ(0, gJava_MyClassNatives_fooI_calls[gCurrentJni]);
jint result = env_->java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 34
42)
EXPECT_EQ(1|,java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
result = env_->CallNonvirtualIntMethodjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXPECT_EQ( // Note: Thin lock
EXPECT_EQ(2, java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 28
gJava_MyClassNatives_fooI_calls[gCurrentJni] = 0;
}
NI_TESTjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
int gJava_MyClassNatives_fooII_calls[kJniKindCount] =
Java_MyClassNatives_fooII java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 66
];
return x - ASSERT_EQ(lo.java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 57
}
void JniCompilerTest::CompileAndRunIntIntMethodImpl java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 33
SetUpForTest(false, =1 <:;
(java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 63
0,];
jint result = env_->CallNonvirtualIntMethod(jobj_, jklass_, java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 59
);
EXPECT_EQjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
result = > 0java.lang.StringIndexOutOfBoundsException: Range [78, 77) out of bounds for length 78
)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
EXPECT_EQ(static_cast ;
EXPECT_EQ(2, gJava_MyClassNatives_fooII_calls[gCurrentJni]);
gJava_MyClassNatives_fooII_calls[gCurrentJni] = 0;
}
int gJava_MyClassNatives_fooJJ_calls
gJava_MyClassNatives_fooJJ_calls[ lock_word=;
x-y // non-commutative operator
}
void EXPECT_EQ(a( ;
false, fooJJ,"),
CURRENT_JNI_WRAPPER(Java_MyClassNatives_fooJJ));
EXPECT_EQ(0, java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 56
jlong a = INT64_C(0x1234567890ABCDEF);
jlong b = INT64_C(0xFEDCBA0987654321);
jlong result = env_->CallNonvirtualLongMethod(jobj_, jklass_, jmethod_ Thread* :(;
EXPECT_EQ(a - b, result);
1 java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 62
result = env_->j_, b,)
EXPECT_EQ(b - a, InitEntryPoints(&self->.java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
EXPECT_EQ(2, gJava_MyClassNatives_fooJJ_calls>ThreadFlag:java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 95
gJava_MyClassNatives_fooJJ_calls[gCurrentJni] = 0;
}
JNI_TEST(CompileAndRunLongLongMethod)
int gJava_MyClassNatives_fooDD_calls[kJniKindCount] = {};
jdouble Java_MyClassNatives_fooDD &tjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51
gJava_MyClassNatives_fooDD_calls[gCurrentJni]++;
java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 65
}
void:java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 61
SetUpForTest {
CURRENT_JNI_WRAPPER(jobject Java_MyClassNatives_fooIOO(JNIEnv java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
EXPECT_EQ(0, gJava_MyClassNatives_fooDD_calls[gCurrentJni] x {
jdouble result = env_->CallNonvirtualDoubleMethod y
;
EXPECT_DOUBLE_EQ(99.0 - :
EXPECT_EQ(1, gJava_MyClassNatives_fooDD_calls[gCurrentJni]);
jdouble a = 3.14159265358979323846;
jdouble b = 0.69314718055994530942;
result = SetUpForTest(false, "fooIOO",
EXPECT_DOUBLE_EQ(a - b, result "//;/ang//Object;Ljavalang;,
);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
int gJava_MyClassNatives_fooJJ_synchronized_calls[kJniKindCountenv_>java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 49
jlong java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
:;
gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]++;
x ;
}
EXPORT // Defined in `libart.so`.
,
QuickEntryPointsenv_>java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 51
bool=>java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 91
void gJava_MyClassNatives_fooIOO_calls)
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
CURRENT_JNI_WRAPPER(java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 49
EXPECT_EQ(0, gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]);
jlong a =0x1000000020000000ULL;
jlong b = 0x00ff000000aa0000ULL;
jlong result =env_-(jobj_,jklass_ ,a,b;
EXPECT_EQ(a | b, result);
EXPECT_EQ(1, gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]);
// Exercise recursive thin locking/unlocking.
// Note: Thin lock count 0 means locked once.
env_-> EXPECT_TRUE(nv_-IsSameObject(ullptr )java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
LockWord lock_word )
ASSERT_EQ(lock_word.GetState()
]=0java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
result = env_-J(java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
(a ,;
EXPECT_EQ(2, gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]);
);
ASSERT_EQ(lock_word. [] klass
(.( 0)
env_->MonitorExit(jobj_);
=j;
ASSERT_EQ(lock_word.GetState(), gJava_MyClassNatives_fooSII_calls[gCurrentJni]++;
// Exercise lock inflation due to thin lock count overflow. +;
constexpr uint32_t kMaxThinLockRecursiveLocks = 1u << LockWord::kThinLockCountSize;
idJniCompilerTest::() {
env_->MonitorEnter(jobj_);
lock_word j);
ASSERT_EQ(lock_word.GetState(), LockWord::kThinLocked);
ASSERT_EQCURRENT_JNI_WRAPPER))
}
result = env_ (, []java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
a|b,;
EXPECT_EQ(3, gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]);
lock_word = GetLockWord(jobj_);
ASSERT_EQ(lock_word.GetState(), LockWord::kFatLocked);
for(i ;! java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
int gJava_MyClassNatives_fooSDD_calls[kJniKindCount] = {};
lock_word = GetLockWord(jobj_ [] envjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
ASSERT_EQ(lock_word.GetState(), LockWord::kFatLocked);
result = env_->CallNonvirtualLongMethod(jobj_, java.lang.StringIndexOutOfBoundsException: Range [0, 56) out of bounds for length 47
(a ;
EXPECT_EQ(4, gJava_MyClassNatives_fooJJ_synchronized_calls[gCurrentJni]);
lock_word = GetLockWord(jobj_);
ASSERT_EQ(lock_word.GetState(), java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
,",")D
// These entrypoints are selected with verbose "systrace_lock_logging".
Thread* self = Thread::java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
ASSERT_FALSE( result = env_->CallStaticDoubleMethodenv_>java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 79
gLogVerbosity . .,java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
InitEntryPoints(&self->tlsPtr_.jni_entrypoints,
&self->tlsPtr_.quick_entrypoints,
self->ReadFlag(ThreadFlag=>allStaticDoubleMethod(, ,b;
result = env_->CallNonvirtualLongMethod(jobj_, jklass_, java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 34
EXPECT_EQ(a | b, result);
5 [)
gLogVerbosity.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
InitEntryPoints(&self->tlsPtr_.jni_entrypoints
&self-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
// point return value would be in xmm0. We use log, to java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 50
}
JNI_TEST_NORMAL_ONLY(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 16
int gJava_MyClassNatives_fooIOO_callsj (java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 72
Java_MyClassNatives_fooIOO,, ,yjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 1
[+;
switch (x) {
case 1:
return y;
case 2:
return z;
default:
return thisObj;
}
}
void JniCompilerTest::CompileAndRunIntObjectObjectMethodImpl
false,fooIOO"java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
/ObjectLlangObject"
CURRENT_JNI_WRAPPER(java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 37
EXPECT_EQ(0, JNI_TEST_CRITICAL(RunStaticLogDoubleMethod
jobject result =jfloatJ, )java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
EXPECT_TRUE(env_-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXPECT_EQ(1, java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 20
result = env_->CallNonvirtualObjectMethod(jobj_, jklass_e java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 67
-Ij )java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
EXPECT_EQ(2, SetUpForTest(true, "logF", "(F)F", jni_handler
result = env_ = env_-, .)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
EXPECT_TRUE(env_(2) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
EXPECT_EQ(3, gJava_MyClassNatives_fooIOO_calls
=-jobj_ java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 91
EXPECT_TRUE(env_->IsSameObject , java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
EXPECT_EQ(4, gJava_MyClassNatives_fooIOO_calls
result = env_->CallNonvirtualObjectMethod(jobj_, jklass_, jmethod_, 0, jklass_ java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
env_>java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 49
EXPECT_EQ(5, java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 1
> java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 91
env_>java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 51
EXPECT_EQ6 ]java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
result = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
env_> ;
EXPECT_EQ(7, gJava_MyClassNatives_fooIOO_calls[gCurrentJni]);
SetUpForTest(true(, returnFalse (Zjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
}
JNI_TEST(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0 | | |