test/hotspot/jtreg/compiler/linkage/OSRWithBadOperandStack.jasm
author dtitov
Fri, 31 Aug 2018 11:56:43 -0700
changeset 51613 3835dc32de5e
parent 47822 7437dc810834
permissions -rw-r--r--
8209585: [Graal] vmTestbase/nsk/jvmti/scenarios/sampling tests fail with "Too small stack of resumed thread" Reviewed-by: sspitsyn, amenkov, cjplummer, jcbeyler
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47822
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
     1
/*
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
     2
 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
     4
 *
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
     7
 * published by the Free Software Foundation.
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
     8
 *
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    13
 * accompanied this code).
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    14
 *
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    18
 *
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    21
 * questions.
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    22
 *
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    23
 */
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    24
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    25
public class compiler/linkage/OSRWithBadOperandStack version 52:0 {
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    26
    public static Method m1:"()I" stack 1 locals 0 {
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    27
        iconst_0;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    28
        ireturn;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    29
    }
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    30
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    31
    public static Method m2:"(Ljava/lang/Object;)V" stack 1 locals 1 {
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    32
        return;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    33
    }
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    34
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    35
    public static Method test:"()V" stack 2 locals 1 {
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    36
        iconst_0;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    37
        istore_0;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    38
        Loop: stack_frame_type append;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    39
        locals_map int;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    40
        iload_0;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    41
        // This should fail with "java.lang.VerifyError: Bad type on operand stack Exception"
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    42
        // because m1 returns an integer and m2 takes an Object.
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    43
        invokestatic Method compiler/linkage/OSRWithBadOperandStack."m1":"()I";
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    44
        invokestatic Method compiler/linkage/OSRWithBadOperandStack."m2":"(Ljava/lang/Object;)V";
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    45
        iinc 0, 1;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    46
        ldc 100000;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    47
        if_icmple Loop;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    48
        return;
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    49
    }
7437dc810834 8190797: OSR compilation fails with "assert(__the_thread__->can_call_java()) failed: can not load classes with compiler thread"
thartmann
parents:
diff changeset
    50
}