Thu, 24 Oct 2013 16:23:07 -0700
8026328: Setting a breakpoint on invokedynamic crashes the JVM
Reviewed-by: jrose, roland
never@1445 | 1 | /* |
coleenp@4037 | 2 | * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
twisti@2729 | 3 | * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. |
never@1445 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
never@1445 | 5 | * |
never@1445 | 6 | * This code is free software; you can redistribute it and/or modify it |
never@1445 | 7 | * under the terms of the GNU General Public License version 2 only, as |
never@1445 | 8 | * published by the Free Software Foundation. |
never@1445 | 9 | * |
never@1445 | 10 | * This code is distributed in the hope that it will be useful, but WITHOUT |
never@1445 | 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
never@1445 | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
never@1445 | 13 | * version 2 for more details (a copy is included in the LICENSE file that |
never@1445 | 14 | * accompanied this code). |
never@1445 | 15 | * |
never@1445 | 16 | * You should have received a copy of the GNU General Public License version |
never@1445 | 17 | * 2 along with this work; if not, write to the Free Software Foundation, |
never@1445 | 18 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
never@1445 | 19 | * |
trims@1907 | 20 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 21 | * or visit www.oracle.com if you need additional information or have any |
trims@1907 | 22 | * questions. |
never@1445 | 23 | * |
never@1445 | 24 | */ |
never@1445 | 25 | |
stefank@2314 | 26 | #include "precompiled.hpp" |
stefank@2314 | 27 | #include "asm/assembler.hpp" |
stefank@2314 | 28 | #include "assembler_zero.inline.hpp" |
stefank@2314 | 29 | #include "code/debugInfoRec.hpp" |
stefank@2314 | 30 | #include "code/icBuffer.hpp" |
stefank@2314 | 31 | #include "code/vtableStubs.hpp" |
stefank@2314 | 32 | #include "interpreter/interpreter.hpp" |
coleenp@4037 | 33 | #include "oops/compiledICHolder.hpp" |
stefank@2314 | 34 | #include "prims/jvmtiRedefineClassesTrace.hpp" |
stefank@2314 | 35 | #include "runtime/sharedRuntime.hpp" |
stefank@2314 | 36 | #include "runtime/vframeArray.hpp" |
stefank@2314 | 37 | #include "vmreg_zero.inline.hpp" |
twisti@4237 | 38 | |
stefank@2314 | 39 | #ifdef COMPILER1 |
stefank@2314 | 40 | #include "c1/c1_Runtime1.hpp" |
stefank@2314 | 41 | #endif |
stefank@2314 | 42 | #ifdef COMPILER2 |
stefank@2314 | 43 | #include "opto/runtime.hpp" |
stefank@2314 | 44 | #endif |
stefank@2314 | 45 | #ifdef SHARK |
stefank@2314 | 46 | #include "compiler/compileBroker.hpp" |
stefank@2314 | 47 | #include "shark/sharkCompiler.hpp" |
stefank@2314 | 48 | #endif |
never@1445 | 49 | |
never@1445 | 50 | |
twisti@4237 | 51 | |
twisti@4237 | 52 | static address zero_null_code_stub() { |
twisti@4237 | 53 | address start = ShouldNotCallThisStub(); |
twisti@4237 | 54 | return start; |
twisti@4237 | 55 | } |
twisti@4237 | 56 | |
never@1445 | 57 | int SharedRuntime::java_calling_convention(const BasicType *sig_bt, |
never@1445 | 58 | VMRegPair *regs, |
never@1445 | 59 | int total_args_passed, |
never@1445 | 60 | int is_outgoing) { |
never@1445 | 61 | return 0; |
never@1445 | 62 | } |
never@1445 | 63 | |
never@1445 | 64 | AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters( |
never@1445 | 65 | MacroAssembler *masm, |
never@1445 | 66 | int total_args_passed, |
never@1445 | 67 | int comp_args_on_stack, |
never@1445 | 68 | const BasicType *sig_bt, |
twisti@1632 | 69 | const VMRegPair *regs, |
twisti@1632 | 70 | AdapterFingerPrint *fingerprint) { |
twisti@1632 | 71 | return AdapterHandlerLibrary::new_entry( |
twisti@1632 | 72 | fingerprint, |
twisti@4237 | 73 | CAST_FROM_FN_PTR(address,zero_null_code_stub), |
twisti@4237 | 74 | CAST_FROM_FN_PTR(address,zero_null_code_stub), |
twisti@4237 | 75 | CAST_FROM_FN_PTR(address,zero_null_code_stub)); |
never@1445 | 76 | } |
never@1445 | 77 | |
never@1445 | 78 | nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, |
never@1445 | 79 | methodHandle method, |
twisti@2729 | 80 | int compile_id, |
twisti@2729 | 81 | BasicType *sig_bt, |
twisti@2729 | 82 | VMRegPair *regs, |
never@1445 | 83 | BasicType ret_type) { |
twisti@1513 | 84 | #ifdef SHARK |
twisti@1513 | 85 | return SharkCompiler::compiler()->generate_native_wrapper(masm, |
twisti@1513 | 86 | method, |
twisti@2729 | 87 | compile_id, |
twisti@2729 | 88 | sig_bt, |
twisti@1513 | 89 | ret_type); |
twisti@1513 | 90 | #else |
never@1445 | 91 | ShouldNotCallThis(); |
twisti@5545 | 92 | return NULL; |
twisti@1513 | 93 | #endif // SHARK |
never@1445 | 94 | } |
never@1445 | 95 | |
never@1445 | 96 | int Deoptimization::last_frame_adjust(int callee_parameters, |
never@1445 | 97 | int callee_locals) { |
never@1445 | 98 | return 0; |
never@1445 | 99 | } |
never@1445 | 100 | |
never@1445 | 101 | uint SharedRuntime::out_preserve_stack_slots() { |
never@1445 | 102 | ShouldNotCallThis(); |
twisti@5545 | 103 | return 0; |
never@1445 | 104 | } |
never@1445 | 105 | |
twisti@4237 | 106 | JRT_LEAF(void, zero_stub()) |
twisti@4237 | 107 | ShouldNotCallThis(); |
twisti@4237 | 108 | JRT_END |
twisti@4237 | 109 | |
never@1445 | 110 | static RuntimeStub* generate_empty_runtime_stub(const char* name) { |
twisti@4237 | 111 | return CAST_FROM_FN_PTR(RuntimeStub*,zero_stub); |
never@1445 | 112 | } |
never@1445 | 113 | |
never@1445 | 114 | static SafepointBlob* generate_empty_safepoint_blob() { |
twisti@4237 | 115 | return CAST_FROM_FN_PTR(SafepointBlob*,zero_stub); |
never@1445 | 116 | } |
never@1445 | 117 | |
twisti@3045 | 118 | static DeoptimizationBlob* generate_empty_deopt_blob() { |
twisti@4237 | 119 | return CAST_FROM_FN_PTR(DeoptimizationBlob*,zero_stub); |
twisti@3045 | 120 | } |
never@1445 | 121 | |
twisti@3045 | 122 | |
twisti@3045 | 123 | void SharedRuntime::generate_deopt_blob() { |
twisti@3045 | 124 | _deopt_blob = generate_empty_deopt_blob(); |
twisti@3045 | 125 | } |
twisti@3045 | 126 | |
twisti@4237 | 127 | SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_type) { |
twisti@3045 | 128 | return generate_empty_safepoint_blob(); |
twisti@3045 | 129 | } |
twisti@3045 | 130 | |
twisti@3045 | 131 | RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const char* name) { |
twisti@3045 | 132 | return generate_empty_runtime_stub("resolve_blob"); |
never@1445 | 133 | } |
never@1445 | 134 | |
twisti@4237 | 135 | |
never@1445 | 136 | int SharedRuntime::c_calling_convention(const BasicType *sig_bt, |
never@1445 | 137 | VMRegPair *regs, |
never@1445 | 138 | int total_args_passed) { |
never@1445 | 139 | ShouldNotCallThis(); |
twisti@5545 | 140 | return 0; |
never@1445 | 141 | } |