< prev index next >

test/hotspot/jtreg/compiler/escapeAnalysis/TestArrayCopy.java

Print this page
rev 53209 : Handle space in JTREG_KEYWORDS. Introduce TEST_OPTS_JAVA_OPTIONS. Set individual test timeouts to 300. Fix InstrumentationTest to handle deep work dir paths better.


  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8159611
  27  * @summary The elimination of System.arraycopy by EscapeAnalysis prevents
  28  *          an IndexOutOfBoundsException from being thrown if the arraycopy
  29  *          is called with a negative length argument.
  30  * @modules java.base/jdk.internal.misc
  31  * @library /testlibrary /test/lib
  32  * @build sun.hotspot.WhiteBox
  33  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  34  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  35  *
  36  * @run main/othervm
  37  *        -Xbootclasspath/a:.
  38  *        -XX:+UnlockDiagnosticVMOptions
  39  *        -XX:+WhiteBoxAPI
  40  *        -XX:-UseOnStackReplacement
  41  *        compiler.escapeAnalysis.TestArrayCopy
  42  *
  43  * @author Volker Simonis
  44  */
  45 
  46 package compiler.escapeAnalysis;
  47 
  48 import sun.hotspot.WhiteBox;
  49 import java.lang.reflect.Method;
  50 
  51 public class TestArrayCopy {
  52 
  53     private static final WhiteBox WB = WhiteBox.getWhiteBox();
  54     // DST_LEN Must be const, otherwise EliminateAllocations won't work
  55     static final int DST_LEN = 4;
  56     static final int SRC_LEN = 8;




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8159611
  27  * @summary The elimination of System.arraycopy by EscapeAnalysis prevents
  28  *          an IndexOutOfBoundsException from being thrown if the arraycopy
  29  *          is called with a negative length argument.
  30  * @modules java.base/jdk.internal.misc
  31  * @library /testlibrary /test/lib
  32  * @build sun.hotspot.WhiteBox
  33  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  34  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  35  *
  36  * @run main/othervm/timeout=300
  37  *        -Xbootclasspath/a:.
  38  *        -XX:+UnlockDiagnosticVMOptions
  39  *        -XX:+WhiteBoxAPI
  40  *        -XX:-UseOnStackReplacement
  41  *        compiler.escapeAnalysis.TestArrayCopy
  42  *
  43  * @author Volker Simonis
  44  */
  45 
  46 package compiler.escapeAnalysis;
  47 
  48 import sun.hotspot.WhiteBox;
  49 import java.lang.reflect.Method;
  50 
  51 public class TestArrayCopy {
  52 
  53     private static final WhiteBox WB = WhiteBox.getWhiteBox();
  54     // DST_LEN Must be const, otherwise EliminateAllocations won't work
  55     static final int DST_LEN = 4;
  56     static final int SRC_LEN = 8;


< prev index next >