1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
diff -r 51798f0e554f test/compiler/6707044/LuceneCrash.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ openjdk/hotspot/test/compiler/6707044/LuceneCrash.java Thu Sep 25 21:55:28 2008 +0200
@@ -0,0 +1,40 @@
+/*
+ * @test
+ * @bug 6707044
+ * @summary uncommon_trap of ifnull bytecode leaves garbage on expression stack
+ * @run main/othervm -Xbatch LuceneCrash
+ */
+public class LuceneCrash {
+
+ public static void main(String[] args) throws Throwable {
+ new LuceneCrash().crash();
+ }
+
+ private Object alwaysNull;
+
+ final void crash() throws Throwable {
+ for (int r = 0; r < 3; r++) {
+ for (int docNum = 0; docNum < 10000;) {
+ if (r < 2) {
+ for(int j=0;j<3000;j++)
+ docNum++;
+ } else {
+ docNum++;
+ doNothing(getNothing());
+ if (alwaysNull != null) {
+ throw new RuntimeException("BUG: checkAbort is always null: r=" + r + " of 3; docNum=" + docNum);
+ }
+ }
+ }
+ }
+ }
+
+ Object getNothing() {
+ return this;
+ }
+
+ int x;
+ void doNothing(Object o) {
+ x++;
+ }
+}
|