Thu, 24 Jan 2013 22:13:32 -0800
8005128: JSR 292: the mlvm redefineClassInBootstrap test crashes in ConstantPool::compare_entry_to
Summary: When constant pool is copied in merge_constant_pools the invokedynamic operands must be copied before.
Reviewed-by: coleenp, twisti
Contributed-by: serguei.spitsyn@oracle.com
duke@435 | 1 | <?xml version="1.0"?> |
duke@435 | 2 | <!-- |
coleenp@4037 | 3 | Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. |
duke@435 | 4 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 5 | |
duke@435 | 6 | This code is free software; you can redistribute it and/or modify it |
duke@435 | 7 | under the terms of the GNU General Public License version 2 only, as |
duke@435 | 8 | published by the Free Software Foundation. |
duke@435 | 9 | |
duke@435 | 10 | This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 11 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 12 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 13 | version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 14 | accompanied this code). |
duke@435 | 15 | |
duke@435 | 16 | You should have received a copy of the GNU General Public License version |
duke@435 | 17 | 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 18 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 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. |
duke@435 | 23 | |
duke@435 | 24 | --> |
duke@435 | 25 | |
duke@435 | 26 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
duke@435 | 27 | |
duke@435 | 28 | <xsl:import href="jvmtiLib.xsl"/> |
duke@435 | 29 | |
duke@435 | 30 | <xsl:output method="text" indent="no" omit-xml-declaration="yes"/> |
duke@435 | 31 | |
duke@435 | 32 | <xsl:template match="/"> |
duke@435 | 33 | <xsl:apply-templates select="specification"/> |
duke@435 | 34 | </xsl:template> |
duke@435 | 35 | |
duke@435 | 36 | <xsl:template match="specification"> |
duke@435 | 37 | <xsl:call-template name="sourceHeader"/> |
duke@435 | 38 | <xsl:text> |
duke@435 | 39 | |
duke@435 | 40 | // end file prefix - do not modify or remove this line |
duke@435 | 41 | </xsl:text> |
duke@435 | 42 | <xsl:apply-templates select="functionsection"/> |
duke@435 | 43 | </xsl:template> |
duke@435 | 44 | |
duke@435 | 45 | <xsl:template match="functionsection"> |
duke@435 | 46 | <xsl:apply-templates select="category"/> |
duke@435 | 47 | </xsl:template> |
duke@435 | 48 | |
duke@435 | 49 | <xsl:template match="category"> |
duke@435 | 50 | <xsl:text> |
duke@435 | 51 | // |
duke@435 | 52 | // </xsl:text><xsl:value-of select="@label"/><xsl:text> functions |
duke@435 | 53 | // |
duke@435 | 54 | </xsl:text> |
duke@435 | 55 | <xsl:apply-templates select="function[not(contains(@impl,'unimpl'))]"/> |
duke@435 | 56 | </xsl:template> |
duke@435 | 57 | |
duke@435 | 58 | <xsl:template match="function"> |
duke@435 | 59 | <xsl:apply-templates select="parameters" mode="advice"/> |
duke@435 | 60 | <xsl:text> |
duke@435 | 61 | jvmtiError |
duke@435 | 62 | JvmtiEnv::</xsl:text> |
duke@435 | 63 | <xsl:if test="count(@hide)=1"> |
duke@435 | 64 | <xsl:value-of select="@hide"/> |
duke@435 | 65 | </xsl:if> |
duke@435 | 66 | <xsl:value-of select="@id"/> |
duke@435 | 67 | <xsl:text>(</xsl:text> |
duke@435 | 68 | <xsl:apply-templates select="parameters" mode="HotSpotSig"/> |
duke@435 | 69 | <xsl:text>) {</xsl:text> |
duke@435 | 70 | <xsl:for-each select="parameters/param/jclass"> |
duke@435 | 71 | <xsl:if test="count(@method|@field)=0"> |
duke@435 | 72 | <xsl:text> |
duke@435 | 73 | if (java_lang_Class::is_primitive(k_mirror)) { |
duke@435 | 74 | // DO PRIMITIVE CLASS PROCESSING |
duke@435 | 75 | return JVMTI_ERROR_MUST_POSSESS_CAPABILITY; |
duke@435 | 76 | } |
coleenp@4037 | 77 | Klass* k_oop = java_lang_Class::as_Klass(k_mirror); |
duke@435 | 78 | if (k_oop == NULL) { |
duke@435 | 79 | return JVMTI_ERROR_INVALID_CLASS; |
duke@435 | 80 | }</xsl:text> |
duke@435 | 81 | </xsl:if> |
duke@435 | 82 | </xsl:for-each> |
duke@435 | 83 | <xsl:text> |
duke@435 | 84 | return JVMTI_ERROR_MUST_POSSESS_CAPABILITY; |
duke@435 | 85 | } /* end </xsl:text> |
duke@435 | 86 | <xsl:if test="count(@hide)=1"> |
duke@435 | 87 | <xsl:value-of select="@hide"/> |
duke@435 | 88 | </xsl:if> |
duke@435 | 89 | <xsl:value-of select="@id"/> |
duke@435 | 90 | <xsl:text> */ |
duke@435 | 91 | |
duke@435 | 92 | </xsl:text> |
duke@435 | 93 | </xsl:template> |
duke@435 | 94 | |
duke@435 | 95 | |
duke@435 | 96 | <!-- ======== ADVICE ======== --> |
duke@435 | 97 | |
duke@435 | 98 | <xsl:template match="parameters" mode="advice"> |
duke@435 | 99 | <xsl:apply-templates select="param" mode="advice"/> |
duke@435 | 100 | </xsl:template> |
duke@435 | 101 | |
duke@435 | 102 | <xsl:template match="param" mode="advice"> |
duke@435 | 103 | <xsl:apply-templates select="child::*[position()=1]" mode="advice"> |
duke@435 | 104 | <xsl:with-param name="name" select="@id"/> |
duke@435 | 105 | </xsl:apply-templates> |
duke@435 | 106 | </xsl:template> |
duke@435 | 107 | |
duke@435 | 108 | <xsl:template match="jthread" mode="advice"> |
duke@435 | 109 | <xsl:param name="name"/> |
duke@435 | 110 | <xsl:choose> |
duke@435 | 111 | <xsl:when test="count(@impl)=0 or not(contains(@impl,'noconvert'))"> |
duke@435 | 112 | <xsl:text> |
duke@435 | 113 | // Threads_lock NOT held, java_thread not protected by lock |
duke@435 | 114 | // java_thread - pre-checked</xsl:text> |
duke@435 | 115 | </xsl:when> |
duke@435 | 116 | <xsl:otherwise> |
duke@435 | 117 | <xsl:text> |
duke@435 | 118 | // Threads_lock NOT held |
duke@435 | 119 | // </xsl:text> |
duke@435 | 120 | <xsl:value-of select="$name"/> |
duke@435 | 121 | <xsl:text> - NOT pre-checked</xsl:text> |
duke@435 | 122 | </xsl:otherwise> |
duke@435 | 123 | </xsl:choose> |
duke@435 | 124 | </xsl:template> |
duke@435 | 125 | |
duke@435 | 126 | <xsl:template match="jrawMonitorID" mode="advice"> |
duke@435 | 127 | <xsl:param name="name"/> |
duke@435 | 128 | <xsl:text> |
duke@435 | 129 | // rmonitor - pre-checked for validity</xsl:text> |
duke@435 | 130 | </xsl:template> |
duke@435 | 131 | |
duke@435 | 132 | <xsl:template match="jframeID" mode="advice"> |
duke@435 | 133 | <xsl:param name="name"/> |
duke@435 | 134 | <xsl:text> |
duke@435 | 135 | // java_thread - unchecked |
duke@435 | 136 | // depth - pre-checked as non-negative</xsl:text> |
duke@435 | 137 | </xsl:template> |
duke@435 | 138 | |
duke@435 | 139 | <xsl:template match="jmethodID" mode="advice"> |
duke@435 | 140 | <xsl:param name="name"/> |
duke@435 | 141 | <xsl:text> |
duke@435 | 142 | // method_oop - pre-checked for validity, but may be NULL meaning obsolete method</xsl:text> |
duke@435 | 143 | </xsl:template> |
duke@435 | 144 | |
duke@435 | 145 | <xsl:template match="jfieldID" mode="advice"> |
duke@435 | 146 | <xsl:param name="name"/> |
duke@435 | 147 | </xsl:template> |
duke@435 | 148 | |
duke@435 | 149 | <xsl:template match="jclass" mode="advice"> |
duke@435 | 150 | <xsl:param name="name"/> |
duke@435 | 151 | <!-- |
duke@435 | 152 | classes passed as part of a class/method or class/field pair are used |
duke@435 | 153 | by the wrapper to get the internal type but are not needed by nor |
duke@435 | 154 | passed to the implementation layer. |
duke@435 | 155 | --> |
duke@435 | 156 | <xsl:if test="count(@method|@field)=0"> |
duke@435 | 157 | <xsl:text> |
duke@435 | 158 | // k_mirror - may be primitive, this must be checked</xsl:text> |
duke@435 | 159 | </xsl:if> |
duke@435 | 160 | </xsl:template> |
duke@435 | 161 | |
duke@435 | 162 | <xsl:template match="nullok" mode="advice"> |
duke@435 | 163 | </xsl:template> |
duke@435 | 164 | |
duke@435 | 165 | <xsl:template match="outptr|outbuf|allocfieldbuf|ptrtype|inptr|inbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="advice"> |
duke@435 | 166 | <xsl:param name="name"/> |
duke@435 | 167 | <xsl:choose> |
duke@435 | 168 | <xsl:when test="count(nullok)=0"> |
duke@435 | 169 | <xsl:text> |
duke@435 | 170 | // </xsl:text> |
duke@435 | 171 | <xsl:value-of select="$name"/> |
duke@435 | 172 | <xsl:text> - pre-checked for NULL</xsl:text> |
duke@435 | 173 | </xsl:when> |
duke@435 | 174 | <xsl:otherwise> |
duke@435 | 175 | <xsl:text> |
duke@435 | 176 | // </xsl:text> |
duke@435 | 177 | <xsl:value-of select="$name"/> |
duke@435 | 178 | <xsl:text> - NULL is a valid value, must be checked</xsl:text> |
duke@435 | 179 | </xsl:otherwise> |
duke@435 | 180 | </xsl:choose> |
duke@435 | 181 | </xsl:template> |
duke@435 | 182 | |
duke@435 | 183 | <xsl:template match="jint" mode="advice"> |
duke@435 | 184 | <xsl:param name="name"/> |
duke@435 | 185 | <xsl:if test="count(@min)=1"> |
duke@435 | 186 | <xsl:text> |
duke@435 | 187 | // </xsl:text> |
duke@435 | 188 | <xsl:value-of select="$name"/> |
duke@435 | 189 | <xsl:text> - pre-checked to be greater than or equal to </xsl:text> |
duke@435 | 190 | <xsl:value-of select="@min"/> |
duke@435 | 191 | </xsl:if> |
duke@435 | 192 | </xsl:template> |
duke@435 | 193 | |
duke@435 | 194 | <xsl:template match="jobject|jvalue|jthreadGroup|enum|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|varargs|struct" mode="advice"> |
duke@435 | 195 | <xsl:param name="name"/> |
duke@435 | 196 | </xsl:template> |
duke@435 | 197 | |
duke@435 | 198 | </xsl:stylesheet> |