Tue, 19 Aug 2008 06:02:07 -0700
Merge
kvn@598 | 1 | /* |
kvn@688 | 2 | * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. |
kvn@688 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
kvn@598 | 4 | * |
kvn@688 | 5 | * This code is free software; you can redistribute it and/or modify it |
kvn@688 | 6 | * under the terms of the GNU General Public License version 2 only, as |
kvn@688 | 7 | * published by the Free Software Foundation. |
kvn@598 | 8 | * |
kvn@688 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
kvn@688 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
kvn@688 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
kvn@688 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
kvn@688 | 13 | * accompanied this code). |
kvn@598 | 14 | * |
kvn@688 | 15 | * You should have received a copy of the GNU General Public License version |
kvn@688 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
kvn@688 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
kvn@598 | 18 | * |
kvn@688 | 19 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
kvn@688 | 20 | * CA 95054 USA or visit www.sun.com if you need additional information or |
kvn@688 | 21 | * have any questions. |
kvn@598 | 22 | * |
kvn@598 | 23 | */ |
kvn@598 | 24 | |
kvn@598 | 25 | /* |
kvn@598 | 26 | * @test |
kvn@598 | 27 | * @bug 6695810 |
kvn@598 | 28 | * @summary null oop passed to encode_heap_oop_not_null |
kvn@598 | 29 | * @run main/othervm -Xbatch Test |
kvn@598 | 30 | */ |
kvn@598 | 31 | |
kvn@598 | 32 | public class Test { |
kvn@598 | 33 | Test _t; |
kvn@598 | 34 | |
kvn@598 | 35 | static void test(Test t1, Test t2) { |
kvn@598 | 36 | if (t2 != null) |
kvn@598 | 37 | t1._t = t2; |
kvn@598 | 38 | |
kvn@598 | 39 | if (t2 != null) |
kvn@598 | 40 | t1._t = t2; |
kvn@598 | 41 | } |
kvn@598 | 42 | |
kvn@598 | 43 | public static void main(String[] args) { |
kvn@598 | 44 | Test t = new Test(); |
kvn@598 | 45 | for (int i = 0; i < 50; i++) { |
kvn@598 | 46 | for (int j = 0; j < 100; j++) { |
kvn@598 | 47 | test(t, t); |
kvn@598 | 48 | } |
kvn@598 | 49 | test(t, null); |
kvn@598 | 50 | } |
kvn@598 | 51 | for (int i = 0; i < 10000; i++) { |
kvn@598 | 52 | test(t, t); |
kvn@598 | 53 | } |
kvn@598 | 54 | test(t, null); |
kvn@598 | 55 | } |
kvn@598 | 56 | } |