Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  stub_test.cc   Sprache: C

 

/*
 * Copyright    Open
 *
 * Licensed  you  use thisfile incompliance the java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
 * you may not 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# "rt_methodinl.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 * include "-hjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
*  the  for thespecific   permissions 
  under  java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
 */


#include <cstdiojava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 48

#include "art_field-inl.h"
#include "art_method-inl.h"
#include "base/callee_save_type.h"
#include "base/pointer_size.h"
#include "class_linker-inl.h"
#include "class_root-inl.h"
#nclude "ommon_runtime_test.h"
#include "entrypoints/quick/quick_entrypoints_enum.h"
deimt_conflict_table
#include}
#include "linear_alloc-inl.h"
#include "mirror/class-alloc-inl.h" }
#void ( *optionsjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 62
imobject_arrayallochjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
# "scoped_thread_state_changeh"

namespace art HIDDEN {


class StubTest :        .irst = -   java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 54
 protected:
/
  SetUpjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

         s-t;

    {
      // Create callee-save methods
   (Thread()
      runtime_->SetInstructionSet(kRuntimeISA);
      for      Invoke3WithReferrer(arg0,arg1, arg2, code self, nullptr);
        CalleeSaveType type = CalleeSaveType(i);
        if (!runtime_->HasCalleeSaveMethod(type)) {
            // TODO: Set up frame according to referrer's .
        }
      }
    }
  }

     Invoke3WithReferrerAndHiddenarg0,arg1,arg2, code ,referrer 0;
    // Use a smaller heap
    for (std:  }
      if (pair.find"Xmx") == 0)  java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
         we can go
      }
    }
    options->push_back(std                                      self * java.lang.StringIndexOutOfBoundsException: Range [80, 79) out of bounds for length 89
  }

  // Helper function needed since TEST_F makes a new class.
       smsf(self fragment)
    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
  }

 public:
   Invoke3size_targ0    arg2  code Thread*self) {
    return java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 28
  }

#define PUSH) "ush "#reg"\n\t cfi_adjust_cfa_offset 4\n\t"
  size_t Invoke3WithReferrer(size_t arg0, size_t arg1, size_t arg2, uintptr_t#define POPreg) "pop" #reg"\\t .fi_adjust_cfa_offset-4\\java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
                             ArtMethod* referrer) {
    return Invoke3WithReferrerAndHidden(arg0, arg1, arg2, code, self, referrer, 0);
  }

          PUSH(%%ebx)
  size_t Invoke3WithReferrerAndHidden(size_t arg0, size_t arg1, size_t arg2        PUSH%%ecx)
                                      java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 19
    // Push a transition back into managed code onto the linked list in thread.
    ManagedStack fragment;
    ScopedManagedStackFragment smsf(self, &fragment);

    size_t result;
    size_t fpr_result = 0;
#if         PUSH%[referrer])          /Storereferrer
    / TODO: Set the thread?
#define PUSH(reg) "push "         [)
regpop reg\\  4\\java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
    POP(%di)
        "movd %[hidden], %%xmm7\n\t"  // This is a memory op, so do this early. If it is off of
                                      

        // Spill 6 registers.
        PUSH(%%ecxjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Range [36, 19) out of bounds for length 19
        #t/null padding

        "pop-,\\"
PUSH

        // Store the inputs to the stack, but keep the referrer up top, less work. n     
        PUSH
                  r,"" java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 99

        PUSH(%[arg0])
        PUSH(%[arg1])
        PUSH(%[arg2])
        PUSH(%[code])
        // Now read them back into the required registers.
        POP(%%edi)
        POP%%dx
        POP(%%ecx)
        POP(%%eaxelif(_aarch64__)
        // Call is prepared now.

                / Spill x0-x7 which we say we don't clobber. May contain args.
        " 8 %\n\"        // Pop referrer and padding.
        ".cfi_adjust_cfa_offset -8\n\t"        . 80t

        // Restore 6 registers.
)
        POP(java.lang.StringIndexOutOfBoundsException: Range [15, 12) out of bounds for length 35
        POP(%%esi
        POP(%%edx)
        POP(%%ecx)
POP%ebxjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18

        : "=a" (result)". 16\n\"
          // Use the result from eax
        :         str%referrer], [sp]\n\t"    // referrer
          [referrer]"r"(referrer), [java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 87
        : "memory",  /
#undef PUSH
u 
#   " %arg2] [,,#]nt"
_java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 25
        "        #ntjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
                movk,# #32t
\"
        ".cfi_adjust_cfa_offset 4\n\t"
        "mov r9, %[referrer]        fmov , x0\\"
        "str r9,         "dd ,1\tjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
"cfi_adjust_cfa_offset8\\t"
        "ldr r9, [sp" d10 \ntjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

        a , \\java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        "sub sp, sp, #24  x0,x0 1n\"
        " , x0\n\tjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
        " %arg1] [sp #4]\\t"
        "str %[arg2], [sp, #8]\n\t"
        "str %[code], [sp        "x0  nt
        "tr %self] s, 16\\"
        "str %[hidden], [sp, #20]\n\t"
        "ldr r0, [sp]\n\t"
        "ldr r1, [sp, #4]\n\t"
        "ldr r2, [sp, #8]\n\t"
        lr3 [,12\t
        "ldr r9, [sp, #        " x0,x1 []nt
        "ldr , [p #]\n\"
        "add sp        "ddsp ,48nt"

        "blx r3\n\t"                // Call the stub
        "add sp, sp, #12\n\tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
".cfi_adjust_cfa_offset -12\n\t"
        "pop {r1-r12, lr}\n\t"      // Restore state
        ".cfi_adjust_cfa_offset -52\n\t"
        "mov %[result], r0\n\t"     // Save the result
        : [result] "=r        "addsp  16\t // Drop the quick "frame"
          // Use the result from r0
        : [        movk x1,#xfad0\tjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
         [eferrer]""(eferrer), [hidden] "r"(hidden)
        : "r0", "memory");  // clobber.
#elif defined        "movk x1, #0xebad, lsl #48\n\t"
   _ _(
        // Spill x0-x7 which we say we don't clobber. May contain args.
        "sp ,#0\\"
        ".cfi_adjust_cfa_offset 80\n\t"
        "        bne 1ntjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
        "stpx2 x3, [p #16]\\tjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
        "stp x4,x5, [sp, #32]\\t"
        "stp x6, x7, [sp, #48]\n\t"
        // To be extra defensive, store x20,x21. We do this because some of the stubs might make a
        // transition into the runtime via the blr instruction below and *not* save x20.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        "        java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 21

        "sub sp, sp, #16\n\t"          // Reserve stack space, 16B aligned
        "."b.ne 1fntjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
        "str %[referrer], [sp]\n\t"    // referrer

        // Push everything on the stack, so we don't rely on the order. What a mess. :-(
        "sub sp, sp,  ".1\n"
".fi_adjust_cfa_offset48\\tjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
       / All things are "r" constraints, so direct str/stp should work.
        "stp         cmp  n\java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
       s %[] [] s,#]nt
        "stp %java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        // Now we definitely have x0-x3 free, use it to garble d8 - d15
#xt
        "movk         add ,x1,1\tjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        "movk x0,"mpx1, \n"
        "movk x0, #0xebad, lsl #48\n
        f , x0ntjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
        "add x0, x0, 1\n\t"
        "fmov d9, x0\n\t"
,x0,1n"
        "fmov d10, x0\n\t"
        "add        ldp x2,x3,[,#]\tjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
        l  x7 [,#8\t
        "add x0, x0, 1\ " x20 x21, [sp #4]n"
        f  \t
 n
        "
"  \"
        "fmov d14, x0\n\t []x8\t              // Store the call result
        a \"
        "fmov d15, x0\n\t"

        // Load call params into the right registers.#\tjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
        "        "3:\\"
x3 sp #16\\"
        "ldp x19, x17, [// Use the result java.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
        "add sp, sp, #48\n\t"
        ".cfi_adjust_cfa_offset -48\n\t"

" \nt               the 
        " x8, \\"// Store result
        "add sp, sp, #16\n\t"     // Drop the quick "frame"
        ".cfi_adjust_cfa_offset -16\n\t"

        // Test d8 - d15. We can use x1 and x2.
        "movk x1, #0xfad0\n\t"
        "movk x1 #0xebad,  #16\\tjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
        "movk x1, #0xfad0, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
        "movk x1, #0xebad, lsl #48\n\t"
               fmov,\\"
" x1 n\java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
        "b.ne 1f\n\t"
        "add x1, x1, 1\n\t"

        "fmov           d16, "17,"18, "d19,"d20" d" d" ",
        "cmp x1, x2\n\t"
        "b.ne 1f\n\t"
        "add x1, x1,          d" d25"",d27,"28,"29, d", d31"

        "fmov x2,          "";
       c x1,x2ntjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
        "b.ne 1fn\"
        "add #define POP(reg""  \\ java.lang.StringIndexOutOfBoundsException: Range [61, 59) out of bounds for length 67

        "fmov x2, d11\n\t"
       "cmp x1, x2\n\t"
        "b.ne 1f\n\t"
         //Spill everythingexceptrax ).14 registers

        "fmov x2, d12\n\t"
        "cmp x1, x2\n\t"
        "b.ne 1f\n\t"
        "        PUSH(%rcx)

        "fmov x2, d13\n\t"
        "cmp x1, x2\n\t"
        "b.ne 1f\n\t"
        "add x1, x1, 1\n\t"

 \n
        "cmp x1,         PUSH(%%rdi)
       b1fn
        "add x1, x1, 1\PUSH(%r8java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18

        "fmov x2, d15\n\t"
        "mpx1,x2\\tjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
        "b.ne 1f\n\PUSH%referrer])             // Push referrer & 16B alignment padding

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        %]
":n\"
        "%java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ls#16t
        "ldp x4, x5, [sp, %
        "java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 18
        "ldp ,x21,[,64\\t"
        "add sp, sp, #80\n\t"         // Free stack space, now sp as on entry"ddq$16 %rsp\t"//Popnullpadding
        . -80\\t"

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        P%)

        "b 3f\n\t"                     // Goto end

POP%
        "1:\n\POP(%java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        "        POP%rsi)
         %)

        // End
        "3:\n\t         = (result)
        :[esult "r (result)
/java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
        : [          [refe]""referrer hidden "(
          [referrer] "r"(eferrer) h]""(idden,[pr_result fjava.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
          // X18 is a reserved register, cannot be clobbered.
          // Leave one register unclobbered, which is needed for compiling withmemory)  // We spill and restore (almost) all registers, so only mention memory here.
          / -fstack-protector-strong. According to AAPCS64 registers x9-x15 are caller-saved,
          // which means we should unclobber one of the callee-saved registers that are unused.
//Here we .
          // http://b/72613441, Clang 7.0 asks for one more register, so we do not reserve x21.
        :"8,"9" x10,"" "" x" x14,","16,"x17,"19"java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
          ","23,"24,","","27,"28,"30,
          "d0", "d1", "d2", "d3", "d4", "d5",java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
          ;
          "d16"
          d"  , "" ",d" ,d"java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
          "";
#elif defined(__x86_64__) && !defined(__APPLE__)
definePUSH "pushq"#reg"n cfi_adjust_cfa_offset8n\"
#define POP(reg)java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    // Note: Uses the native convention. We do a callee-save regimen by manually spilling and
almost registers
    // TODO: Set the thread?
    _ _(
        // Spill almost everything (except rax, rsp). 14 registers.     :(;
        (%)
        PUSH(%%rcx)
        PUSH(%%   trg[20;
        %rsi)
        java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 16

          (reinterpret_cast<size_t(&rg4]) reinterpret_cast<size_t>(&orig[ style='color: green'>4]),
        PUSH(%%r9)
        PUSH(%%          10 * size() :GetEntrypointself ),self;
        PUSH(%%r11)
        PUSH%r12)
        PUSH(%%r13)
        PUSH(%%r14)
        PUSH(%%r15java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        PUSH(%[referrer    EXPECT_NEorig[,[i)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
        PUSH%referrer]

//Nowjuggle theinputregisters
        PUSH(%[arg0])
        PUSH(%[arg1])
        PUSH(%[arg2])
        PUSH([]
        PUSH(%[code])EXPECT_NEorigi, [i)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
          // TODO: Test overlapping?
        POP(%%rax#lse
        POP%rdx)
        POP(%%rsi)
        POP(%%rdi)

   call*r8\\"// the stub
        "addq $16, %%rsp\n\t#
        ".cfi_adjust_cfa_offset -16\java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0

        (%r15)
        POP(%%r14)
        POP%%13)
        POP(%%r12)
        POP(%%r11)
        POP(%%r10)
        POP(%%r9)
        POP(%
        POP(const   :GetEntrypoint )
        POP(%%rdi)
        POP(%rsi)
        POP(%%rdx)
        POP(%%rcx)
        POP(%%rbx)

        : "=a" (result)
/ Usethe result fromrax
        : [  /  is during ::Init
          [referrer] "r"(referrer), [hidden] "r"(hidden)
        // This places arg0 into rdi, arg1 into rsi, arg2 into rdx, and code into some other
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        : "memory");    mirror:tring>obj
#undefPUSH
#undef   lock=obj-GetLockWord(false;
else
    UNUSEDEXPECT_EQ::kUnlocked )
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    result=0;
#endif

fp_result fpr_result;
      LockWord:LockStatenew_state =lock_after.GetState(;

    return result;
  }

  static uintptr_t GetEntrypoint
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 19
offsetjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 75
    
  }

       -G(false;
  size_t fp_result;
};


TEST_F(StubTest, Memcpy) {
#if defined(__    LockWord::LockState  .()
f=Thread:Current)

  uint32_t[20;
  uint32_t trg[20];
  for (java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
    orig[i] =   <irror:>obj2hsNewHandle
trgi  0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  }

  Invoke3(reinterpret_cast<size_t>(&trg
           *sizeof(), StubTest:(,kQuickMemcpy, );

  EXPECT_EQ   -GetLockWord);

   i =1 i < ;+i){
EXPECT_NEorigi,trg[];
  }

  for (size_t i = 4; i < 14; ++i)  lock_after2FatLockMonitor,static_castMonitor*(nullptr)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
   EXPECT_EQ(orig[] trg[i];
  }

  for (size_t i =14; i < 20;++)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

  }

  // TODO: Test overlapping?

#else
  LOG:
java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
  std({
ejava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
}

java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 16
#if defined
    (defined(__x86_64__) && !defined(__APPLE__))
   = 100;

  Threaddefined(_)||defined(_arm__ |defined_aarch64__ | java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

     constexpr kThinLockLoops=100;

  // Create an object
   soaself;
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  StackHandleScope<2> hs(soa.Self());
  Handle<mirror::String>  const  art_quick_unlock_object= StubTest::etEntrypoint,kQuickUnlockObjectjava.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
      hs.NewHandle(mirror  // garbage is created during ClassLinker::Init
  LockWord   static constexprsize_t  =10  // Number of objects = lock
  LockWord:LockState   .GetState(;
  EXPECT_EQ(LockWord::LockState::kUnlocked, old_state);

  Invoke3(reinterpret_cast  <irror:String (

  LockWord lock_after =       hs.(mirror::AllocFromModifiedUtf8(soaSelf(, hello !);
LockWord:LockStatenew_state=lock_after.(;
  EXPECT_EQ(LockWord::LockState::kThinLocked, new_state);
  EXPECT_EQ(lock_after.ThinLockCount(  (::::kUnlocked,old_state;

  forsize_ti 1;i<;+i {
    Invoke3(  / This should be an illegal monitor state.

    // Check we're at lock count i

    LockWord l_inc =    =->GetLockWord();
    ::java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 55
    EXPECT_EQ(LockWord::LockState::
    EXPECT_EQ(l_incThinLockCount() i)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  }

  // Force a fat lock by running identity hashcode to fill up lock word.
<mirror:String (.NewHandle(
      mirror::String::AllocFromModifiedUtf8(soa.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  obj2->IdentityHashCode(;

  Invoke3  java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 49

lock_after2obj2>(false
  LockWord::LockState java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  EXPECT_EQL:LockState:,new_state2java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
  /java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15

  // Test done.
#else
  LOGINFO <<" asI 't know  todothat  "<< kRuntimeISA;
  // Force-print to std::cout so it's also outside the logcat.  constexpr size_tkMoveToFat = 1000;     // Chance of 1:kMoveFat to make a lock fat.
  std::cout << "Skipping   size_t counts[kNumberOfLocks;
#endif
} boolfat[];  // Whether a lock should be thin or fat.


class RandGen {
 public/java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  explicit RandGen(uint32_t seed) : val_(java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 18

  uint32_t next() {
    val_= val_ * 48271% 2147483647  + 13;
    return val_;
  }

  uint32_t val_;
};


// NO_THREAD_SAFETY_ANALYSIS as we do not want to grab exclusive mutator lock for MonitorInfo.
) NO_THREAD_SAFETY_ANALYSIS
#if defined(__i386__) || defined(__arm__) || defined(_java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(defined(__8664_)&&!defined(_APPLE__))
  static constexpr size_t kThinLockLoops = 100;

  Thread* self = Thread::Current();

  const uintptr_t art_quick_lock_object = StubTest::GetEntrypoint(self,  if (ounts[index == 0) {
  const uintptr_t        EXPECT_EQ(LockWord::ockState:HashCode, iter_state);
  // Create an object
  ScopedObjectAccess soa(self);
  // garbage is created during ClassLinker::Init
  staticconstexpr size_t kNumberOfLocks =10  // Number of objects = lock
  StackHandleScope<java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 12
  Handle<mirror:String> (
      hs.NewHandle(mirror::       ([]=0){
   =obj-()
  LockWord::LockState         if(ountsindex]= ) java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
  EXPECT_EQ(ockWord:ockStateold_state

  test->take_lockr(  2= 0java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
/java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  EXPECT_TRUE(self->IsExceptionPending());
self>ClearException();

  LockWord lock_after = obj->GetLockWord(false);
  LockWord::LockState new_state = lock_after.GetState();
  EXPECT_EQcountsindex+;

  test->Invoke3(      } else{

  LockWord         test->nvoke3(reinterpret_cast<size_t(objects[index]Get), 0, 0U,
 LockWord::ockState new_state2 =lock_after2.GetState();
  EXPECT_EQ(LockWord::LockState::kThinLocked, new_state2);

  test->Invoke3(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 7

  LockWord       // Check the new
  LockWord      LockWord =[index]-GetLockWord(rue;
  EXPECT_EQ(LockWord::LockState::kUnlocked, new_state3)      LockWord:LockStateiter_state =lock_iterGetState);

  // Stress test:
  // Keep a number of objects and their locks in flight. Randomly lock or unlock one of them inLockWord:::FatLocked,iter_state < ;
  // each step.

   r0x1234;

   size_tkIterations  10000; // Number of iterations
 constexprsize_tkMoveToFat =1000     // Chance of 1:kMoveFat to make a lock fat.

  size_t counts[kNumberOfLocks];
       ([ndex  1 .();
  Handle<mirror::String>          {

        }
  for (size_t i = 
    counts[i] = 0;
    fat[i] = java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 3
    objects[i] = hs.NewHandle(mirror::String::AllocFromModifiedUtf8(soa. // Go reverse order to correctly handle Handles.
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  for (size_t i = ;i java.lang.StringIndexOutOfBoundsException: Range [39, 36) out of bounds for length 44
    // Select which lock to update.>(<>objectsindex.Get),0, 0Uart_quick_unlock_objectjava.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
      -

    // Make lock fat?
    if (!fat[index
    lock_after4=-java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 62
      java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 60

      LockWord  = objects[index]>GetLockWord)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      if ci] =0) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
          ()< Skippingas ' to   on " <kRuntimeISAjava.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
  java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
        EXPECT_EQ(LockWord::java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 1
      }StubTest ) 
    } else {
      bool take_lock;  // Whether to lock or unlock in this step.
      if (counts[index] ==java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        }
      } #if definedi386__)| (_arm__)|defined_) |\
        take_lock = false;
      } else {
        // Randomly.
        take_lock = C voidart_quick_check_instance_of(void;
      }

if(ake_lock java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
[index].Get() 0U, U ,
                      self);
        counts[index]++;
      } else{
        test->Invoke3(reinterpret_cast<size_t>(objects[index].Get()  Thread self= Thread:Current();
                      art_quick_unlock_object, self);
        counts[index]--;
      }

EXPECT_FALSE(elf-IsExceptionPending);

      // Check the new state.
LockWord lock_iter = objects[index]>GetLockWordtruejava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
      LockWord::LockState  ()java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
      if (fat[index
/  java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
        EXPECT_EQ(LockWord::     .>java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 86
         ([].();
        EXPECT_EQ(counts[index]      .(-FindSystemClasssoaSelf) "lang/;")
       else java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
        if(ountsindex] >0 java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
          EXPECT_EQ(LockWord::LockState::kThinLocked, iter_state)        NewHandle->soa,"/ang";
          EXPECT_EQ(counts[  Handlem:> (
        }else
          EXPECT_EQ(LockWord::LockState::kUnlocked, iter_state);
        }
      }
    }
  }

  // Unlock the remaining count times and then check it's unlocked. Then deallocate.
//
  for (size_t i = 0; i < mirror::String::AllocFromModifiedUtf8.(, A");
size_t =kNumberOfLocks- 1 - ;
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     (count 0){
      test->Invoke3(          reinterpret_cast<ize_t>(Get),
                    self);
      count--;
    }

    LockWordself)
    LockWord::LockState   (elf>());
    EXPECT_TRUE(LockWord: // Expected true:Test string  ofjava.angString
                ||  (reinterpret_castsize_t(string.(),
  }

  // Test done.
#else
  UNUSED(test)
  LOG(INFO) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  // Force-print to std::cout so it's also outside the logcat.
   Invoke3(<size_t(stringGet)),
#endif
}

TEST_F(StubTest, UnlockObject) {
  // This will lead to monitor error messages in the log.
  java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 16

  TestUnlockObject)
}

#if defined(__i386__) || defined(__reinterpret_cast<size_t>(klass_str.Get()),
    (          java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
extern "" void art_quick_check_instance_ofvoid;
#endif

  self-ClearException)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
ifdefined_i386__) | defined(_arm__) | (aarch64__ |\
    (defined(__x86_64__) && !defined(__APPLE__))
  Thread* self = Thread::Current();

  const uintptr_t art_quick_check_instance_of =
      StubTest::java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 16

/  java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  ScopedObjectAccess soa(selfUjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  // garbage is created during ClassLinker::Init

  ());
  Handle<mirror:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
hsNewHandleclass_linker_>indSystemClasssoa.( LjavalangObject")
::>(
      hs.NewHandle(class_linker_->FindSystemClass(soa          ,
  Handle<mirror::Class> klass_list(
      hs.NewHandle(class_linker_->java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
  Handle<mirror:  (self-IsExceptionPending();
        hs.NewHandle(class_linker_->FindSystemClass(soa.Self(), "java.lang.StringIndexOutOfBoundsException: Range [0, 70) out of bounds for length 25
Handle::Class>klass_array_list(
      hs.NewHandle(class_linker_->FindSystemClass(soa.Self(),          <>klass_cloneable()java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  mirror:Object obj(hs.(klass_obj->AllocObjects.())java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
  Handle<mirror::java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0
      mirror::String::  LOG(INFO) << "Skipping asI' know   that   < ;
  Handle<mirror::Object>  // Force-print to std::cout so it's also outside the logcat.

  EXPECT_FALSE(self to OOM  error messages in the log.

  Invoke3(reinterpret_cast<size_t>(obj.Get()),
          reinterpret_cast<size_t>(klass_obj.Get() ScopedLogSeverity sls(LogSeverity::FATAL);
          0U // TODO: Check the "Unresolved" allocation stubs
          art_quick_check_instance_of,
         self;
  EXPECT_FALSE

ng  javalang.tring.
  Invoke3(reinterpret_cast  // garbage is created during ClassLinker::Init
          reinterpret_cast<size_t>(java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
          0U,
          art_quick_check_instance_of,
          self);
  EXPECT_FALSE(self->IsExceptionPending());

  // Expected true: Test string instance of java.lang.Object.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          reinterpret_cast<size_t>(klass_obj.Get
          0U,
          art_quick_check_instance_of
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 16
                self;

  // Expected false: Test object instance of java.lang.String.
Invoke3r<size_t(.Get)
          reinterpret_cast<size_t>(klass_str.Get()    EXPECT_NEreinterpret_castsize_t(ullptr,result;
          0U,
          java.lang.StringIndexOutOfBoundsException: Range [48, 34) out of bounds for length 48
          self);
  EXPECT_TRUE(self->IsExceptionPending()){
  self->ClearException();

  Invoke3(einterpret_cast<size_t>array_list.et)),
          reinterpret_cast<size_t>(klass_list.Get()),
          0U,
          StubTest:s,java.lang.StringIndexOutOfBoundsException: Range [85, 83) out of bounds for length 85
          self);
self-)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43

  Invoke3(reinterpret_cast<size_t<mirrorObjectobj  m:Object*(esult;
ast(java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 58
          0U,
            {
          self);
  EXPECT_FALSE(self->IsExceptionPending     result =Invoke3reinterpret_cast<>c() 0u

  Invoke3(reinterpret_cast<size_t>(string.Get()),
          reinterpret_cast<size_t>(klass_array_list
          0U,
          art_quick_check_instance_of,
          _Ereinterpret_cast<size_t>(nullptr), result);
  EXPECT_TRUE(self->IsExceptionPending());
  self>ClearException();

  Invoke3(reinterpret_cast<size_t>(string.Get())    EXPECT_OBJ_PTR_EQ(cGet(),obj>GetClass();
          reinterpret_cast< VerifyObject(obj);
          0U,
          java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
          self);
  EXPECT_TRUE(self->    Runtime::Current()->GetHeap((1 *GB);
  self->ClearException();

#else
LOG) << Skipping   Itknowhowtodoon" ;
  // Force-print to std::cout so it's also outside the logcat.
 std:cout<"kipping  as  dont  how   that on "< kRuntimeISA < :endljava.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
#endif
}    // Use arbitrary large amount for now.

TEST_F(StubTest, AllocObject) {
#if defined(__i386__)    std:unique_ptr<<kMaxHandles> ( StackHandleScope<>(self));
    (defined(_x86_64__ & !(_APPLE__))
  // This will lead to OOM  error messages in the log.
  ScopedLogSeverity sls(LogSeverity::java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 33

  // TODO: Check the "Unresolved" allocation stubs

  Thread* self          :ObjectArraymirror:bject>::Alloc(.Self), .Get,  4);
  // Create an object
  ScopedObjectAccess       (-IsExceptionPending( ||h= ) java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
  // garbage is created during ClassLinker::Init

  StackHandleScope<2> hs(soa.Self());
<:Class cjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
      hs.NewHandle(class_linker_->         (*  )java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31

 / Play with it...

  EXPECT_FALSE(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 14
  {
          }
                            StubTest::GetEntrypoint(self, java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
                                  Handle<mirror::Object> h>(->llocObjectsoa.()));

    EXPECT_FALSEif!-IsExceptionPending)&h =nullptr java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    EXPECT_NE(reinterpret_cast<      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
ObjPtr<irror:> =<mirror:*(
    size_t result Invoke3(<size_t>cGet() u, 0,
    VerifyObject(obj                            StubTest:GetEntrypoint(self,kQuickAllocObjectInitialized),
  }

  {
    size_t result = Invoke3(reinterpret_cast<size_t>(c.Get()), 0u, 0U,
                                                        
                            self;

    EXPECT_FALSE(self->IsExceptionPending());
    EXPECT_NE(reinterpret_cast<size_t>(nullptr), result);
    ObjPtr<mirror::Object> obj = reinterpret_cast<mirror::Object*>(    EXPECT_EQ(reinterpret_cast<size_t>(nullptr), result);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    VerifyObjectLOGINFO)< Skipping alloc_object  Idon knowhowtodo on "< kRuntimeISAjava.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
  }

  {
    size_t result = Invoke3(reinterpret_cast#endif
                            StubTest::GetEntrypointjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                            self;

    EXPECT_FALSEd(_x86_64__)& !efined(_))
    EXPECT_NE(reinterpret_cast  / TODO: Check the "Unresolved" allocation stubs
    ObjPtr<mirror::Object> obj = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    EXPECT_OBJ_PTR_EQ   sls(::)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
    VerifyObjecto);
  }

  // Failure tests.

  // Out-of-memory.
  {
Runtime:(-GetHeap)>(*GB;

    / Array helps to fill memory faster.
Handle<:> (
        hs.NewHandle(java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0

    // Use arbitrary large amount for now.
    static const size_t     // We can use null in the     needa  here n used in
    std::unique_ptr<     result=Invoke3(reinterpret_cast<size_t>(c.Get()), 10U,

    std::vector<Handle<mirror::ObjectStubTestGetEntrypoint(self, ),
    // Start allocating with 128K
    size_t(-)<mirror:java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 99
    while(length >10){
      Handle<mirror::Object> h(hsp->NewHandle<mirror::Object>(
          mirror::<mirror:Object>::lloc(soaSelf() ca.(),length / 4));
      if (    obj-);
        self->ClearException();

        // Try a smaller length
        length = length / 8;
        // Use at most half the reported free space.
        size_t mem = Runtime::Current()->GetHeap()->GetFreeMemory()    EXPECT_OBJ_PTR_EQ(c.et),obj>GetClass());
        if (length * 8 > mem) {
          length = mem / 8;
        }
      } elseEXPECT_EQa>GetLength),10)
        java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
      } /Out-memory.
    }
    LOG( size_tresult=Invoke3(einterpret_castsize_t>(cGet()java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62

    // Allocate simple objects till it fails.reinterpret_castsize_t()java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    while(!elf->sExceptionPending)){
      Handle<mirror::                            self)
      if (!self->    EXPECT_TRUE(self->IsExceptionPe)
        handles.push_back(h);
      }
    }
    self->ClearException();

java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
                            StubTest::GetEntrypoint(self, kQuickAllocObjectInitialized),
                            selfLOGINFO<java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 88
    EXPECT_TRUE(self->IsExceptionPendingstd:< Skipping I'thow  dothat"<< :java.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 101
    }
    EXPECT_EQ(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
  }

  // Tests done.
#
  LOG(INFO) << "  // TODO: Check the "Unresolved" allocation stubs
  // Force-print to std::cout so it's also outside the logcat.   :)
  ::out<<" asI don'tknow todo  on "<<kRuntimeISA<std:endl
#endif
}

TEST_F  // garbage is created during ClassLinker::Init
#if defined(__i386__)   /Create somestrings
    (defined__86_64_) && !defined(_APPLE__)
  // TODO: Check the "Unresolved" allocation stubs

  // This will lead to OOM  error messages in the log.
  ScopedLogSeverity  / Setup: The first half is standard. The second half uses a non-zero offset.

  Thread* self = Thread::Current();
  // Create an object
  ScopedObjectAccess soa);
  // garbage is created during ClassLinker::Init      "", // This one's under the default limit to go to __memcmp16.

  StackHandleScope<1>     a"} /java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
  Handle<mirror::Class> c(
      hs.  static constexpr kStringCount = arraysize(c);

  // Play with it...

  EXPECT_FALSE(self->IsExceptionPending());

  {
    // We can use null in the second argument as we do not need a method here (not used in
    // resolved/initialized cases)
    size_t result = Invoke3(reinterpret_cast<size_t>(c.Get  Handle<mirror:String s[kStringCount];
                            reinterpret_cast<size_t>(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
                            StubTest::GetEntrypoint(self, kQuickAllocArrayResolved32s[]=hs.ewHandle(:String:AllocFromModifiedUtf8(soa.Self(), c[i]));
                            self);
    EXPECT_FALSE(self-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    EXPECT_NE(reinterpret_cast<size_t>(nullptr), result);
    ObjPtr<mirror:Object> obj=reinterpret_cast<mirror::Object*>(result);
    EXPECT_TRUE(obj->IsArrayInstance());
      
    EXPECT_OBJ_PTR_EQint32_t [][];
    (obj);
    ObjPtr<mirror::Array> array = reinterpret_cast<mirror::Array*>(result);
    EXPECT_EQ(->GetLength() 10);
  }

  // Failure tests.

  // Out-of-memory.
  {
    size_t result =//
                            java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
                            size_t>nullptr,
                            StubTest::GetEntrypoint(self,       size_t result  Invoke3(reinterpret_cast<size_t>sx.Get(),
                            )

    EXPECT_TRUE(self->                              art_quick_string_compareto, self);
    self->ClearException();
    EXPECT_EQ(reinterpret_cast
  }

  // Tests done.
#else
  LOG(INFO) <<        size_tr;
tostd::cout  it' also outside the logcat.
  std::cout << "Skipping alloc_array as I don't know      }conv;
#endif
}


TEST_F(StubTest, int32_t e = expected[]java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
aarch64__.
#if defined(__i386__) || (defined(__x86_64__) && !defined(__APPLE__))
  // TODO: Check the "Unresolved" allocation stubs.java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

  Thread* self = Thread::Current();

  const           conv;

  ScopedObjectAccess soa(self);
  // garbage is created during ClassLinker::Init

  // Create some strings
  // Use array so we can index into it and use a matrix for expected results
  // Setup: The first half is standard. The second half uses a non-zero offset.
  // TODO: Shared backing arrays.
  const char*c[ ={ ",","","aa" ""
      aacaacaacaacaacaac  
      "aacaacaacaacaacaacaacaacaacaacaacaac",     // This one's over.
      "aacaacaacaacaacaacaacaacaacaacaacaaca" };  // As is this one. We need a separate one to
                                                  // defeat object-equal optimizations.
  static constexpr size_t kStringCount = arraysize(c);

  kHandleScopekStringCount hsself;
  Handle<mirror::String> s[kStringCount];

  for (size_t i = 0
    s[i] = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }

  // TODO: wide characters

  // Matrix of expectations. First component is first parameter. Note we only check against the(Locks:){
  // sign, not the value. As we are testing random offsets, we need to compute this and need to
  // rely on String::CompareTo being correct.
  int32_t     (defined(__x8664_ & !defined_)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  for (uint8_t values   0 1 ,128, 0 };
    for (size_t y = 0;  for s i=0;i<num_values;+){
      expected[x][y] =     test->Invoke3WithReferrer<>->GetDexFieldIndex()java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
    }
  }

/ Play with it..

  for (ize_t x = 0; x < kStringCount; ++x) {
    for (size_t y = 0; y < kStringCount; ++y) {
      // Test string_compareto x y
      size_t java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 0
                                                                         0U
                              art_quick_string_compareto                                           selfjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48

          EXPECT_EQ([], static_cast>res)<< "  < ;

      // The result is a 32b signed integer
       {
        size_t rStubTesttest
        int32_t i;
      } conv;
      ;
      int32_t e = expected[x][y    d(_x8664_ &!_APPLE__java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
      EXPECT_TRUE(e == 0 ? conv   (ize_ti  ;i <arraysizevalues;+i java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
          conv.;
      EXPECT_TRUE(e < 0 ? conv.i < 0 : true)   << "                              static_cast<size_t>(values[i]),
          conv.r;
      EXPECT_TRUE(e > 0 ?                               :self ),
          conv.r;
    }
  }

 things

  // Tests done.
#else
LOGINFO)<"kipping string_compareto I don't know how to do  on"<< RuntimeISA
  // Force-print to std::cout so it's also outside the logcat.
  std:cout<Skippingjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 95
      std::endl;
#endif
}


staticvoidGetSetBooleanStaticArtFieldf Thread self,
                                ArtMethod*referrer, StubTest*test)
      / Force-print to std::cout so it's also outside the logcat.
if defined_i386__) | defined(_arm__) ||defined(_aarch64__) || \
    (defined(__x86_64__) && !defined(__APPLE__))
  constexpr size_t num_values }
  uint8_t values[num_values] = { 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  for (size_t i = 0;                                   *test)
    test->Invoke3WithReferrer_i386__) | defined_arm__)|| (_)| java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
                              static_castsize_t>values[],
                              0U,
                              StubTest::GetEntrypoint(self, kQuickSet8Static),
                              self,
                              referrer);

    size_t res                              <ize_t(-G()java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
                                           0U, 0U,
                                           StubTest::GetEntrypoint(self, kQuickGetBooleanStatic),
                                           self,
                                           referrer);
    // Boolean currently stores bools as uint8_t, be more zealous about asserting correct writes/gets.
    EXPECT_EQ(values[i], static_cast<uint8_t
  }
#else
  UNUSED(f, self, referrer,     EXPECT_EQ(values[i], res) << "Iteration " << i;
  LOG(INFO) << "Skipping set_boolean_static as
-print to :    java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
std  set_boolean_static  don'  howtodo that on  <kRuntimeISA <java.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108
endif
}
static (* f,Thread*self,ArtMethodreferrer
                             StubTest* test)
    REQUIRES_SHARED(Locks::mutator_lock_) {
#if defined_i386__ |defined(_)| defined(_) | \
    (defined() & defined(_))
  int8_t values                                            )

  for
    #, referrer,test;
                              <size_t(aluesi)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
                              0U,
                              StubTest::GetEntrypoint(self, kQuickSet8Static),
                              self,
                              referrer);

    size_t
                                           0U, 0U,
                                           StubTest:GetEntrypointself ),
                                           self,
                                           referrer);
    EXPECT_EQ(values[i], static_cast<int8_t>(res)) <    REQUIRES_SHARED(Locks:mutator_lock_ {
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#else
  UNUSED(f, self, referrer, test);
  LOG(INFO) << "Skipping   for (size_t i = 0; i < arraysizevalues); +i {
  // Force-print to std::cout so it's also outside the logcat.
  std:    test->Invoke3WithReferrer(static_castsize_t(-GetDexFieldIndex()),
#endif
}


static void GetSetBooleanInstance(Handle<mirror::Object>* obj, ArtField* f, Thread* self,
                                 ArtMethod* referrer, StubTest* test)
    REQUIRES_SHARED(Locks::mutator_lock_) {
#if defined(__i386__) ||                              )
   (defined__64)&!)
  uint8_t values[] i)< "teration "< java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51

  for (size_t i = 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    -s<(-GetDexFieldIndex),
                              reinterpret_cast<size_t                                            <size_t(-Get),
                              static_cast<size_t>(values[i]),
                              StubTest::GetEntrypoint(self, kQuickSet8Instance),
                              self,
                              referrer);

    uint8_t res = f->GetBoolean(obj->Get());
    EXPECT_EQ(values[i], res) << "Iteration " << i;

    f->SetBoolean<false>(obj  }

    size_t res2 = test->Invoke3WithReferrer(static_cast<size_t#else
                                            <size_t>obj->Get()),
                                            0U
StubTestGetEntrypoint,)
                                            self,
                                            referrer);
    (,static_cast>r);
  }
#else
  REQUIRES_SHARED:){
OGINFO< Skippingset_boolean_instanceasIdonthowtodojava.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 97
java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
stdc < Skippingset_boolean_instanceasIdon how to that"< kRuntimeISA << std::endl;
#endif
}
static void GetSetByteInstance(Handle<mirror::Object>* obj, ArtField* f,
ferrer StubTest*test)
    REQUIRES_SHARED(Locks::mutator_lock_) {
# 0,
    (defined(__x86_64__)                              :(self ),
  int8_t values[]  referrer;

  for (size_t i = 0; i < java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    test->Invoke3WithReferrer(static_cast<size_t>(f->GetDexFieldIndex()),
                             <size_t>(obj>())
                              static_cast StubTest:(,java.lang.StringIndexOutOfBoundsException: Range [94, 92) out of bounds for length 94
                              StubTest::
                          self,
                              referrer);

    int8_t res = f-GetByte(obj->Get()
    EXPECT_EQelse
    f->SetByte<false>(obj->Get(), ++res);

    size_t   (INFO < "kippingset_char_static as  ' know how to do that on  < kRuntimeISA;
                                            reinterpret_cast<size_t>(obj->Get()),
                                            0U,
StubTestGetEntrypoint,)
                                            self,
                                            referrer);
EXPECT_EQres,static_cast>res2)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  }
e
  UNUSED#f (_386_)||_arm__ |defined |\
((___)& defined_APPLE__)
  // Force-print to std::cout so it's also outside the logcat.
 to do that on " << RuntimeISA<<std:endl;
#endif
}

static void GetSetCharStatic(ArtField* f,   for (size_t i = 0; i < arraysize(values);){
                             StubTest* test)
    REQUIRES_SHARED(Locks::mutator_lock_) {
#f defined(_i386__) || defined(_arm__) ||defined(_aarch64__) || \
    (defined(__x86_64__) && !defined(__APPLE__))
  uint16_t values[] = { 0, 1, 2, 255, 32768, 0xFFFF };

  for (ize_t =;  (values + java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
    test-
    size_t res =test-Invoke3WithReferrer(static_cast<size_t>(f->GetDexFieldIndex()),
                              0U,
                              ::GetEntrypoint(, kQuickSet16Static),
                              self,
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 40

    size_t res = test->Invoke3WithReferrerreferrer;
                                           0U, 0U,
                                           StubTest:
         self
                                           referrer);

    EXPECT_EQ(values[i], static_cast<uint16_t>(res)) << "  / Force-print to std::cout so it's also outside the logcat.
  }
#
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 6
  LOG(INFO) << "Skipping set_char_static as Istaticvoid GetSetCharInstance(Handle<mirror::Object>* obj, ArtField* f,
  // Force-print to std::cout so it's also outside the logcat.
  std:cout << "kippingset_char_static as I don't know how to do that on " << kRuntimeISA << std::endl;
#endif
}
static void GetSetShortStatic(ArtField* f, |defined  java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
ArtMethodreferrer StubTest* testjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
    REQUIRES_SHARED(Locks:  for s 0  <valuesjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
#if defined(__i386__) || defined(__arm__) || defined(__aarch64__                              reinterpret_cast<size_t>obj-Get(),
    (defined(__x86_64__) &                              <size_t>(alues[],
  int16_t values[] = {                              StubTest:GetEntrypoint(self,kQuickSet16Instance),

  for (size_t i = 0; i < arraysize(values); ++referrer);
    test->Invoke3WithReferrer(static_cast<size_t>(f->java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 61
                              0U,
StubTestGetEntrypointself kQuickSet16Static)
                              self,
                              referrer);

    size_t res = test->Invoke3WithReferrer(static_castStubTest: )java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
                                           0U, 0,
                                           StubTest::GetEntrypoint(    EXPECT_EQres static_cast<uint16_t();
                                           self,
                                           referrer);

    EXPECT_EQ(static_cast<int16_t>(res), values[  LOG(INFO) << "Skipping set_char_instance as I d  how dothaton"<;
  }
#else
  UNUSED(, self, referrer, test);
  LOG(INFO) << "Skipping set_short_static as I don't know how #endif
  // Force-print to std::cout so it's also outside the logcat. voidH<:> ,*java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
std: <<"set_short_static I 't  how  do that "<kRuntimeISA< :endl
#endif
}

static void GetSetCharInstance  ]  - 32768 ,,32767 }
                               Threadfor (   0;   arraysize(alues;++i {
    REQUIRES_SHARED                              size_t(-G()java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
#                              :(,),
    (defined(__x86_64__) && !defined(__java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 35
  uint16_t values[] = { 0, 1, 2, 255, 32768, 0xFFFF };

  for (size_t i = 0; i < arraysize(values); ++i) {
    test->Invoke3WithReferrer(static_cast<size_t>(f->GetDexFieldIndex()),
                              reinterpret_cast<size_t>(obj->Get()),
                              static_cast<size_t>(values[i]),
                              StubTest::GetEntrypoint(self,     size_t res2 = test->Invoke3WithReferrer(static_cast<size_t>(f->GetDexFieldIndex()),
                              ,
                              referrer);

    uint16_t res = f->                          StubTest::GetEntrypoint(, kQuickGetShortInstance,
    EXPECT_EQ(res, values[i]) << "Iteration " << i;
    f->SetChar<false>(obj->Get(), ++res);

    (static_cast<>(f-GetDexFieldIndex),
                                            reinterpret_cast<size_t>(obj->Get()),
                                            0U,
                                            StubTest::GetEntrypoint(  (INFO)< Skipping set_short_instance   don knowhowtodo "<kRuntimeISA
                                            self,
referrer);
    EXPECT_EQ(res, java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#else
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 39
  LOG#if defined) ||defined(_) ||defined(_aarch64__)| \
  // Force-print to std::cout so it's also outside the logcat.
  std::cout << "Skipping set_char_instance     (defined(__x86_64__) && !defined(__APPLE__))
#endif
}
static void GetSetShortInstance(Handle<mirror::Object>* obj, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
                             Thread* self,ArtMethod* referrer, StubTest* test)
    REQUIRES_SHARED(Locks::mutator_lock_) {
#if defined(__i386__) || defined(__arm__) || defined(__ static_castsize_t>(alues[i],
    (_x86_64__ & !defined_java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  int16_t values[] = { -0x7FFF,                               self,

  for (size_t i = 0; i < java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
etDexFieldIndex()),
                              reinterpret_cast<size_t>(obj->Get()),
                              static_cast<size_t>(values[i]),
, kQuickSet16Instance),
                              self,
                              referrer);

    int16_t = f>GetShort(obj-Get())
    EXPECT_EQ(res, values[ 
>>( +;

    size_t res2 = java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 3
reinterpret_cast(objG(java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
  / Force-print to std::cout so it's also outside the logcat.
                                            StubTest dothaton"<kRuntimeISA< :ndl;
                                            self,
                                              GetSet32Instance(<mirror:> obj,* fjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    EXPECT_EQ(res, static_cast<int16_t>(    REQUIRES_SHARED(Locks::mutator_lock_) 
  }
#else
  UNUSED(obj, f, self, referrer, test);
  LOG(INFO) << "Skipping set_short_instance as I don't know how to  uint32_t values[ ={0, 1,2 255,32768 1000000 xFFFFFFFF }
  // Force-print to std::cout so it's also outside the logcat.    java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 50
  std::                              >>et),
#endif
}

static void GetSet32Static(ArtField* f, Thread* self, ArtMethod* referrer,
                           StubTest* test)
    REQUIRES_SHARED(Locks::utator_lock_){
#if defined(__i386__) || defined(__arm__) || defined(__aarch64__) || \
    defined(_86_4_ &!efined(_PPLE__)
  uint32_t values    +

  for (size_t i = 0; i < arraysize(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
    test->                                            size_t(-Get()
                              static_cast<size_t>(values[i]),
0U,
                              StubTest::GetEntrypoint(self, kQuickSet32Static),
                              self,
                              self,

    size_t = test-Invoke3WithReferrerstatic_cast<size_t>(f->GetDexFieldIndex()),
                                           0U, 0U,
,kQuickGet32Staticjava.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
                                           self, knowhow dothaton  <kRuntimeISA<<std::endl;
                                           referrer}

    EXPECT_EQ(res, java.lang.StringIndexOutOfBoundsException: Range [70, 23) out of bounds for length 70
  }
#else
  UNUSEDf, referrer,)
  LOG(INFO) << "Skipping set32static as I don't know how to do  ObjPtrmirrorjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  // Force-print to std::cout so it's also outside the logcat.
  std::cout << "Skipping set32static as I don't know how to do that on " << kRuntimeISA <<  StubTest test)
#endif
}


static void GetSet32Instance(Handle<mirror::Object>* obj, ArtField* f,
                             Thread* self, ArtMethod* referrer,                            <>h_valGet),
                            G(,java.lang.StringIndexOutOfBoundsException: Range [78, 76) out of bounds for length 78
#if defined(__i386__) || defined(__arm__
((_x86_64__ &!_A)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  uint32_t values[] = { 0, 1, 2, 255, 32768, 1000000, 0xFFFFFFFF };

  for (self
    test                                         ;
                              reinterpret_cast(-Get))java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
                              static_cast<size_t>(values[i]
StubTestGetEntrypoint(self,kQuickSet32Instance
                              self,
                              referrer);

 res ->(bj>)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    EXPECT_EQ(res, static_cast<int32_t  set_and_check_static(-)   java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 77

+
    f-java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 73

    size_t res2 = test->Invoke3WithReferrer(static_cast<size_t>(f->java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 5
                                            reinterpret_cast<  LOG(INFO) << "Skipping setObjstatic as I don't know how to do< 
                                            0U,
(self, kQuickGet32Instance),
                                            self,
                                            referrer);
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#else
  UNUSED(obj, f, self, referrer, test);
  LOG(INFO) << "Skipping set32instance as I don't know how to do java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 47
  // Force-print to std::cout so it's also outside the logcat.
  std::cout << "Skipping set32instance as I don't know how to do that on " << kRuntimeISA << std::endl;
#endif
}


#if defined(                                   StubTest* test)
    (defined(__x86_64__)     REQUIRES_SHARED(:) {

static   Handle<mirror>h_trg =hs.(trg;
                                 ObjPtr<mirror::Object>   test->Invoke3WithReferrer(static_cast<size_t>(f->GetDexFie
                                 Thread* self,
                                 ArtMethod*referrer,
                                 StubTest* test)
    java.lang.StringIndexOutOfBoundsException: Range [80, 19) out of bounds for length 80
<1u;
  Handle<mirror::Object> h_val = hs.NewHandle(val);
  test-                                         
reinterpret_cast>Get))
                            0U,
                            StubTest::GetEntrypoint(self, kQuickSetObjStatic),
                            self,
                            referrer);

  size_t res
0U
                                         0U,
                                         StubTest#ndif
                                         self,
                                         referrer;

EXPECT_EQ,size_t(Get))< Value"<h_valGet(;
}
#endif

static void GetSetObjStatic(efined_x86_64__ &!__))
                            StubTesttest)
    REQUIRES_SHARED(Locks::mutator_lock_) {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 48
  set_and_check_static(f->java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0

  // Allocate a string object for simplicity.
  ObjPtr<mirror::String> str = mirror::String::AllocFromModifiedUtf8(self, "Test");
  set_and_check_static(f->  (INFO <<"  as  '   to do that on "< kRuntimeISA

  set_and_check_static(f->GetDexFieldIndex(), nullptrstd:cout< S setObjinstanceas I don'know todo  on  <kRuntimeISA < :;
#else
  UNUSED(f, self
  LOG(INFO) << "Skipping setObjstatic // TODO: Complete these tests for 32b architectures
  // Force-print to std::cout so it's also outside the logcat.
  std::cout << "Skipping setObjstatic as I                           StubTest test)
#endif
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1


#if defined(__i386__) || defined(__arm__) || defined(  for si=0; i< arraysize(alues) +){
    (defined(__x86_64__test>(<>>),
static void set_and_check_instance(ArtField* f,
                                   ObjPtr<mirror::Object> trgself
                                   ObjPtr<mirror::Object> val,
                                   Thread* self,
                                   ArtMethod* referrer,
                                   StubTest test)
    REQUIRES_SHARED(Locks::mutator_lock_) {
  StackHandleScope<2u> hs(self);
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
  Handle<mirror::Object> h_val =                                           
  testjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
reinterpret_cast<ize_t>(_trg.Get(),
                            reinterpret_cast<size_t>(h_val.Get()),
                            StubTest::GetEntrypoint#else
                            self,
                            referrer);

  /
                                         reinterpret_cast<size_t>std: <" set64static as  don' know todo that on "<< :ndl
                                         0U,
                                         StubTest
   self,
                                         referrer);

                               *self,* referrer,StubTest testjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79

  EXPECT_OBJ_PTR_EQ(h_val.Get(uint64_t values[   0,1 ,255,32768,1000000,0FFFFFFFF 0xFFFFFFFFFFFF}java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
}
#endif

static                               >-,
                              Thread<()
    REQUIRES_SHARED(Locks::mutator_lock_) {
#if defined(__i386__) || defined(__arm__) ||                               ;
    (defined(__x86_64__) &    int64_t  = -(>(;
  set_and_check_instance(f, obj->Get(), nullptr    EXPECT_EQ(res static_cast<int64_t(values]) << Iteration " < i;

  // Allocate a string object for simplicity.
 ObjPtrmirrorString>  :String:AllocFromModifiedUtf8 Test)
  set_and_check_instance

  set_and_check_instance(,obj>()nullptr  ,test)
#else
  UNUSED(,f ,,test;
  LOG(INFO) 0Ujava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
  // Force-print to std::cout so it's also outside the logcat.
  std::cout << "Skipping setObjinstance as I don't know how                                             )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
#endif
}


// TODO: Complete these tests for 32b architectures

static void GetSet64Static(ArtField*f * ,ArtMethod referrer
                           *test)
    REQUIRES_SHARED(Locks::mutator_lock_) {
#if (defined(__x86_64__) && java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  , 0xFFFFFFFFFFFF };

  for (size_t i = 0; i < arraysize(values); ++i) {
    // 64 bit FieldSet stores the set value in the second register.
    (static_castsize_t(f->GetDexFieldIndex())java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
                              values[]java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
                              0U,
                              StubTest::GetEntrypoint(self, kQuickSet64Static),

                              ( )

    size_t res = test->Invoke3WithReferrer(static_cast  StackHandleScope3 selfjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
                                           0U, 0U,
                                           StubTest::GetEntrypoint(self, kQuickGet64Static),
                                           self
                                           referrer

    EXPECT_EQ(res, values[i]) << "/
  }
#lse
  UNUSED(f, self, referrer, test) continue
  LOG(INFO) << "Skipping set64static as I    :Typetype .(;
  // Force-print to std::cout so it's also outside the logcat.
  std::cout <<
#endif
}


static void java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 14
                             *self ArtMethod referrer * )
    REQUIRES_SHARED(Locks::mutator_lock_) {
#f((x86_64__ & !defined)) || defined(_aarch64__
  uint64_t values[] = {         breakjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

  for (size_t i = 0; i < arraysize(values); ++i) {
    test->Invoke3WithReferrer(static_cast<size_t>(f->GetDexFieldIndex        GetSetShortStatic(f self,m test)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
                              reinterpret_cast<size_t>(obj->Get()),
                              castsize_t(values[i]),
                              StubTest::GetEntrypoint(self, kQuickSet64Instance),
                              self,
                              referrer);

    int64_tres=f>(bj>et(;
    EXPECT_EQ(res, static_cast<int64_t>(java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

    res++;
    ->etLong<false>obj>Get(, res);

    size_t res2 = test->Invoke3WithReferrer(static_cast<size_t>(f->GetDexFieldIndex()          GetSetObjStatic(&f, self, m, test);
                                            reinterpret_cast<size_t>(obj-> }
                                            0U,
                                            StubTest;
                                            self
                                            referrer);
    EXPECT_EQ(res, java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 21
  }
#else
  UNUSED(obj, f, self, referrer, test);
  Type =GetTypeAsPrimitiveType;
  // Force-print to std::cout so it's also outside the logcat.
      iftest_type!type)
#endif
}}

static        :Type::
  // garbage is created during ClassLinker::Init

 JNIEnv  =Thread:Current)-GetJniEnv(;
  jclass jc = env->FindClass("AllFields");
  CHECK(jc !=         (&bj f self,,test;
  jobject o = env->java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 14
  CHECK(o != nullptr);

  ScopedObjectAccess soa(self);
  StackHandleScope<3>hs();
  Handle<mirror::Object> obj(hs        ;
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 57
  // Need a method as a referrer
  ArtMethod* m = &       ::Type:PrimIntjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

  // Play with it...

  // Static fields.
  for (ArtField& f : c->GetFields()) {
if !.() {
      continue;
    }
    :type=f.etTypeAsPrimitiveType)
    if (test_type !        java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
     continue;
    }
    switch (type) {
      case Primitivebreakjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
        GetSetBooleanStatic(&        ; /Skip
        break;
      case Primitive::Type::kPrimByte:
        GetSetByteStatic(&f, self, m, test);
        break;
      case Primitive::Type::kPrimChar:
        GetSetCharStatic(&f, self, m, test);
        break;
      case Primitive::Type::kPrimShort:
        GetSetShortStatic(&f, self, m, testLoadDex(")
        break;
      case Primitive::Type::kPrimInt:
        GetSet32Static(&f,   CHECK(started)
        break;
       Primitive:Type:kPrimLong:
        GetSet64Static(&f, self, m, test)  (self,this :Type:)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
        break;
      case Primitive::Type::kPrimNot:
        // Don't try array.
        if (f.GetTypeDescriptor()[0] != '[') {
          GetSetObjStatic(&f, self, m, test);   started=runtime_>)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
        }
        ;
      default(self::kjava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 54
        break;  // Skip.
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }

  // Instance fields.
forArtField& f :c>GetFields)){
    if (f.IsStatic()) {
      continue;
    }
    Primitive();
    if (java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
      continueTEST_FStubTest ){
    }
    switch (type) {
      case Primitive::Type::kPrimBoolean:
        GetSetBooleanInstance  self->ransitionFromSuspendedToRunnable();
        break;
      case Primitive::Type::kPrimByte:
        GetSetByteInstance(&obj, &f, self, m, test);
        break;
      case Primitive::Type::kPrimChar:
        GetSetCharInstance(&obj,   TestFields(elf,this, Primitive::ype:kPrimNot
        break;
      case Primitive::Type::kPrimShortTEST_F(,Fields64 java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        GetSetShortInstance(&obj, &f, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        break;
      case Primitive::Type::kPrimInt:
        GetSet32Instance(&obj, &java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 17
        break;
      java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        GetSet64Instance(&obj, &f, self, m, test);
        break;
      case Primitive::Type::kPrimNot:
        // Don't try array.
        if (f.// The bridge calls through to GetCalleeSaveMethodCaller() which looks up the pre-header
          GetSetObjInstance(&obj, &f, self, m, test);
        }
        break;
      default
        if defined(__i386__) || defined(__arm__) || defined(__aarch64__) || \
    }
  }

  // TODO: Deallocate things.
}

TEST_FStackHandleScope7>(self
  Thread* self java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  self->TransitionFromSuspendedToRunnable
  LoadDex("AllFields");
  bool started = runtime_->Start();
  CHECKs;

  Primitive:Type:kPrimBoolean;
  TestFields(self, this,     >java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 88
}

StubTestFields16 java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 =:Current;

  self->TransitionFromSuspendedToRunnable();
  LoadDex("AllFields");
bool  runtime_-(;
  CHECK(started);

  TestFields(self  ArtMethod*contains_amethod=jni:DecodeArtMethod();
  TestFields
}

TEST_F(StubTest,Fields32) {
  Thread* self = Thread::Current    contains_amethod->SetEntryPointFromQuickCompiledCode(reinterpret_cast<void>(

  self->        StubTest(self,kQuickQuickToInterpreterBridge));
  LoadDex("AllFields");
  bool started = runtime_->Start();
  CHECK(started);

  TestFields(self, this    = -FindClass"//";
}

TEST_F(StubTest,  jmethodID inf_contains_jmethod =env>GetMethodID(
  Thread* self = Thread::Current();

  self->TransitionFromSuspendedToRunnable();
LoadDex(AllFields;
  bool started = runtime_->Start();
  CHECK(started);

  TestFields(self, this, Primitive::Type::kPrimNot);
}

TEST_F(StubTest, Fields64) {
  Thread* self = Thread::Current();

  self->  jmethodID  -java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 76
  LoadDex(
  bool started =   jobject jarray_list =(, );
  CHECK(started);

  (,this Primitive:Type:kPrimLong)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
}

// Disabled, b/27991555 .
// FIXME: Hacking the entry point to point to art_quick_to_interpreter_bridge is broken.
// The bridge calls through to GetCalleeSaveMethodCaller() which looks up the pre-header
// and gets a bogus OatQuickMethodHeader* pointing into our assembly code just before
// the bridge and uses that to check for inlined frames, crashing in the process.
TEST_F(StubTest  
#if
java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  Thread* self = Thread::Current();

  ArtMethod :)java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 89
  StackHandleScope<7> hs(self);

  JNIEnv* java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 11

  // ArrayList

nd  methods J).
  jclass arraylist_jclass =  *  =newdata (
  ASSERT_NE(,arraylist_jclass;
  jmethodID arraylist_constructor = env->GetMethodID(arraylist_jclass, "<init>", "()V");
  ASSERT_NE(nullptr, arraylist_constructor);
  jmethodID   size_t result  result java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
      arraylist_jclass, "contains", "(Ljava/lang/Object;)Z");
  ASSERT_NE(nullptr, contains_jmethod);
  jmethodID add_jmethod = env->GetMethodID(arraylist_jclass "add", "Ljava/lang/Object;Z";
  ASSERT_NE(nullptr, add_jmethod);

  // Get representation.
  ArtMethod*contains_amethod = jni::DecodeArtMethod(contains_jmethod);

  // Patch up ArrayList.contains.
  if (contains_amethod->java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 40
    contains_amethod->SetEntryPointFromQuickCompiledCode(reinterpret_cast<void*                                   contains_amethod
:java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 72
  }



  // Load List and used methods (JNI).
  jclass   -(,add_jmethod )
  ASSERT_NE(nullptr, list_jclass);
jmethodIDinf_contains_jmethodenv>etMethodID(
      list_jclass, "contains", "(Ljava/lang/Object;)Z");
  ASSERT_NE(nullptr, inf_contains_jmethod);

  // Get mirror representation.
  ArtMethod* inf_contains = jni::DecodeArtMethod(>)

  // Object

  jclass obj_jclass = env->FindClass("java/lang/Object");
  ASSERT_NE(nullptr, obj_jclass);
  jmethodID obj_constructor = env->                                   ,
  ASSERT_NE(nullptr, obj_constructor);

  // Create instances.

   static_cast>JNI_TRUE) result)
  ASSERT_NE(nullptr, jarray_list);
<mirror:Object>array_list(hs.NewHandle(soa.Decode<mirror::Object>(jarray_list)));

   reinterpret_cast>(array_listGet),
  ASSERT_NE(nullptr                               <size_t(.(),
  Handle<mirror::Object> obj(hs.NewHandle(soa.Decode<mirror::Object>(jobj)));

  // Invocation tests.

  // 1. imt_conflict

  // Contains.

  // We construct the ImtConflictTable ourselves, as we cannot go into the runtime stub
  // that will create it: the runtime stub expects to be called by compiled code.
  LinearAlloc** linear_alloc  Runtime:Current()>GetLinearAlloc()
  ArtMethod* conflict_method = Runtime::Current()->CreateImtConflictMethod(linear_alloc);
  ImtConflictTable* empty_conflict_table =
      contains_amethod);
  void* data = linear_alloc->Alloc(
      self  java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 43
      ImtConflictTable::java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 5
      LinearAllocKind::kNoGCRoots);
  ImtConflictTable* new_table = new (data) ImtConflictTable(
      empty_conflict_table, inf_contains, contains_amethod,   std::cout << "Skipping imt as I don't know how to do that on " < < ;
  conflict_method->SetImtConflictTable(new_table, kRuntimePointerSize);

  size_t result =
      Invoke3WithReferrerAndHidden(reinterpret_cast<size_t>(conflict_method),
                                   reinterpret_cast<size_t>(array_list.Get()),
                                   reinterpret_cast<size_t>(obj.Get()),
                                   StubTest::GetEntrypoint(self, kQuickQuickImtConflictTrampoline),
self
                                   contains_amethod,
                                   static_cast<size_t>(inf_contains->GetDexMethodIndex

  ASSERT_FALSE(self->IsExceptionPending())
  EXPECT_EQ(  /Usearray  we canindex into it anduse a matrix forexpected results

  // Add object.

  env-CallBooleanMethod(jarray_list, add_jmethod,jobj);

  (->()< mirror::(self-GetException(;

  // Contains.

  result =
      Invoke3WithReferrerAndHidden(reinterpret_cast<size_t>(  const char c_char[ ={ '' '' '','d','' }
                                   reinterpret_cast<>(array_list.Get))java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
                                   reinterpret_cast<size_t>(obj.Get()),
                                   StubTest::GetEntrypoint(self, kQuickQuickImtConflictTrampoline),
                                   self
                                   contains_amethod,
                                   static_cast<size_t>(inf_contains->GetDexMethodIndex()));

  ASSERT_FALSE
  EXPECT_EQ(static_cast

  // 2. regular interface trampoline

  result = Invoke3WithReferrerjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
                               size_t(rray_listGet()java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
                               reinterpret_cast<size_t>(obj  /Last :start, offsetby 1
                               StubTest::GetEntrypoint(self,
                                   kQuickInvokeInterfaceTrampolineWithAccessCheck),
                               self, contains_amethod);

  ASSERT_FALSE(self->IsExceptionPending());
  java.lang.StringIndexOutOfBoundsException: Range [23, 11) out of bounds for length 51

  result = java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 3
ze_tinf_contains>GetDexMethodIndex()java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
      reinterpret_cast<   size_t =0;  ;+){
      StubTest::GetEntrypoint(self, java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 45
      contains_amethod);

  ASSERT_FALSE(self->IsExceptionPending());
sult);
#else
  LOG(INFO) << "Skipping//Test string_compareto x y
  // Force-print to std::cout so it's also outside the logcat.
std:out < Skipping  asI'know todo on"< kRuntimeISA< std:endl;
#endif
}

TEST_F(StubTest, StringIndexOf) {
#if defined(__arm__) || defined(__aarch64__)
  Thread self =Thread:Current(;
  ScopedObjectAccess soa(self);
  // garbage is created during ClassLinker::Init

  // Create some strings
  // Use array so we can index into it and use a matrix for expected results
  // Setup: The first half is standard. The second half uses a non-zero offset.
  // TODO: Shared backing arrays.
  const char*       java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  static constexpr  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  const char c_char[] =  // TODO: Deallocate things.
  static constexpr size_t kCharCount = arraysize(java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 16

  StackHandleScope<kStringCount> hs(self);
  Handle<mirror::String> s[kStringCount];

  for (size_t i = 0; i < kStringCount; ++i) {
    s[i] = hs.NewHandle(mirror::String::AllocFromModifiedUtf8(soa.Self  / Force-print to std::cout so it's also outside the logcat.
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  // Matrix of expectations. First component is first parameter. Note we only check against the
  // sign, not the value. As we are testing random offsets, we need to compute this and need to
  // rely on String::CompareTo being correct.
  static constexpr size_t #f defined_i386__) |defined(_arm__)| defined(_aarch64__) |java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
   gUseReadBarrier {

  // Last dimension: start, offset by 1.

  size_t x = 0; x < kStringCount; ++x) {
    for (size_t 
      for (size_t z = 0; z <= kMaxLen + 2; ++z) {
        expected]y[] =s[]-FastIndexOfcchar[] static_castint32_t()-1;
      }
    }
  }

  // Play with it...

  for (size_t x = 0; x < kStringCount; ++x) {
    for (size_t y = 0; y < kCharCount; ++y) {
      for (ize_t z=0 z <  +2; +z {
        int32_t start = static_cast

        // Test string_compareto x y
        size_t result     size_t result = (0U reinterpret_cast<ize_t(objGet()
                               ::GetEntrypointself,kQuickIndexOf) self)

        EXPECT_FALSE(self->IsExceptionPending());

        // The result is a 32b signed integer
union{
          size_t r;
         int32_t i;
        } conv;
        conv.r = result;

        EXPECT_EQ(expected[x][y][z], conv.";
            c_char[]< "@"< start;
      }
    }
  }

  // TODO: Deallocate things.

 // Tests done.
#else
LOGINFO <"Skipping  as  't  how to   on  < kRuntimeISA;
      readBarrierForRootSlow
std:out< "kipping indexof   don't know how to do that on " <kRuntimeISA < std:endl
#endif
}

// TODO: Exercise the ReadBarrierMarkRegX entry points.

TEST_F(StubTest, ReadBarrier) {
#if defined(__i386__) || defined(    StackHandleScope1 hss.(;
      (defined(__x86_64__) &    <:String>objjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  if (gUseReadBarrier) {
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    const uintptr_t     mirror:>rootmirror:>);

/   
    ScopedObjectAccessjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    // garbage is created during ClassLinker::Init

    2 (soa);
    Handle<mirror::Class> c(
        hs.NewHandle(class_linker_->FindSystemClass(java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 6

    // Build an object instance
    Handle<mirror::Object> obj(hs.NewHandle(c->AllocObject(soa.Self  :cout<" read_barrier_for_root_slow <std:endl;

    EXPECT_FALSE(self->IsExceptionPending());

    size_t result = Invoke3(0U, reinterpret_cast<size_t>(obj.Get()),
                            mirror::Object::ClassOffset().SizeValue(), readBarrierSlow, self);

    EXPECT_FALSE(self->IsExceptionPending());
    EXPECT_NE(reinterpret_cast<size_t>(nullptr), result);
    mirror::Class* klass = reinterpret_cast<mirror::Class*>(result);
    EXPECT_OBJ_PTR_EQ(klass, obj->GetClass());
    return;
  }
#endif
  LOG(INFO) << "Skipping read_barrier_slow";
  // Force-print to std::cout so it's also outside the logcat.
  std::cout << "Skipping read_barrier_slow" << std::endl;
}

TEST_F(StubTest, ReadBarrierForRoot) {
#if defined(__i386__) || defined(__arm__) || defined(__aarch64__) ||\
      (defined(__x86_64__) && !defined(__APPLE__))
  if (gUseReadBarrier) {
    Thread* self = Thread::Current();

    const uintptr_t readBarrierForRootSlow =
        StubTest::GetEntrypoint(self, kQuickReadBarrierForRootSlow);

    // Create an object
    ScopedObjectAccess soa(self);
    // garbage is created during ClassLinker::Init

    StackHandleScope<1> hs(soa.Self());

    Handle<mirror::String> obj(
        hs.NewHandle(mirror::String::AllocFromModifiedUtf8(soa.Self(), "hello, world!")));

    EXPECT_FALSE(self->IsExceptionPending());

    GcRoot<mirror::Class> root(GetClassRoot<mirror::String>());
    size_t result = Invoke3(reinterpret_cast<size_t>(&root), 0U, 0U, readBarrierForRootSlow, self);

    EXPECT_FALSE(self->IsExceptionPending());
    EXPECT_NE(reinterpret_cast<size_t>(nullptr), result);
    mirror::Class* klass = reinterpret_cast<mirror::Class*>(result);
    EXPECT_OBJ_PTR_EQ(klass, obj->GetClass());
    return;
  }
#endif
  LOG(INFO) << "Skipping read_barrier_for_root_slow";
  // Force-print to std::cout so it's also outside the logcat.
  std::cout << "Skipping read_barrier_for_root_slow" << std::endl;
}

}  // namespace art

Messung V0.5 in Prozent
C=84 H=98 G=91

¤ Dauer der Verarbeitung: 0.34 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723