< prev index next >

test/compiler/c2/6589834/Test_ia32.java

Print this page




  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 6589834
  27  * @summary Safepoint placed between stack pointer increment and decrement leads
  28  *          to interpreter's stack corruption after deoptimization.
  29  * @library /testlibrary /../../test/lib
  30  * @modules java.base/sun.misc
  31  *          java.compiler
  32  *          java.management
  33  *          jdk.jvmstat/sun.jvmstat.monitor
  34  * @build ClassFileInstaller sun.hotspot.WhiteBox com.oracle.java.testlibrary.*
  35  *        Test_ia32 InlinedArrayCloneTestCase
  36  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  37  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  38  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  39  *      -XX:+WhiteBoxAPI -XX:CompileOnly=InlinedArrayCloneTestCase
  40  *      -XX:CompileCommand=dontinline,InlinedArrayCloneTestCase.invokeArrayClone
  41  *      -XX:CompileCommand=inline,InlinedArrayCloneTestCase.verifyArguments
  42  *      -XX:+IgnoreUnrecognizedVMOptions -XX:+VerifyStack Test_ia32
  43  */
  44 
  45 import java.lang.reflect.Method;
  46 
  47 import com.oracle.java.testlibrary.Asserts;
  48 import sun.hotspot.WhiteBox;
  49 
  50 public class Test_ia32 {
  51     private static final int NUM_THREADS
  52             = Math.min(100, 2 * Runtime.getRuntime().availableProcessors());
  53     private static final int CLONE_LENGTH = 1000;
  54 
  55     private static WhiteBox wb = WhiteBox.getWhiteBox();
  56 
  57     private final LoadedClass[] ARRAY = new LoadedClass[Test_ia32.CLONE_LENGTH];
  58     private volatile boolean doSpin = true;
  59     private volatile boolean testFailed = false;
  60 
  61     public boolean continueExecution() {
  62         return doSpin;
  63     }
  64 
  65     public void stopExecution() {
  66         doSpin = false;
  67     }




  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 6589834
  27  * @summary Safepoint placed between stack pointer increment and decrement leads
  28  *          to interpreter's stack corruption after deoptimization.
  29  * @library /testlibrary /../../test/lib
  30  * @modules java.base/sun.misc
  31  *          java.compiler
  32  *          java.management
  33  *          jdk.jvmstat/sun.jvmstat.monitor
  34  * @build ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.*
  35  *        Test_ia32 InlinedArrayCloneTestCase
  36  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  37  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  38  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  39  *      -XX:+WhiteBoxAPI -XX:CompileOnly=InlinedArrayCloneTestCase
  40  *      -XX:CompileCommand=dontinline,InlinedArrayCloneTestCase.invokeArrayClone
  41  *      -XX:CompileCommand=inline,InlinedArrayCloneTestCase.verifyArguments
  42  *      -XX:+IgnoreUnrecognizedVMOptions -XX:+VerifyStack Test_ia32
  43  */
  44 
  45 import java.lang.reflect.Method;
  46 
  47 import jdk.test.lib.Asserts;
  48 import sun.hotspot.WhiteBox;
  49 
  50 public class Test_ia32 {
  51     private static final int NUM_THREADS
  52             = Math.min(100, 2 * Runtime.getRuntime().availableProcessors());
  53     private static final int CLONE_LENGTH = 1000;
  54 
  55     private static WhiteBox wb = WhiteBox.getWhiteBox();
  56 
  57     private final LoadedClass[] ARRAY = new LoadedClass[Test_ia32.CLONE_LENGTH];
  58     private volatile boolean doSpin = true;
  59     private volatile boolean testFailed = false;
  60 
  61     public boolean continueExecution() {
  62         return doSpin;
  63     }
  64 
  65     public void stopExecution() {
  66         doSpin = false;
  67     }


< prev index next >