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

[vectorapi] Confusing index out of bounds message when loading a vector

XMLWordPrintable

    • Cause Known
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      When creating a Vector from an array that would index elements out of bounds, the resulting error is extremely confusing.
      Example: Array of length 8, species with 4 lanes, trying to index elements 9-12: the resulting error will tell that index 9 is out of bounds for an array of length 5 even though the length is 8.

      This behaviour seems to only be the case if the property `jdk.incubator.vector.VECTOR_ACCESS_OOB_CHECK` is the default value of 2


            psandoz Paul Sandoz
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: