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 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/jdk.internal.misc 31 * java.compiler 32 * java.management 33 * jdk.jvmstat/sun.jvmstat.monitor 34 * 35 * @build ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.* 36 * compiler.c2.cr6589834.Test_ia32 37 * compiler.c2.cr6589834.InlinedArrayCloneTestCase 38 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 39 * sun.hotspot.WhiteBox$WhiteBoxPermission 40 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 41 * -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions -XX:+VerifyStack 42 * -XX:CompileCommand=compileonly,compiler.c2.cr6589834.InlinedArrayCloneTestCase::* 43 * -XX:CompileCommand=dontinline,compiler.c2.cr6589834.InlinedArrayCloneTestCase::invokeArrayClone 44 * -XX:CompileCommand=inline,compiler.c2.cr6589834.InlinedArrayCloneTestCase::verifyArguments 45 * compiler.c2.cr6589834.Test_ia32 46 */ 47 48 package compiler.c2.cr6589834; 49 50 import jdk.test.lib.Asserts; 51 import sun.hotspot.WhiteBox; 52 53 import java.lang.reflect.Method; 54 55 public class Test_ia32 { 56 private static final int NUM_THREADS 57 = Math.min(100, 2 * Runtime.getRuntime().availableProcessors()); | 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 6589834 27 * @summary Safepoint placed between stack pointer increment and decrement leads 28 * to interpreter's stack corruption after deoptimization. 29 * @library /test/lib / 30 * @modules java.base/jdk.internal.misc 31 * java.compiler 32 * java.management 33 * jdk.jvmstat/sun.jvmstat.monitor 34 * 35 * @build sun.hotspot.WhiteBox 36 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 37 * sun.hotspot.WhiteBox$WhiteBoxPermission 38 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 39 * -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions -XX:+VerifyStack 40 * -XX:CompileCommand=compileonly,compiler.c2.cr6589834.InlinedArrayCloneTestCase::* 41 * -XX:CompileCommand=dontinline,compiler.c2.cr6589834.InlinedArrayCloneTestCase::invokeArrayClone 42 * -XX:CompileCommand=inline,compiler.c2.cr6589834.InlinedArrayCloneTestCase::verifyArguments 43 * compiler.c2.cr6589834.Test_ia32 44 */ 45 46 package compiler.c2.cr6589834; 47 48 import jdk.test.lib.Asserts; 49 import sun.hotspot.WhiteBox; 50 51 import java.lang.reflect.Method; 52 53 public class Test_ia32 { 54 private static final int NUM_THREADS 55 = Math.min(100, 2 * Runtime.getRuntime().availableProcessors()); |