test/compiler/runtime/8010927/Test8010927.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff test/compiler/runtime/8010927

test/compiler/runtime/8010927/Test8010927.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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 8010927
  27  * @summary Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
  28  * @library /testlibrary/whitebox /testlibrary
  29  * @build Test8010927
  30  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  31  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  32  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -Xmx64m -XX:NewSize=20971520 -XX:MaxNewSize=32m -XX:-UseTLAB -XX:-UseAdaptiveSizePolicy Test8010927
  33  */
  34 
  35 import sun.hotspot.WhiteBox;
  36 import java.lang.reflect.Field;
  37 import sun.misc.Unsafe;
  38 
  39 /**
  40  * The test creates uncommitted space between oldgen and young gen
  41  * by specifying MaxNewSize bigger than NewSize.
  42  * NewSize = 20971520 = (512*4K) * 10 for 4k pages
  43  * Then it tries to execute arraycopy() with elements type check
  44  * to the array at the end of survive space near unused space.
  45  */
  46 
  47 public class Test8010927 {
  48 
  49   private static final Unsafe U;
  50 
  51   static {
  52     try {
  53       Field unsafe = Unsafe.class.getDeclaredField("theUnsafe");
  54       unsafe.setAccessible(true);
  55       U = (Unsafe) unsafe.get(null);




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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 8010927
  27  * @summary Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
  28  * @library /../../test/lib /testlibrary
  29  * @build Test8010927
  30  * @run main ClassFileInstaller jdk.testlib.WhiteBox
  31  *                              jdk.testlib.WhiteBox$WhiteBoxPermission
  32  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -Xmx64m -XX:NewSize=20971520 -XX:MaxNewSize=32m -XX:-UseTLAB -XX:-UseAdaptiveSizePolicy Test8010927
  33  */
  34 
  35 import jdk.testlib.WhiteBox;
  36 import java.lang.reflect.Field;
  37 import sun.misc.Unsafe;
  38 
  39 /**
  40  * The test creates uncommitted space between oldgen and young gen
  41  * by specifying MaxNewSize bigger than NewSize.
  42  * NewSize = 20971520 = (512*4K) * 10 for 4k pages
  43  * Then it tries to execute arraycopy() with elements type check
  44  * to the array at the end of survive space near unused space.
  45  */
  46 
  47 public class Test8010927 {
  48 
  49   private static final Unsafe U;
  50 
  51   static {
  52     try {
  53       Field unsafe = Unsafe.class.getDeclaredField("theUnsafe");
  54       unsafe.setAccessible(true);
  55       U = (Unsafe) unsafe.get(null);


test/compiler/runtime/8010927/Test8010927.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File