Test.java revision 163
163N/A/*
163N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
163N/A * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A *
163N/A */
163N/A
163N/A/*
163N/A * @test
163N/A * @bug 6695810
163N/A * @summary null oop passed to encode_heap_oop_not_null
163N/A * @run main/othervm -Xbatch Test
163N/A */
163N/A
163N/Apublic class Test {
163N/A Test _t;
163N/A
163N/A static void test(Test t1, Test t2) {
163N/A if (t2 != null)
163N/A t1._t = t2;
163N/A
163N/A if (t2 != null)
163N/A t1._t = t2;
163N/A }
163N/A
163N/A public static void main(String[] args) {
163N/A Test t = new Test();
163N/A for (int i = 0; i < 50; i++) {
163N/A for (int j = 0; j < 100; j++) {
163N/A test(t, t);
163N/A }
163N/A test(t, null);
163N/A }
163N/A for (int i = 0; i < 10000; i++) {
163N/A test(t, t);
163N/A }
163N/A test(t, null);
163N/A }
163N/A}