Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8304948

[vectorapi] C2 crashes when expanding VectorBox

XMLWordPrintable

    • 18
    • b22
    • generic
    • generic

       import jdk.incubator.vector.IntVector;
       import jdk.incubator.vector.VectorMask;


      public class Test {
           private static int ARR_LEN = 1024;
           private static final int NUM_ITER = 2000;

           public static Object test() {
               boolean[] arr = new boolean[ARR_LEN];
               VectorMask<Integer> vm = VectorMask.fromArray(IntVector.SPECIES_128, arr, 0);

               for (int ic = 0; ic < NUM_ITER; ic++) {
                   for (int i = 0; i < ARR_LEN; i += 16){
                       vm = vm.and(vm);
                   }
               }
               return vm;
           }


           public static void main(String[] args) {
               for (int i = 0; i < NUM_ITER; i++) {
                   test();
               }
               System.out.println("PASS");
           }
       }


      Segmentation fault (core dumped)

      This bug can be reproduced both on x86 and AArch64.

            eliu Eric Liu
            eliu Eric Liu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: