Version in base suite: 11.0.14+9-1~deb10u1 Base version: openjdk-11_11.0.14+9-1~deb10u1 Target version: openjdk-11_11.0.15+10-1~deb10u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/o/openjdk-11/openjdk-11_11.0.14+9-1~deb10u1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/o/openjdk-11/openjdk-11_11.0.15+10-1~deb10u1.dsc .jcheck/conf | 2 debian/changelog | 69 debian/patches/8222825.diff | 150 - debian/patches/generated-headers.patch | 2 debian/patches/hotspot-disable-exec-shield-workaround.diff | 2 debian/patches/hotspot-libpath.diff | 2 debian/patches/jaw-classpath.diff | 2 debian/patches/machine-flag.diff | 6 debian/patches/multiple-pkcs11-library-init.diff | 2 debian/patches/riscv64.diff | 2 debian/patches/series | 1 debian/patches/system-pcsclite.diff | 2 debian/patches/workaround_expand_exec_shield_cs_limit.diff | 2 debian/patches/zero-x32.diff | 2 debian/rules | 4 make/RunTestsPrebuilt.gmk | 2 make/RunTestsPrebuiltSpec.gmk | 3 make/autoconf/basics.m4 | 2 make/autoconf/build-aux/config.guess | 11 make/autoconf/build-performance.m4 | 2 make/autoconf/configure | 3 make/autoconf/flags.m4 | 20 make/autoconf/hotspot.m4 | 15 make/autoconf/spec.gmk.in | 3 make/autoconf/toolchain.m4 | 4 make/autoconf/version-numbers | 4 make/common/JavaCompilation.gmk | 2 make/common/NativeCompilation.gmk | 2 make/data/currency/CurrencyData.properties | 4 make/hotspot/gensrc/GensrcAdlc.gmk | 5 make/hotspot/lib/CompileGtest.gmk | 4 make/hotspot/lib/CompileJvm.gmk | 3 make/lib/Awt2dLibraries.gmk | 4 make/lib/Lib-jdk.hotspot.agent.gmk | 2 make/scripts/compare.sh | 31 make/test/JtregNativeJdk.gmk | 1 src/demo/share/java2d/J2DBench/options/default.opt | 5 src/demo/share/java2d/J2DBench/src/j2dbench/Destinations.java | 108 + src/demo/share/java2d/J2DBench/src/j2dbench/J2DBench.java | 9 src/demo/share/java2d/J2DBench/src/j2dbench/tests/ImageTests.java | 16 src/hotspot/cpu/aarch64/aarch64.ad | 5 src/hotspot/cpu/aarch64/assembler_aarch64.hpp | 6 src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp | 1 src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp | 6 src/hotspot/cpu/aarch64/frame_aarch64.cpp | 11 src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp | 4 src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp | 82 - src/hotspot/cpu/aarch64/interpreterRT_aarch64.hpp | 7 src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp | 59 src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp | 1 src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp | 32 src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp | 3 src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp | 2 src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp | 33 src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp | 16 src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp | 7 src/hotspot/cpu/aarch64/templateTable_aarch64.cpp | 6 src/hotspot/cpu/aarch64/vm_version_aarch64.hpp | 9 src/hotspot/cpu/arm/arm.ad | 4 src/hotspot/cpu/arm/assembler_arm_32.cpp | 2 src/hotspot/cpu/arm/assembler_arm_32.hpp | 4 src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp | 7 src/hotspot/cpu/arm/vm_version_arm.hpp | 4 src/hotspot/cpu/arm/vm_version_arm_32.cpp | 28 src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp | 2 src/hotspot/cpu/ppc/frame_ppc.cpp | 58 src/hotspot/cpu/s390/frame_s390.cpp | 62 src/hotspot/cpu/x86/assembler_x86.cpp | 2 src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp | 16 src/hotspot/cpu/x86/nativeInst_x86.cpp | 10 src/hotspot/cpu/x86/nativeInst_x86.hpp | 6 src/hotspot/cpu/x86/x86.ad | 15 src/hotspot/cpu/zero/globals_zero.hpp | 3 src/hotspot/os/bsd/os_bsd.cpp | 82 - src/hotspot/os/linux/os_linux.cpp | 60 src/hotspot/os/linux/os_linux.hpp | 35 src/hotspot/os/windows/os_windows.cpp | 5 src/hotspot/os_cpu/aix_ppc/orderAccess_aix_ppc.hpp | 2 src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp | 6 src/hotspot/os_cpu/bsd_aarch64/atomic_bsd_aarch64.hpp | 82 + src/hotspot/os_cpu/bsd_aarch64/bytes_bsd_aarch64.inline.hpp | 55 src/hotspot/os_cpu/bsd_aarch64/copy_bsd_aarch64.inline.hpp | 188 ++ src/hotspot/os_cpu/bsd_aarch64/copy_bsd_aarch64.s | 239 +++ src/hotspot/os_cpu/bsd_aarch64/globals_bsd_aarch64.hpp | 43 src/hotspot/os_cpu/bsd_aarch64/icache_bsd_aarch64.hpp | 45 src/hotspot/os_cpu/bsd_aarch64/orderAccess_bsd_aarch64.hpp | 54 src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp | 753 ++++++++++ src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.hpp | 42 src/hotspot/os_cpu/bsd_aarch64/pauth_bsd_aarch64.inline.hpp | 53 src/hotspot/os_cpu/bsd_aarch64/prefetch_bsd_aarch64.inline.hpp | 42 src/hotspot/os_cpu/bsd_aarch64/thread_bsd_aarch64.cpp | 104 + src/hotspot/os_cpu/bsd_aarch64/thread_bsd_aarch64.hpp | 74 src/hotspot/os_cpu/bsd_aarch64/vmStructs_bsd_aarch64.hpp | 54 src/hotspot/os_cpu/bsd_aarch64/vm_version_bsd_aarch64.cpp | 89 + src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp | 6 src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp | 9 src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp | 5 src/hotspot/os_cpu/linux_ppc/orderAccess_linux_ppc.hpp | 2 src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp | 10 src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp | 11 src/hotspot/os_cpu/linux_s390/orderAccess_linux_s390.hpp | 2 src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp | 6 src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp | 13 src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp | 11 src/hotspot/os_cpu/windows_aarch64/thread_windows_aarch64.hpp | 10 src/hotspot/share/adlc/adlparse.cpp | 4 src/hotspot/share/adlc/arena.cpp | 4 src/hotspot/share/adlc/dict2.cpp | 6 src/hotspot/share/adlc/main.cpp | 2 src/hotspot/share/c1/c1_IR.cpp | 9 src/hotspot/share/c1/c1_IR.hpp | 10 src/hotspot/share/c1/c1_Instruction.cpp | 5 src/hotspot/share/c1/c1_LIRAssembler.cpp | 1 src/hotspot/share/c1/c1_LIRGenerator.cpp | 8 src/hotspot/share/c1/c1_Runtime1.cpp | 4 src/hotspot/share/ci/ciMethodData.cpp | 9 src/hotspot/share/classfile/altHashing.cpp | 33 src/hotspot/share/classfile/altHashing.hpp | 4 src/hotspot/share/classfile/dictionary.cpp | 6 src/hotspot/share/classfile/verifier.cpp | 5 src/hotspot/share/compiler/compileBroker.cpp | 1 src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp | 2 src/hotspot/share/include/jvm.h | 2 src/hotspot/share/interpreter/bytecodeInterpreter.cpp | 14 src/hotspot/share/interpreter/bytecodes.cpp | 4 src/hotspot/share/interpreter/interpreterRuntime.cpp | 3 src/hotspot/share/interpreter/oopMapCache.cpp | 2 src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp | 2 src/hotspot/share/jvmci/jvmciEnv.hpp | 1 src/hotspot/share/jvmci/vmStructs_jvmci.cpp | 2 src/hotspot/share/libadt/dict.cpp | 6 src/hotspot/share/libadt/set.cpp | 6 src/hotspot/share/libadt/vectset.cpp | 52 src/hotspot/share/memory/arena.cpp | 2 src/hotspot/share/memory/virtualspace.cpp | 12 src/hotspot/share/oops/instanceKlass.cpp | 20 src/hotspot/share/oops/instanceKlass.hpp | 17 src/hotspot/share/oops/method.cpp | 13 src/hotspot/share/oops/methodData.hpp | 8 src/hotspot/share/opto/cfgnode.cpp | 21 src/hotspot/share/opto/convertnode.cpp | 24 src/hotspot/share/opto/library_call.cpp | 4 src/hotspot/share/opto/loopPredicate.cpp | 34 src/hotspot/share/opto/loopTransform.cpp | 417 ++--- src/hotspot/share/opto/loopnode.hpp | 3 src/hotspot/share/opto/loopopts.cpp | 10 src/hotspot/share/opto/mulnode.cpp | 2 src/hotspot/share/opto/postaloc.cpp | 2 src/hotspot/share/opto/runtime.cpp | 5 src/hotspot/share/prims/jni.cpp | 16 src/hotspot/share/prims/jniCheck.cpp | 1 src/hotspot/share/prims/jniFastGetField.hpp | 5 src/hotspot/share/prims/jvm.cpp | 28 src/hotspot/share/prims/jvmtiEnter.xsl | 2 src/hotspot/share/prims/jvmtiEnv.cpp | 5 src/hotspot/share/prims/jvmtiEnvBase.cpp | 2 src/hotspot/share/prims/whitebox.inline.hpp | 5 src/hotspot/share/runtime/deoptimization.cpp | 14 src/hotspot/share/runtime/deoptimization.hpp | 12 src/hotspot/share/runtime/interfaceSupport.inline.hpp | 14 src/hotspot/share/runtime/javaCalls.cpp | 6 src/hotspot/share/runtime/os.cpp | 25 src/hotspot/share/runtime/os.hpp | 32 src/hotspot/share/runtime/safefetch.inline.hpp | 11 src/hotspot/share/runtime/safepoint.cpp | 4 src/hotspot/share/runtime/signature.hpp | 13 src/hotspot/share/runtime/stubRoutines.cpp | 4 src/hotspot/share/runtime/thread.cpp | 13 src/hotspot/share/runtime/thread.hpp | 10 src/hotspot/share/runtime/thread.inline.hpp | 22 src/hotspot/share/runtime/threadWXSetters.inline.hpp | 49 src/hotspot/share/services/virtualMemoryTracker.cpp | 8 src/hotspot/share/utilities/accessFlags.hpp | 5 src/hotspot/share/utilities/macros.hpp | 2 src/hotspot/share/utilities/nativeCallStack.cpp | 2 src/hotspot/share/utilities/vmError.cpp | 4 src/java.base/macosx/classes/apple/security/KeychainStore.java | 223 ++ src/java.base/macosx/classes/java/lang/ClassLoaderHelper.java | 28 src/java.base/macosx/native/libjli/java_md_macosx.c | 4 src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m | 63 src/java.base/share/classes/com/sun/crypto/provider/ChaCha20Cipher.java | 13 src/java.base/share/classes/java/io/File.java | 10 src/java.base/share/classes/java/io/FileSystem.java | 7 src/java.base/share/classes/java/lang/ClassLoader.java | 12 src/java.base/share/classes/java/lang/StringCoding.java | 11 src/java.base/share/classes/java/math/BigInteger.java | 4 src/java.base/share/classes/java/text/SimpleDateFormat.java | 22 src/java.base/share/classes/java/time/format/Parsed.java | 9 src/java.base/share/classes/java/util/DoubleSummaryStatistics.java | 6 src/java.base/share/classes/java/util/stream/Collectors.java | 17 src/java.base/share/classes/java/util/stream/DoublePipeline.java | 8 src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java | 6 src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java | 13 src/java.base/share/classes/sun/security/ssl/InputRecord.java | 2 src/java.base/share/classes/sun/security/ssl/OutputRecord.java | 9 src/java.base/share/classes/sun/security/ssl/SSLEngineOutputRecord.java | 22 src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java | 19 src/java.base/share/classes/sun/security/ssl/SSLSocketOutputRecord.java | 5 src/java.base/share/classes/sun/security/ssl/TransportContext.java | 8 src/java.base/share/classes/sun/security/tools/keytool/Main.java | 5 src/java.base/share/classes/sun/security/util/DerIndefLenConverter.java | 17 src/java.base/share/classes/sun/security/util/DerValue.java | 28 src/java.base/share/classes/sun/security/util/ObjectIdentifier.java | 11 src/java.base/share/classes/sun/util/resources/CurrencyNames.properties | 4 src/java.base/share/native/libjava/ClassLoader.c | 7 src/java.base/share/native/libjava/jni_util.c | 4 src/java.base/share/native/libverify/check_code.c | 4 src/java.base/unix/classes/java/io/UnixFileSystem.java | 7 src/java.base/unix/classes/java/lang/ClassLoaderHelper.java | 10 src/java.base/windows/classes/java/io/WinNTFileSystem.java | 48 src/java.base/windows/classes/java/lang/ClassLoaderHelper.java | 8 src/java.base/windows/native/libnet/DefaultProxySelector.c | 18 src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java | 12 src/java.desktop/share/classes/com/sun/media/sound/AbstractDataLine.java | 19 src/java.desktop/share/classes/com/sun/media/sound/AbstractLine.java | 10 src/java.desktop/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java | 25 src/java.desktop/share/classes/com/sun/media/sound/DirectAudioDevice.java | 4 src/java.desktop/share/classes/java/awt/color/ICC_Profile.java | 8 src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.h | 4 src/java.desktop/unix/native/common/java2d/opengl/J2D_GL/glxext.h | 4 src/java.desktop/windows/native/libawt/windows/awt_Component.cpp | 26 src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp | 45 src/java.instrument/share/native/libinstrument/InvocationAdapter.c | 4 src/java.naming/share/classes/com/sun/jndi/ldap/LdapClientFactory.java | 16 src/java.naming/share/classes/com/sun/jndi/ldap/LdapURL.java | 67 src/java.naming/share/classes/com/sun/jndi/ldap/pool/Connections.java | 271 +-- src/java.naming/share/classes/com/sun/jndi/ldap/pool/Pool.java | 109 + src/java.naming/share/classes/com/sun/jndi/ldap/pool/PooledConnectionFactory.java | 9 src/java.naming/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java | 19 src/java.naming/share/classes/com/sun/jndi/toolkit/url/Uri.java | 285 +++ src/java.net.http/share/classes/jdk/internal/net/http/Stream.java | 4 src/java.security.jgss/share/native/libj2gss/gssapi.h | 8 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/Init.java | 8 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/IntegrityHmac.java | 2 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java | 2 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java | 6 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerPhysical.java | 2 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/NameSpaceSymbTable.java | 2 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityRuntimeException.java | 181 -- src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.java | 12 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/KeyInfoReferenceResolver.java | 3 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/resource/config.xml | 2 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties | 3 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.java | 15 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N.java | 2 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusive.java | 2 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformEnvelopedSignature.java | 8 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPath.java | 15 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java | 1 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/DOMNamespaceContext.java | 6 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/RFC2253Parser.java | 110 - src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java | 2 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolver.java | 13 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverContext.java | 1 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java | 5 src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverLocalFilesystem.java | 45 src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java | 3 src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java | 6 src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java | 2 src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMTransform.java | 2 src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.java | 2 src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/Policy.java | 25 src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/Utils.java | 2 src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java | 2 src/java.xml.crypto/share/legal/santuario.md | 2 src/java.xml/share/classes/com/sun/java_cup/internal/runtime/lr_parser.java | 62 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Const.java | 535 +++---- src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java | 23 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationDefault.java | 12 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationElementValue.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationEntry.java | 36 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Annotations.java | 40 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ArrayElementValue.java | 26 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java | 4 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethod.java | 56 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethods.java | 38 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java | 86 - src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java | 77 - src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java | 84 - src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java | 4 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantClass.java | 22 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInvokeDynamic.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodHandle.java | 24 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodType.java | 12 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantModule.java | 22 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantNameAndType.java | 38 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPackage.java | 22 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java | 58 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantString.java | 22 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java | 20 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ElementValue.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EnumElementValue.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java | 54 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java | 88 - src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java | 34 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java | 184 +- src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java | 36 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java | 53 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariable.java | 114 - src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java | 46 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTypeTable.java | 34 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameter.java | 32 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameters.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Module.java | 137 - src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleExports.java | 38 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleMainClass.java | 36 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleOpens.java | 38 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModulePackages.java | 52 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleProvides.java | 30 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleRequires.java | 26 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/NestHost.java | 30 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java | 52 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotationEntry.java | 12 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotations.java | 36 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java | 26 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SimpleElementValue.java | 22 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java | 24 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java | 4 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java | 280 +-- src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java | 20 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Unknown.java | 10 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java | 59 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AnnotationElementValueGen.java | 4 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayElementValueGen.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayInstruction.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java | 18 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java | 174 +- src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java | 80 - src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPoolGen.java | 80 - src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValueGen.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValuePairGen.java | 20 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EnumElementValueGen.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java | 34 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEDYNAMIC.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEINTERFACE.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKESPECIAL.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKESTATIC.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEVIRTUAL.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java | 84 - src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionHandle.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionList.java | 26 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JsrInstruction.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC2_W.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LineNumberGen.java | 21 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableGen.java | 26 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableInstruction.java | 30 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java | 358 ++-- src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ObjectType.java | 34 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWITCH.java | 12 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Select.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SimpleElementValueGen.java | 10 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Type.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/CodeHTML.java | 92 - src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ConstantHTML.java | 74 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java | 14 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/MethodHTML.java | 14 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SyntheticRepository.java | 8 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/XalanConstants.java | 15 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java | 467 ------ src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java | 15 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java | 47 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java | 11 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/sym.java | 14 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages.java | 25 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java | 15 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java | 2 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java | 6 src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java | 12 src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java | 49 src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java | 29 src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java | 71 src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java | 20 src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java | 14 src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPath.java | 89 - src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Lexer.java | 161 +- src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Token.java | 76 + src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathParser.java | 319 ++-- src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java | 15 src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java | 20 src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImplUtil.java | 6 src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathResultImpl.java | 8 src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java | 15 src/java.xml/share/classes/com/sun/xml/internal/stream/events/EntityDeclarationImpl.java | 15 src/java.xml/share/classes/com/sun/xml/internal/stream/events/NotationDeclarationImpl.java | 14 src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java | 48 src/java.xml/share/classes/jdk/xml/internal/XMLLimitAnalyzer.java | 249 +++ src/java.xml/share/classes/jdk/xml/internal/XMLSecurityManager.java | 604 ++++++++ src/java.xml/share/classes/module-info.java | 39 src/java.xml/share/legal/bcel.md | 2 src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java | 6 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java | 44 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java | 2 src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java | 2 src/jdk.compiler/share/classes/com/sun/tools/javac/file/PathFileObject.java | 5 src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java | 7 src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java | 18 src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java | 6 src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java | 292 ++- src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyGenerator.java | 6 src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11SecretKeyFactory.java | 5 src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java | 22 src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java | 7 src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/CK_SALSA20_CHACHA20_POLY1305_PARAMS.java | 80 + src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_convert.c | 74 src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c | 7 src/jdk.crypto.cryptoki/share/native/libj2pkcs11/pkcs11wrapper.h | 4 src/jdk.hotspot.agent/macosx/native/libsaproc/MacosxDebuggerLocal.m | 142 + src/jdk.hotspot.agent/macosx/native/libsaproc/libproc_impl.c | 14 src/jdk.hotspot.agent/macosx/native/libsaproc/libproc_impl.h | 65 src/jdk.hotspot.agent/macosx/native/libsaproc/ps_core.c | 155 +- src/jdk.hotspot.agent/macosx/native/libsaproc/symtab.c | 110 + src/jdk.hotspot.agent/macosx/native/libsaproc/symtab.h | 4 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java | 5 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java | 12 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java | 5 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/bsd/aarch64/BsdAARCH64CFrame.java | 87 + src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/bsd/aarch64/BsdAARCH64ThreadContext.java | 47 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/posix/elf/ELFFileParser.java | 109 - src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/posix/elf/ELFSectionHeader.java | 4 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/posix/elf/ELFSymbol.java | 4 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java | 5 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/bsd_aarch64/BsdAARCH64JavaThreadPDAccess.java | 137 + src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Candidate.java | 5 src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/CompletionMatcher.java | 48 src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/ConfigurationPath.java | 75 src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/EndOfFileException.java | 12 src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/LineReader.java | 67 src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/LineReaderBuilder.java | 11 src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Parser.java | 6 src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/PrintAboveWriter.java | 42 src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/ScriptEngine.java | 153 -- src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/CompletionMatcherImpl.java | 210 ++ src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/DefaultHighlighter.java | 6 src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/DefaultParser.java | 81 - src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/LineReaderImpl.java | 557 ++++--- src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/ReaderUtils.java | 13 src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/StringsCompleter.java | 13 src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/SystemCompleter.java | 150 + src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/history/DefaultHistory.java | 41 src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/Terminal.java | 7 src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/TerminalBuilder.java | 355 +++- src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractTerminal.java | 25 src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractWindowsTerminal.java | 2 src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/spi/JansiSupport.java | 7 src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/spi/JnaSupport.java | 7 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedCharSequence.java | 142 + src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedString.java | 12 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedStringBuilder.java | 20 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedStyle.java | 94 - src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/ColorPalette.java | 262 +++ src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Colors.java | 119 + src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Curses.java | 75 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Display.java | 4 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/InfoCmp.java | 2 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Log.java | 9 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingPumpInputStream.java | 14 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingPumpReader.java | 6 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/PumpReader.java | 2 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Signals.java | 11 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/StyleResolver.java | 109 + src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/rxvt-basic.caps | 41 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/rxvt-unicode-256color.caps | 44 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/rxvt-unicode.caps | 44 src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/rxvt.caps | 43 src/jdk.internal.le/share/legal/jline.md | 2 src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/JnaSupportImpl.java | 27 src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/win/JnaWinSysTerminal.java | 36 src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java | 6 src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java | 18 src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java | 2 src/jdk.jfr/share/classes/jdk/jfr/consumer/ParserFactory.java | 3 src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataReader.java | 2 src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/RecordingInput.java | 12 src/jdk.jfr/share/classes/jdk/jfr/internal/tool/JSONWriter.java | 2 src/jdk.jfr/share/classes/jdk/jfr/internal/tool/XMLWriter.java | 6 src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java | 8 src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsUrl.java | 71 src/jdk.naming.rmi/share/classes/com/sun/jndi/url/rmi/rmiURLContext.java | 303 +++- src/utils/hsdis/Makefile | 13 test/failure_handler/src/share/conf/linux.properties | 17 test/failure_handler/src/share/conf/mac.properties | 8 test/failure_handler/src/share/conf/solaris.properties | 17 test/failure_handler/src/share/conf/windows.properties | 17 test/hotspot/gtest/gtestMain.cpp | 13 test/hotspot/gtest/logging/logTestUtils.inline.hpp | 2 test/hotspot/gtest/logging/test_logFileOutput.cpp | 2 test/hotspot/jtreg/ProblemList.txt | 1 test/hotspot/jtreg/TEST.quick-groups | 14 test/hotspot/jtreg/compiler/c1/Test8271202.java | 67 test/hotspot/jtreg/compiler/c1/TestC1PhiPlacementPathology.jasm | 76 + test/hotspot/jtreg/compiler/c1/TestC1PhiPlacementPathologyMain.java | 40 test/hotspot/jtreg/compiler/c2/TestSqrt.java | 54 test/hotspot/jtreg/compiler/loopopts/TestEliminateNullCheckWithSplitIf.java | 100 + test/hotspot/jtreg/compiler/loopopts/TestSkeletonPredicateNegation.java | 66 test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithSerial.java | 2 test/hotspot/jtreg/runtime/BootstrapMethod/BSMCalledTwice.java | 12 test/hotspot/jtreg/runtime/CompressedOops/CompressedClassPointers.java | 4 test/hotspot/jtreg/runtime/ErrorHandling/TestOnError.java | 5 test/hotspot/jtreg/runtime/Metaspace/FragmentMetaspace.java | 11 test/hotspot/jtreg/runtime/appcds/MoveJDKTest.java | 12 test/hotspot/jtreg/runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/libArrayIndexOutOfBoundsExceptionTest.c | 4 test/hotspot/jtreg/runtime/jni/codegenAttachThread/TestCodegenAttach.java | 42 test/hotspot/jtreg/runtime/jni/codegenAttachThread/libcodegenAttach.c | 124 + test/hotspot/jtreg/runtime/modules/LoadUnloadModuleStress.java | 2 test/hotspot/jtreg/runtime/signal/exesigtest.c | 9 test/hotspot/jtreg/runtime/testlibrary/GeneratedClassLoader.java | 16 test/hotspot/jtreg/runtime/verifier/PutfieldProtectedTest.java | 45 test/hotspot/jtreg/runtime/verifier/putfieldProtected.jasm | 56 test/hotspot/jtreg/serviceability/logging/TestFullNames.java | 3 test/hotspot/jtreg/vmTestbase/TEST.properties | 2 test/hotspot/jtreg/vmTestbase/jit/Arrays/ArrayBounds/ArrayBounds.java | 3 test/hotspot/jtreg/vmTestbase/jit/Arrays/ArrayStoreCheck/ArrayStoreCheck.java | 3 test/hotspot/jtreg/vmTestbase/jit/Arrays/ArrayTests/ArrayTests.java | 3 test/hotspot/jtreg/vmTestbase/jit/CEETest/CEETest.java | 3 test/hotspot/jtreg/vmTestbase/jit/CondExpr/CondExpr.java | 3 test/hotspot/jtreg/vmTestbase/jit/DivTest/DivTest.java | 8 test/hotspot/jtreg/vmTestbase/jit/ExcOpt/ExcOpt.java | 3 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/FPCompare/TestFPBinop/TestFPBinop.java | 3 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/gen_math/Filtering/Filtering.java | 8 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/gen_math/Loops01/Loops01.java | 8 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/gen_math/Loops02/Loops02.java | 6 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/gen_math/Loops03/Loops03.java | 6 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/gen_math/Loops04/Loops04.java | 8 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/gen_math/Loops05/Loops05.java | 8 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/gen_math/Loops06/Loops06.java | 8 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/gen_math/Loops07/Loops07.java | 8 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/gen_math/Matrix_3d/Matrix_3d.java | 8 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/gen_math/ShortCircuitTest/ShortCircuitTest.java | 3 test/hotspot/jtreg/vmTestbase/jit/FloatingPoint/gen_math/Summ/Summ.java | 8 test/hotspot/jtreg/vmTestbase/jit/PrintProperties/PrintProperties.java | 3 test/hotspot/jtreg/vmTestbase/jit/PrintThis/PrintThis.java | 3 test/hotspot/jtreg/vmTestbase/jit/Robert/Robert.java | 8 test/hotspot/jtreg/vmTestbase/jit/Sleeper/Sleeper.java | 8 test/hotspot/jtreg/vmTestbase/jit/bounds/bounds.java | 8 test/hotspot/jtreg/vmTestbase/jit/collapse/collapse.java | 8 test/hotspot/jtreg/vmTestbase/jit/deoptimization/test01/test01.java | 8 test/hotspot/jtreg/vmTestbase/jit/deoptimization/test02/test02.java | 8 test/hotspot/jtreg/vmTestbase/jit/deoptimization/test03/test03.java | 8 test/hotspot/jtreg/vmTestbase/jit/deoptimization/test04/test04.java | 8 test/hotspot/jtreg/vmTestbase/jit/deoptimization/test05/test05.java | 8 test/hotspot/jtreg/vmTestbase/jit/deoptimization/test06/test06.java | 8 test/hotspot/jtreg/vmTestbase/jit/deoptimization/test07/test07.java | 8 test/hotspot/jtreg/vmTestbase/jit/deoptimization/test08/test08.java | 8 test/hotspot/jtreg/vmTestbase/jit/escape/AdaptiveBlocking/AdaptiveBlocking001/AdaptiveBlocking001.java | 3 test/hotspot/jtreg/vmTestbase/jit/escape/LockElision/MatMul/MatMul.java | 6 test/hotspot/jtreg/vmTestbase/jit/exception/exception.java | 8 test/hotspot/jtreg/vmTestbase/jit/init/init01/init01.java | 8 test/hotspot/jtreg/vmTestbase/jit/init/init02/init02.java | 8 test/hotspot/jtreg/vmTestbase/jit/inline/inline003/inline003.java | 8 test/hotspot/jtreg/vmTestbase/jit/inline/inline004/inline004.java | 8 test/hotspot/jtreg/vmTestbase/jit/inline/inline005/inline005.java | 3 test/hotspot/jtreg/vmTestbase/jit/inline/inline007/inline007.java | 8 test/hotspot/jtreg/vmTestbase/jit/misctests/JitBug1/JitBug1.java | 3 test/hotspot/jtreg/vmTestbase/jit/misctests/Pi/Pi.java | 6 test/hotspot/jtreg/vmTestbase/jit/misctests/clss14702/clss14702.java | 3 test/hotspot/jtreg/vmTestbase/jit/misctests/fpustack/GraphApplet.java | 3 test/hotspot/jtreg/vmTestbase/jit/misctests/putfield00802/putfield00802.java | 3 test/hotspot/jtreg/vmTestbase/jit/misctests/t5/t5.java | 8 test/hotspot/jtreg/vmTestbase/jit/overflow/overflow.java | 8 test/hotspot/jtreg/vmTestbase/jit/regression/CrashC1/CrashC1.java | 3 test/hotspot/jtreg/vmTestbase/jit/regression/b4427606/b4427606.java | 3 test/hotspot/jtreg/vmTestbase/jit/regression/b4446672/b4446672.java | 3 test/hotspot/jtreg/vmTestbase/jit/series/series.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t001/t001.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t002/t002.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t003/t003.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t004/t004.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t005/t005.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t006/t006.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t007/t007.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t008/t008.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t009/t009.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t011/t011.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t012/t012.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t013/t013.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t014/t014.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t015/t015.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t016/t016.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t017/t017.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t018/t018.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t019/t019.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t020/t020.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t021/t021.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t022/t022.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t023/t023.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t024/t024.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t025/t025.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t026/t026.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t027/t027.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t028/t028.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t029/t029.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t030/t030.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t031/t031.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t032/t032.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t033/t033.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t034/t034.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t035/t035.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t036/t036.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t037/t037.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t038/t038.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t039/t039.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t040/t040.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t041/t041.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t042/t042.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t043/t043.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t044/t044.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t045/t045.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t046/t046.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t047/t047.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t048/t048.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t049/t049.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t050/t050.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t051/t051.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t052/t052.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t053/t053.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t054/t054.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t055/t055.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t056/t056.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t057/t057.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t058/t058.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t059/t059.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t060/t060.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t061/t061.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t062/t062.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t063/t063.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t064/t064.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t065/t065.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t066/t066.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t067/t067.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t068/t068.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t069/t069.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t070/t070.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t071/t071.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t072/t072.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t073/t073.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t074/t074.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t075/t075.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t076/t076.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t077/t077.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t078/t078.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t079/t079.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t080/t080.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t081/t081.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t086/t086.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t087/t087.java | 54 test/hotspot/jtreg/vmTestbase/jit/t/t088/t088.java | 58 test/hotspot/jtreg/vmTestbase/jit/t/t091/t091.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t093/t093.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t094/t094.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t095/t095.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t096/t096.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t098/t098.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t099/t099.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t100/t100.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t101/t101.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t102/t102.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t103/t103.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t104/t104.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t105/t105.java | 13 test/hotspot/jtreg/vmTestbase/jit/t/t106/t106.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t107/t107.java | 8 test/hotspot/jtreg/vmTestbase/jit/t/t108/TestDescription.java | 39 test/hotspot/jtreg/vmTestbase/jit/t/t108/t108.gold | 4 test/hotspot/jtreg/vmTestbase/jit/t/t108/t108.java | 36 test/hotspot/jtreg/vmTestbase/jit/t/t109/TestDescription.java | 39 test/hotspot/jtreg/vmTestbase/jit/t/t109/t109.gold | 4 test/hotspot/jtreg/vmTestbase/jit/t/t109/t109.java | 42 test/hotspot/jtreg/vmTestbase/jit/t/t110/TestDescription.java | 39 test/hotspot/jtreg/vmTestbase/jit/t/t110/t110.gold | 4 test/hotspot/jtreg/vmTestbase/jit/t/t110/t110.java | 44 test/hotspot/jtreg/vmTestbase/jit/t/t111/TestDescription.java | 39 test/hotspot/jtreg/vmTestbase/jit/t/t111/t111.gold | 4 test/hotspot/jtreg/vmTestbase/jit/t/t111/t111.java | 42 test/hotspot/jtreg/vmTestbase/jit/t/t112/TestDescription.java | 39 test/hotspot/jtreg/vmTestbase/jit/t/t112/t112.gold | 4 test/hotspot/jtreg/vmTestbase/jit/t/t112/t112.java | 42 test/hotspot/jtreg/vmTestbase/jit/t/t113/TestDescription.java | 39 test/hotspot/jtreg/vmTestbase/jit/t/t113/t113.gold | 2 test/hotspot/jtreg/vmTestbase/jit/t/t113/t113.java | 62 test/hotspot/jtreg/vmTestbase/jit/tiered/Test.java | 76 + test/hotspot/jtreg/vmTestbase/jit/tiered/TestDescription.java | 42 test/hotspot/jtreg/vmTestbase/jit/tiered/tieredTest.sh | 70 test/hotspot/jtreg/vmTestbase/jit/verifier/VerifyInitLocal/VerifyInitLocal.java | 3 test/hotspot/jtreg/vmTestbase/jit/verifier/VerifyMergeStack/VerifyMergeStack.java | 3 test/hotspot/jtreg/vmTestbase/jit/wide/wide01/wide01.java | 8 test/hotspot/jtreg/vmTestbase/jit/wide/wide02/wide02.java | 8 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy001/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy002/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy003/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy004/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy005/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy006/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy007/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy008/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy009/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy010/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy011/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy012/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy013/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy014/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy015/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/aod/TEST.properties | 2 test/hotspot/jtreg/vmTestbase/nsk/jdb/TEST.properties | 2 test/hotspot/jtreg/vmTestbase/nsk/jdi/TEST.properties | 2 test/hotspot/jtreg/vmTestbase/nsk/jdwp/TEST.properties | 2 test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine.java | 4 test/hotspot/jtreg/vmTestbase/nsk/jvmti/StopThread/stopthrd007.java | 8 test/hotspot/jtreg/vmTestbase/nsk/jvmti/TEST.properties | 2 test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref001/followref001.cpp | 2 test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref002/followref002.cpp | 2 test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/followref003.cpp | 2 test/hotspot/jtreg/vmTestbase/nsk/share/GoldChecker.java | 47 test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ArgumentHandler.java | 18 test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_FollowRefObjects.cpp | 2 test/hotspot/jtreg/vmTestbase/nsk/sysdict/TEST.properties | 2 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree001/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree002/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree003/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree004/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree005/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree006/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree007/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree008/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree009/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree010/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree011/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/btree/btree012/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/chain/chain001/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/chain/chain002/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/chain/chain003/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/chain/chain004/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/chain/chain005/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/chain/chain006/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/chain/chain007/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/nsk/sysdict/vm/stress/chain/chain008/TEST.properties | 1 test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfo/Test.java | 75 test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfo/TestDescription.java | 40 test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfo/run.sh | 60 test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfoOnCompilation/Test.java | 59 test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfoOnCompilation/TestDescription.java | 44 test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfoOnCompilation/run.sh | 50 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/TEST.properties | 2 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit001/uninit001.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit002/uninit002.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit003/uninit003.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit004/uninit004.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit005/uninit005.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit006/uninit006.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit007/uninit007.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit008/uninit008.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit009/uninit009.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit010/uninit010.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit011/uninit011.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit012/uninit012.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/complog/uninit/uninit013/uninit013.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/coverage/parentheses/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/constprop/constprop01/constprop01.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/constprop/constprop02/constprop02.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead01/dead01.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead02/dead02.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead03/dead03.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead04/dead04.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead05/dead05.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead06/dead06.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead07/dead07.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead08/dead08.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead09/dead09.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead10/dead10.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead11/dead11.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead12/dead12.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead13/dead13.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead14/dead14.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead15/dead15.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/dead/dead16/dead16.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/hoist/hoist01/hoist01.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/hoist/hoist02/hoist02.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/hoist/hoist03/hoist03.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/hoist/hoist04/hoist04.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/subcommon/subcommon01/subcommon01.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/subcommon/subcommon02/subcommon02.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/subcommon/subcommon03/subcommon03.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/subcommon/subcommon04/subcommon04.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/jbe/subcommon/subcommon05/subcommon05.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/explicit/Explicit01/cs_disabled/TestDescription.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/explicit/Explicit01/cs_enabled/TestDescription.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/explicit/Merge01/cs_disabled/TestDescription.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/explicit/Merge01/cs_enabled/TestDescription.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_disabled/TestDescription.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_enabled/TestDescription.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_disabled/TestDescription.java | 3 test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_enabled/TestDescription.java | 3 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc1/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc10/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc11/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc12/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc13/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc14/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc15/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc16/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc17/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc18/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc19/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc2/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc20/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc21/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc22/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc23/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc24/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc25/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc26/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc27/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc28/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc29/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc3/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc30/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc31/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc32/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc33/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc34/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc35/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc36/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc37/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc38/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc39/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc4/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc40/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc41/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc42/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc43/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc44/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc45/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc46/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc47/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc48/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc49/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc5/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc50/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc51/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc52/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc6/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc7/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc8/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/jit/LongTransitions/nativeFnc9/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/vm/mlvm/TEST.properties | 2 test/jdk/ProblemList.txt | 7 test/jdk/TEST.groups | 11 test/jdk/com/sun/crypto/provider/Cipher/ChaCha20/ChaCha20Poly1305ParamTest.java | 118 + test/jdk/com/sun/jdi/TestScaffold.java | 7 test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java | 140 + test/jdk/java/awt/FontClass/DrawStringWithInfiniteXform.java | 10 test/jdk/java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java | 91 + test/jdk/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnMovingToAnotherDisplay.java | 2 test/jdk/java/awt/color/CheckDefaultProperties.java | 85 + test/jdk/java/awt/color/ICC_Profile/GetInstanceBrokenStream.java | 54 test/jdk/java/io/File/LastModifiedTest.java | 60 test/jdk/java/lang/Package/GetPackages.java | 8 test/jdk/java/lang/RuntimeTests/loadLibrary/exeLibraryCache/LibraryFromCache.java | 64 test/jdk/java/lang/RuntimeTests/loadLibrary/exeLibraryCache/exeLibraryCache.c | 49 test/jdk/java/lang/StackWalker/Basic.java | 7 test/jdk/java/lang/management/MemoryMXBean/MemoryTest.java | 14 test/jdk/java/math/BigInteger/BitLengthOverflow.java | 35 test/jdk/java/net/httpclient/SpecialHeadersTest.java | 87 - test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java | 3 test/jdk/java/text/Format/DateFormat/DateFormatTest.java | 19 test/jdk/java/text/Format/DateFormat/NonGregorianFormatTest.java | 12 test/jdk/java/time/test/java/time/format/TestDateTimeParsing.java | 14 test/jdk/java/util/Currency/ValidateISO4217.java | 6 test/jdk/java/util/Currency/tablea1.txt | 6 test/jdk/java/util/DoubleStreamSums/CompensatedSums.java | 140 + test/jdk/java/util/DoubleSummaryStatistics/NegativeCompensation.java | 73 test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java | 18 test/jdk/javax/sound/sampled/Clip/SetPositionHang.java | 106 + test/jdk/javax/swing/JTable/4235420/bug4235420.java | 38 test/jdk/javax/swing/UIDefaults/6302464/bug6302464.java | 43 test/jdk/javax/swing/text/Caret/TestCaretPositionJTextPane.java | 2 test/jdk/javax/swing/text/FlowView/6318524/bug6318524.java | 194 ++ test/jdk/javax/swing/text/ParagraphView/6364882/bug6364882.java | 252 +++ test/jdk/javax/xml/jaxp/XPath/InvalidXPath.java | 53 test/jdk/jdk/editpad/EditPadTest.java | 1 test/jdk/jdk/internal/jline/AbstractWindowsTerminalTest.java | 7 test/jdk/jdk/internal/jline/KeyConversionTest.java | 9 test/jdk/jdk/jfr/event/io/IOEvent.java | 9 test/jdk/jdk/jfr/event/io/IOHelper.java | 8 test/jdk/jdk/jfr/event/io/TestDisabledEvents.java | 33 test/jdk/jdk/jfr/event/io/TestFileChannelEvents.java | 138 - test/jdk/jdk/jfr/event/io/TestFileReadOnly.java | 79 - test/jdk/jdk/jfr/event/io/TestFileStreamEvents.java | 84 - test/jdk/jdk/jfr/event/io/TestInstrumentation.java | 4 test/jdk/jdk/jfr/event/io/TestRandomAccessFileEvents.java | 113 - test/jdk/jdk/jfr/event/io/TestRandomAccessFileThread.java | 42 test/jdk/jdk/jfr/event/io/TestSocketChannelEvents.java | 118 - test/jdk/jdk/jfr/event/io/TestSocketEvents.java | 102 - test/jdk/sun/security/lib/cacerts/VerifyCACerts.java | 4 test/jdk/sun/security/pkcs11/Cipher/TestChaChaPoly.java | 323 ++++ test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyKAT.java | 233 +++ test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyNoReuse.java | 267 +++ test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyOutputSize.java | 164 ++ test/jdk/sun/security/pkcs11/Cipher/TestKATForGCM.java | 12 test/jdk/sun/security/pkcs11/KeyGenerator/TestChaCha20.java | 91 + test/jdk/sun/security/pkcs11/PKCS11Test.java | 34 test/jdk/sun/security/pkcs11/SecretKeyFactory/TestGeneral.java | 119 + test/jdk/sun/security/pkcs11/tls/TestLeadingZeroesP11.java | 29 test/jdk/sun/security/pkcs12/KeytoolOpensslInteropTest.java | 2 test/jdk/sun/security/pkcs12/ParamsPreferences.java | 4 test/jdk/sun/security/ssl/SSLSessionImpl/NoInvalidateSocketException.java | 415 +++++ test/jdk/sun/security/ssl/SSLSocketImpl/ClientSocketCloseHang.java | 134 + test/jdk/sun/security/tools/keytool/CheckCertAKID.java | 4 test/jdk/sun/text/resources/LocaleData | 3 test/jdk/sun/text/resources/LocaleDataTest.java | 4 test/langtools/jdk/jshell/CommandCompletionTest.java | 25 test/langtools/tools/javac/annotations/typeAnnotations/VariablesDeclaredWithVarTest.java | 136 + test/langtools/tools/javac/file/SymLinkArchiveTest.java | 90 + test/langtools/tools/javac/file/SymLinkShortNameTest.java | 96 + test/langtools/tools/javac/generics/diamond/protectedConstructor/ProtectedConstructorTest.java | 50 test/langtools/tools/javac/generics/diamond/protectedConstructor/pkg/Bar.java | 29 test/langtools/tools/javac/lvti/T8236210.java | 28 test/langtools/tools/javac/lvti/T8236210.out | 2 test/lib/jdk/test/lib/KnownOIDs.java | 513 ------ test/lib/jdk/test/lib/SecurityTools.java | 61 test/lib/jdk/test/lib/security/DerUtils.java | 2 test/micro/org/openjdk/bench/java/lang/StringEncode.java | 124 + 924 files changed, 18761 insertions(+), 8402 deletions(-) diff -Nru openjdk-11-11.0.14+9/.jcheck/conf openjdk-11-11.0.15+10/.jcheck/conf --- openjdk-11-11.0.14+9/.jcheck/conf 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/.jcheck/conf 2022-04-19 19:38:30.000000000 +0000 @@ -1,7 +1,7 @@ [general] project=jdk-updates jbs=JDK -version=11.0.14 +version=11.0.15 [checks] error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace diff -Nru openjdk-11-11.0.14+9/debian/changelog openjdk-11-11.0.15+10/debian/changelog --- openjdk-11-11.0.14+9/debian/changelog 2022-01-21 16:20:34.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/changelog 2022-05-03 15:29:31.000000000 +0000 @@ -1,12 +1,77 @@ -openjdk-11 (11.0.14+9-1~deb10u1) buster-security; urgency=medium +openjdk-11 (11.0.15+10-1~deb10u1) buster-security; urgency=medium * Rebuild for buster - -- Moritz Muehlenhoff Fri, 21 Jan 2022 17:20:34 +0100 + -- Moritz Muehlenhoff Tue, 03 May 2022 17:29:31 +0200 + +openjdk-11 (11.0.15+10-1) unstable; urgency=high + + * OpenJDK 11.0.15+10 build (release). + * Security fixes + - JDK-8269938: Enhance XML processing passes redux. + - JDK-8270504, CVE-2022-21426: Better XPath expression handling. + - JDK-8272255: Completely handle MIDI files. + - JDK-8272261: Improve JFR recording file processing. + - JDK-8272594: Better record of recordings. + - JDK-8274221: More definite BER encodings. + - JDK-8275082, JDK-8278008, CVE-2022-21476: Update XML Security for Java + to 2.3.0. + - JDK-8275151, CVE-2022-21443: Improved Object Identification. + - JDK-8277227: Better identification of OIDs. + - JDK-8277672, CVE-2022-21434: Better invocation handler handling. + - JDK-8278356: Improve file creation. + - JDK-8278449: Improve keychain support. + - JDK-8278798: Improve supported intrinsic. + - JDK-8278805: Enhance BMP image loading. + - JDK-8278972, CVE-2022-21496: Improve URL supports. + - JDK-8281388: Change wrapping of EncryptedPrivateKeyInfo. + * Refresh patches. + + -- Matthias Klose Mon, 02 May 2022 19:42:14 +0200 + +openjdk-11 (11.0.14.1+1-1) unstable; urgency=medium + + * OpenJDK 11.0.14.1+1 build (release). + - Fix JDK-8218546. LP: #1966338. + + -- Matthias Klose Sun, 27 Mar 2022 11:16:07 +0200 openjdk-11 (11.0.14+9-1) unstable; urgency=high * OpenJDK 11.0.14+9 build (release). + * Security fixes + - JDK-8217375: jarsigner breaks old signature with long lines in manifest. + - JDK-8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir + named "." inside. + - JDK-8264934, CVE-2022-21248: Enhance cross VM serialization. + - JDK-8268488: More valuable DerValues. + - JDK-8268494: Better inlining of inlined interfaces. + - JDK-8268512: More content for ContentInfo. + - JDK-8268795: Enhance digests of Jar files. + - JDK-8268801: Improve PKCS attribute handling. + - JDK-8268813, CVE-2022-21283: Better String matching. + - JDK-8269151: Better construction of EncryptedPrivateKeyInfo. + - JDK-8269944: Better HTTP transport redux. + - JDK-8270386, CVE-2022-21291: Better verification of scan methods. + - JDK-8270392, CVE-2022-21293: Improve String constructions. + - JDK-8270416, CVE-2022-21294: Enhance construction of Identity maps. + - JDK-8270492, CVE-2022-21282: Better resolution of URIs. + - JDK-8270498, CVE-2022-21296: Improve SAX Parser configuration management. + - JDK-8270646, CVE-2022-21299: Improved scanning of XML entities. + - JDK-8270952, CVE-2022-21277: Improve TIFF file handling. + - JDK-8271962: Better TrueType font loading. + - JDK-8271968: Better canonical naming. + - JDK-8271987: Manifest improved manifest entries. + - JDK-8272014, CVE-2022-21305: Better array indexing. + - JDK-8272026, CVE-2022-21340: Verify Jar Verification. + - JDK-8272236, CVE-2022-21341: Improve serial forms for transport. + - JDK-8272272: Enhance jcmd communication. + - JDK-8272462: Enhance image handling. + - JDK-8273290: Enhance sound handling. + - JDK-8273756, CVE-2022-21360: Enhance BMP image support. + - JDK-8273838, CVE-2022-21365: Enhanced BMP processing. + - JDK-8274096, CVE-2022-21366: Improve decoding of image files. + - JDK-8279541: Improve HarfBuzz. -- Matthias Klose Wed, 19 Jan 2022 11:05:38 +0100 diff -Nru openjdk-11-11.0.14+9/debian/patches/8222825.diff openjdk-11-11.0.15+10/debian/patches/8222825.diff --- openjdk-11-11.0.14+9/debian/patches/8222825.diff 2021-07-21 05:09:12.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/8222825.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,150 +0,0 @@ ---- a/src/hotspot/cpu/arm/arm.ad -+++ b/src/hotspot/cpu/arm/arm.ad -@@ -5317,7 +5317,7 @@ instruct loadConD(regD dst, immD src, iR - // Must be safe to execute with invalid address (cannot fault). - - instruct prefetchAlloc_mp( memoryP mem ) %{ -- predicate(os::is_MP()); -+ predicate(VM_Version::has_multiprocessing_extensions()); - match( PrefetchAllocation mem ); - ins_cost(MEMORY_REF_COST); - size(4); ---- a/src/hotspot/cpu/arm/assembler_arm_32.hpp -+++ b/src/hotspot/cpu/arm/assembler_arm_32.hpp -@@ -434,7 +434,9 @@ class Assembler : public AbstractAssembl - } - - void pldw(Address addr) { -- assert(VM_Version::arm_arch() >= 7 && os::is_MP(), "no pldw on this processor"); -+ assert(!VM_Version::is_initialized() || -+ (VM_Version::arm_arch() >= 7 && VM_Version::has_multiprocessing_extensions()), -+ "PLDW is available on ARMv7 with Multiprocessing Extensions only"); - emit_int32(0xf510f000 | addr.encoding2()); - } - ---- a/src/hotspot/cpu/arm/vm_version_arm.hpp -+++ b/src/hotspot/cpu/arm/vm_version_arm.hpp -@@ -32,6 +32,7 @@ class VM_Version: public Abstract_VM_Ver - friend class JVMCIVMStructs; - - static bool _has_simd; -+ static bool _has_mp_ext; - - protected: - // Are we done with vm version initialization -@@ -64,6 +65,7 @@ class VM_Version: public Abstract_VM_Ver - vfp = 0, - vfp3_32 = 1, - simd = 2, -+ mp_ext = 3 - }; - - enum Feature_Flag_Set { -@@ -73,6 +75,7 @@ class VM_Version: public Abstract_VM_Ver - vfp_m = 1 << vfp, - vfp3_32_m = 1 << vfp3_32, - simd_m = 1 << simd, -+ mp_ext_m = 1 << mp_ext - }; - - // The value stored by "STR PC, [addr]" instruction can be either -@@ -115,6 +118,7 @@ class VM_Version: public Abstract_VM_Ver - static bool has_vfp() { return (_features & vfp_m) != 0; } - static bool has_vfp3_32() { return (_features & vfp3_32_m) != 0; } - static bool has_simd() { return (_features & simd_m) != 0; } -+ static bool has_multiprocessing_extensions() { return (_features & mp_ext_m) != 0; } - - static bool simd_math_is_compliant() { return false; } - ---- a/src/hotspot/cpu/arm/vm_version_arm_32.cpp -+++ b/src/hotspot/cpu/arm/vm_version_arm_32.cpp -@@ -40,6 +40,7 @@ extern "C" { - typedef int (*get_cpu_info_t)(); - typedef bool (*check_vfp_t)(double *d); - typedef bool (*check_simd_t)(); -+ typedef bool (*check_mp_ext_t)(int *addr); - } - - #define __ _masm-> -@@ -95,6 +96,20 @@ class VM_Version_StubGenerator: public S - - return start; - }; -+ -+ address generate_check_mp_ext() { -+ StubCodeMark mark(this, "VM_Version", "check_mp_ext"); -+ address start = __ pc(); -+ -+ // PLDW is available with Multiprocessing Extensions only -+ __ pldw(Address(R0)); -+ // Return true if instruction caused no signals -+ __ mov(R0, 1); -+ // JVM_handle_linux_signal moves PC here if SIGILL happens -+ __ bx(LR); -+ -+ return start; -+ }; - }; - - #undef __ -@@ -103,6 +118,7 @@ class VM_Version_StubGenerator: public S - extern "C" address check_vfp3_32_fault_instr; - extern "C" address check_vfp_fault_instr; - extern "C" address check_simd_fault_instr; -+extern "C" address check_mp_ext_fault_instr; - - void VM_Version::early_initialize() { - -@@ -165,6 +181,13 @@ void VM_Version::initialize() { - #endif - #endif - -+ address check_mp_ext_pc = g.generate_check_mp_ext(); -+ check_mp_ext_t check_mp_ext = CAST_TO_FN_PTR(check_mp_ext_t, check_mp_ext_pc); -+ check_mp_ext_fault_instr = (address)check_mp_ext; -+ int dummy_local_variable; -+ if (check_mp_ext(&dummy_local_variable)) { -+ _features |= mp_ext_m; -+ } - - if (UseAESIntrinsics && !FLAG_IS_DEFAULT(UseAESIntrinsics)) { - warning("AES intrinsics are not available on this CPU"); -@@ -247,11 +270,12 @@ void VM_Version::initialize() { - && _supports_atomic_getset8 && _supports_atomic_getadd8, "C2: atomic operations must be supported"); - #endif - char buf[512]; -- jio_snprintf(buf, sizeof(buf), "(ARMv%d)%s%s%s", -+ jio_snprintf(buf, sizeof(buf), "(ARMv%d)%s%s%s%s", - _arm_arch, - (has_vfp() ? ", vfp" : ""), - (has_vfp3_32() ? ", vfp3-32" : ""), -- (has_simd() ? ", simd" : "")); -+ (has_simd() ? ", simd" : ""), -+ (has_multiprocessing_extensions() ? ", mp_ext" : "")); - - // buf is started with ", " or is empty - _features_string = os::strdup(buf); ---- a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp -+++ b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp -@@ -259,9 +259,11 @@ frame os::current_frame() { - #ifndef AARCH64 - extern "C" address check_vfp_fault_instr; - extern "C" address check_vfp3_32_fault_instr; -+extern "C" address check_mp_ext_fault_instr; - - address check_vfp_fault_instr = NULL; - address check_vfp3_32_fault_instr = NULL; -+address check_mp_ext_fault_instr = NULL; - #endif // !AARCH64 - extern "C" address check_simd_fault_instr; - address check_simd_fault_instr = NULL; -@@ -283,7 +285,8 @@ extern "C" int JVM_handle_linux_signal(i - if (sig == SIGILL && - ((info->si_addr == (caddr_t)check_simd_fault_instr) - NOT_AARCH64(|| info->si_addr == (caddr_t)check_vfp_fault_instr) -- NOT_AARCH64(|| info->si_addr == (caddr_t)check_vfp3_32_fault_instr))) { -+ NOT_AARCH64(|| info->si_addr == (caddr_t)check_vfp3_32_fault_instr) -+ NOT_AARCH64(|| info->si_addr == (caddr_t)check_mp_ext_fault_instr))) { - // skip faulty instruction + instruction that sets return value to - // success and set return value to failure. - os::Linux::ucontext_set_pc(uc, (address)info->si_addr + 8); diff -Nru openjdk-11-11.0.14+9/debian/patches/generated-headers.patch openjdk-11-11.0.15+10/debian/patches/generated-headers.patch --- openjdk-11-11.0.14+9/debian/patches/generated-headers.patch 2022-01-19 09:00:30.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/generated-headers.patch 2022-05-02 17:42:14.000000000 +0000 @@ -16,5 +16,5 @@ - CFLAGS := $(CFLAGS_JDKLIB), \ + CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \ HEADERS_FROM_SRC := $(LIBJPEG_HEADERS_FROM_SRC), \ - DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value, \ + DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value array-bounds, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ diff -Nru openjdk-11-11.0.14+9/debian/patches/hotspot-disable-exec-shield-workaround.diff openjdk-11-11.0.15+10/debian/patches/hotspot-disable-exec-shield-workaround.diff --- openjdk-11-11.0.14+9/debian/patches/hotspot-disable-exec-shield-workaround.diff 2021-07-21 05:09:12.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/hotspot-disable-exec-shield-workaround.diff 2022-05-02 17:42:14.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp +++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp -@@ -863,7 +863,7 @@ void os::verify_stack_alignment() { +@@ -858,7 +858,7 @@ void os::verify_stack_alignment() { * updates (JDK-8023956). */ void os::workaround_expand_exec_shield_cs_limit() { diff -Nru openjdk-11-11.0.14+9/debian/patches/hotspot-libpath.diff openjdk-11-11.0.15+10/debian/patches/hotspot-libpath.diff --- openjdk-11-11.0.14+9/debian/patches/hotspot-libpath.diff 2021-10-20 09:07:11.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/hotspot-libpath.diff 2022-05-02 17:42:14.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp -@@ -411,18 +411,22 @@ void os::init_system_properties_values() +@@ -416,18 +416,22 @@ void os::init_system_properties_values() // 1: ... // ... // 7: The default directories, normally /lib and /usr/lib. diff -Nru openjdk-11-11.0.14+9/debian/patches/jaw-classpath.diff openjdk-11-11.0.15+10/debian/patches/jaw-classpath.diff --- openjdk-11-11.0.14+9/debian/patches/jaw-classpath.diff 2022-01-19 09:00:37.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/jaw-classpath.diff 2022-05-02 17:42:14.000000000 +0000 @@ -2,7 +2,7 @@ --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp -@@ -465,6 +465,7 @@ void os::init_system_properties_values() +@@ -470,6 +470,7 @@ void os::init_system_properties_values() } Arguments::set_java_home(buf); set_boot_path('/', ':'); diff -Nru openjdk-11-11.0.14+9/debian/patches/machine-flag.diff openjdk-11-11.0.15+10/debian/patches/machine-flag.diff --- openjdk-11-11.0.14+9/debian/patches/machine-flag.diff 2021-07-21 05:09:12.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/machine-flag.diff 2022-05-02 17:42:14.000000000 +0000 @@ -1,14 +1,14 @@ --- a/make/autoconf/flags.m4 +++ b/make/autoconf/flags.m4 -@@ -256,6 +256,7 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN], +@@ -262,6 +262,7 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN], test "x$OPENJDK_TARGET_CPU_ARCH" = xppc; then MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}" fi + case "$host" in *x32) MACHINE_FLAG=;; esac fi - # FIXME: global flags are not used yet... -@@ -330,11 +331,8 @@ AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL] + if test "x$OPENJDK_TARGET_OS" = xmacosx; then +@@ -344,11 +345,8 @@ AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL] AC_SUBST(COMPILER_COMMAND_FILE_FLAG) AC_SUBST(COMPILER_BINDCMD_FILE_FLAG) diff -Nru openjdk-11-11.0.14+9/debian/patches/multiple-pkcs11-library-init.diff openjdk-11-11.0.15+10/debian/patches/multiple-pkcs11-library-init.diff --- openjdk-11-11.0.14+9/debian/patches/multiple-pkcs11-library-init.diff 2022-01-19 09:00:09.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/multiple-pkcs11-library-init.diff 2022-05-02 17:42:14.000000000 +0000 @@ -26,7 +26,7 @@ } --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java -@@ -174,26 +174,37 @@ public final class SunPKCS11 extends Aut +@@ -176,26 +176,37 @@ public final class SunPKCS11 extends Aut String nssLibraryDirectory = config.getNssLibraryDirectory(); String nssSecmodDirectory = config.getNssSecmodDirectory(); boolean nssOptimizeSpace = config.getNssOptimizeSpace(); diff -Nru openjdk-11-11.0.14+9/debian/patches/riscv64.diff openjdk-11-11.0.15+10/debian/patches/riscv64.diff --- openjdk-11-11.0.14+9/debian/patches/riscv64.diff 2022-01-19 08:59:38.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/riscv64.diff 2022-05-02 17:42:14.000000000 +0000 @@ -9,7 +9,7 @@ --- a/make/autoconf/build-aux/config.guess +++ b/make/autoconf/build-aux/config.guess -@@ -27,6 +27,13 @@ +@@ -28,6 +28,13 @@ # autoconf system (which might easily get lost in a future update), we wrap it # and fix the broken property, if needed. diff -Nru openjdk-11-11.0.14+9/debian/patches/series openjdk-11-11.0.15+10/debian/patches/series --- openjdk-11-11.0.14+9/debian/patches/series 2021-10-20 09:10:19.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/series 2022-05-02 17:42:14.000000000 +0000 @@ -43,5 +43,4 @@ reproducible-copyright-headers.diff reproducible-build-user.diff reproducible-build-jmod.diff -8222825.diff 8262085.diff diff -Nru openjdk-11-11.0.14+9/debian/patches/system-pcsclite.diff openjdk-11-11.0.15+10/debian/patches/system-pcsclite.diff --- openjdk-11-11.0.14+9/debian/patches/system-pcsclite.diff 2022-01-19 08:59:59.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/system-pcsclite.diff 2022-05-02 17:42:14.000000000 +0000 @@ -52,7 +52,7 @@ +]) --- a/make/autoconf/spec.gmk.in +++ b/make/autoconf/spec.gmk.in -@@ -758,6 +758,7 @@ ENABLE_AOT:=@ENABLE_AOT@ +@@ -761,6 +761,7 @@ ENABLE_AOT:=@ENABLE_AOT@ ENABLE_INTREE_EC:=@ENABLE_INTREE_EC@ USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@ USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@ diff -Nru openjdk-11-11.0.14+9/debian/patches/workaround_expand_exec_shield_cs_limit.diff openjdk-11-11.0.15+10/debian/patches/workaround_expand_exec_shield_cs_limit.diff --- openjdk-11-11.0.14+9/debian/patches/workaround_expand_exec_shield_cs_limit.diff 2021-07-21 05:09:12.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/workaround_expand_exec_shield_cs_limit.diff 2022-05-02 17:42:14.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp +++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp -@@ -863,7 +863,7 @@ void os::verify_stack_alignment() { +@@ -858,7 +858,7 @@ void os::verify_stack_alignment() { * updates (JDK-8023956). */ void os::workaround_expand_exec_shield_cs_limit() { diff -Nru openjdk-11-11.0.14+9/debian/patches/zero-x32.diff openjdk-11-11.0.15+10/debian/patches/zero-x32.diff --- openjdk-11-11.0.14+9/debian/patches/zero-x32.diff 2022-01-19 09:00:23.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/patches/zero-x32.diff 2022-05-02 17:42:14.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp -@@ -1872,7 +1872,7 @@ void * os::dll_load(const char *filename +@@ -1877,7 +1877,7 @@ void * os::dll_load(const char *filename #if (defined IA32) static Elf32_Half running_arch_code=EM_386; diff -Nru openjdk-11-11.0.14+9/debian/rules openjdk-11-11.0.15+10/debian/rules --- openjdk-11-11.0.14+9/debian/rules 2022-01-19 09:38:13.000000000 +0000 +++ openjdk-11-11.0.15+10/debian/rules 2022-05-02 17:42:14.000000000 +0000 @@ -1845,10 +1845,8 @@ dh_builddeb -a $(nodemo) $(nojrez) #$(bd_options) is_release = yes -hg_project = jdk11u -hg_tag = jdk-11.0.12+7 git_project = jdk11u -git_tag = jdk-11.0.14+9 +git_tag = jdk-11.0.15+10 package_version = $(subst jdk-,,$(git_tag)) package_version = $(shell echo $(PKGVERSION) | sed 's/-[^-][^-]*$$//') ifneq ($(is_release),yes) diff -Nru openjdk-11-11.0.14+9/make/RunTestsPrebuilt.gmk openjdk-11-11.0.15+10/make/RunTestsPrebuilt.gmk --- openjdk-11-11.0.14+9/make/RunTestsPrebuilt.gmk 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/RunTestsPrebuilt.gmk 2022-04-19 19:38:30.000000000 +0000 @@ -230,7 +230,7 @@ NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu) MEMORY_SIZE := $(shell $(EXPR) `/usr/sbin/sysctl -n hw.memsize` / 1024 / 1024) else ifeq ($(OPENJDK_TARGET_OS), solaris) - NUM_CORES := $(shell LC_MESSAGES=C /usr/sbin/psrinfo -v | $(GREP) -c on-line) + NUM_CORES := $(shell /usr/sbin/psrinfo -v | $(GREP) -c on-line) MEMORY_SIZE := $(shell \ /usr/sbin/prtconf 2> /dev/null | $(GREP) "^Memory [Ss]ize" | $(AWK) '{print $$3}' \ ) diff -Nru openjdk-11-11.0.14+9/make/RunTestsPrebuiltSpec.gmk openjdk-11-11.0.15+10/make/RunTestsPrebuiltSpec.gmk --- openjdk-11-11.0.14+9/make/RunTestsPrebuiltSpec.gmk 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/RunTestsPrebuiltSpec.gmk 2022-04-19 19:38:30.000000000 +0000 @@ -27,6 +27,9 @@ # Fake minimalistic spec file for RunTestsPrebuilt.gmk. ################################################################################ +# Make sure all shell commands are executed with the C locale +export LC_ALL := C + define VerifyVariable ifeq ($$($1), ) $$(info Error: Variable $1 is missing, needed by RunTestPrebuiltSpec.gmk) diff -Nru openjdk-11-11.0.14+9/make/autoconf/basics.m4 openjdk-11-11.0.15+10/make/autoconf/basics.m4 --- openjdk-11-11.0.14+9/make/autoconf/basics.m4 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/autoconf/basics.m4 2022-04-19 19:38:30.000000000 +0000 @@ -405,7 +405,7 @@ # Save the path variable before it gets changed ORIGINAL_PATH="$PATH" AC_SUBST(ORIGINAL_PATH) - DATE_WHEN_CONFIGURED=`LANG=C date` + DATE_WHEN_CONFIGURED=`date` AC_SUBST(DATE_WHEN_CONFIGURED) AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.]) ]) diff -Nru openjdk-11-11.0.14+9/make/autoconf/build-aux/config.guess openjdk-11-11.0.15+10/make/autoconf/build-aux/config.guess --- openjdk-11-11.0.14+9/make/autoconf/build-aux/config.guess 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/autoconf/build-aux/config.guess 2022-04-19 19:38:30.000000000 +0000 @@ -1,6 +1,7 @@ #!/bin/sh # -# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2021, Azul Systems, Inc. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -106,6 +107,14 @@ fi fi +# Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64 +echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null +if test $? = 0; then + if [ `uname -m` = arm64 ]; then + OUT=aarch64`echo $OUT | sed -e 's/[^-]*//'` + fi +fi + # Test and fix cpu on Macosx when C preprocessor is not on the path echo $OUT | grep i386-apple-darwin > /dev/null 2> /dev/null if test $? = 0; then diff -Nru openjdk-11-11.0.14+9/make/autoconf/build-performance.m4 openjdk-11-11.0.15+10/make/autoconf/build-performance.m4 --- openjdk-11-11.0.14+9/make/autoconf/build-performance.m4 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/autoconf/build-performance.m4 2022-04-19 19:38:30.000000000 +0000 @@ -35,7 +35,7 @@ FOUND_CORES=yes elif test -x /usr/sbin/psrinfo; then # Looks like a Solaris system - NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line` + NUM_CORES=`/usr/sbin/psrinfo -v | grep -c on-line` FOUND_CORES=yes elif test -x /usr/sbin/sysctl; then # Looks like a MacOSX system diff -Nru openjdk-11-11.0.14+9/make/autoconf/configure openjdk-11-11.0.15+10/make/autoconf/configure --- openjdk-11-11.0.14+9/make/autoconf/configure 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/autoconf/configure 2022-04-19 19:38:30.000000000 +0000 @@ -43,6 +43,9 @@ export CONFIG_SHELL=$BASH export _as_can_reexec=no +# Make sure all shell commands are executed with the C locale +export LC_ALL=C + if test "x$CUSTOM_CONFIG_DIR" != x; then custom_hook=$CUSTOM_CONFIG_DIR/custom-hook.m4 if test ! -e $custom_hook; then diff -Nru openjdk-11-11.0.14+9/make/autoconf/flags.m4 openjdk-11-11.0.15+10/make/autoconf/flags.m4 --- openjdk-11-11.0.14+9/make/autoconf/flags.m4 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/autoconf/flags.m4 2022-04-19 19:38:30.000000000 +0000 @@ -111,19 +111,25 @@ [ # Additional macosx handling if test "x$OPENJDK_TARGET_OS" = xmacosx; then + # The expected format for is either nn.n.n or nn.nn.nn. See + # /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/AvailabilityVersions.h + # MACOSX_VERSION_MIN specifies the lowest version of Macosx that the built # binaries should be compatible with, even if compiled on a newer version # of the OS. It currently has a hard coded value. Setting this also limits # exposure to API changes in header files. Bumping this is likely to # require code changes to build. - MACOSX_VERSION_MIN=10.9.0 + if test "x$OPENJDK_TARGET_CPU_ARCH" = xaarch64; then + MACOSX_VERSION_MIN=11.00.00 + else + MACOSX_VERSION_MIN=10.9.0 + fi MACOSX_VERSION_MIN_NODOTS=${MACOSX_VERSION_MIN//\./} AC_SUBST(MACOSX_VERSION_MIN) # Setting --with-macosx-version-max= makes it an error to build or - # link to macosx APIs that are newer than the given OS version. The expected - # format for is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h. + # link to macosx APIs that are newer than the given OS version. AC_ARG_WITH([macosx-version-max], [AS_HELP_STRING([--with-macosx-version-max], [error on use of newer functionality. @<:@macosx@:>@])], [ @@ -258,6 +264,14 @@ fi fi + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + if test "x$OPENJDK_TARGET_CPU" = xaarch64; then + MACHINE_FLAG="$MACHINE_FLAG -arch arm64" + elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then + MACHINE_FLAG="$MACHINE_FLAG -arch x86_64" + fi + fi + # FIXME: global flags are not used yet... # The "global" flags will *always* be set. Without them, it is not possible to # get a working compilation. diff -Nru openjdk-11-11.0.14+9/make/autoconf/hotspot.m4 openjdk-11-11.0.15+10/make/autoconf/hotspot.m4 --- openjdk-11-11.0.14+9/make/autoconf/hotspot.m4 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/autoconf/hotspot.m4 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -274,6 +274,14 @@ fi fi + # Disable CDS on macos-aarch64 + if test "x$OPENJDK_TARGET_OS" = "xmacosx" && test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then + ENABLE_CDS="false" + if test "x$enable_cds" = "xyes"; then + AC_MSG_ERROR([CDS is currently not supported on macOS/aarch64. Remove --enable-cds.]) + fi + fi + AC_SUBST(ENABLE_CDS) ]) @@ -413,7 +421,7 @@ # Only enable jvmci on x86_64, sparcv9 and aarch64 if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \ test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \ - test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-aarch64" ; then + test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then AC_MSG_RESULT([yes]) JVM_FEATURES_jvmci="jvmci" INCLUDE_JVMCI="true" @@ -444,10 +452,11 @@ JVM_FEATURES_graal="graal" INCLUDE_GRAAL="true" else - # By default enable graal build on x64 or where AOT is available. + # By default enable graal build on x64/aarch64 or where AOT is available. # graal build requires jvmci. if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \ (test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \ + test "x$OPENJDK_TARGET_CPU" = "xaarch64" || \ test "x$ENABLE_AOT" = "xtrue") ; then AC_MSG_RESULT([yes]) JVM_FEATURES_graal="graal" diff -Nru openjdk-11-11.0.14+9/make/autoconf/spec.gmk.in openjdk-11-11.0.15+10/make/autoconf/spec.gmk.in --- openjdk-11-11.0.14+9/make/autoconf/spec.gmk.in 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/autoconf/spec.gmk.in 2022-04-19 19:38:30.000000000 +0000 @@ -46,6 +46,9 @@ # What make to use for main processing, after bootstrapping top-level Makefile. MAKE := @MAKE@ +# Make sure all shell commands are executed with the C locale +export LC_ALL := C + # The default make arguments MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \ MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" $(MAKE_LOG_VARS) diff -Nru openjdk-11-11.0.14+9/make/autoconf/toolchain.m4 openjdk-11-11.0.15+10/make/autoconf/toolchain.m4 --- openjdk-11-11.0.14+9/make/autoconf/toolchain.m4 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/autoconf/toolchain.m4 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -229,7 +229,7 @@ if test "x$OPENJDK_TARGET_OS" = xmacosx; then if test -n "$XCODEBUILD"; then # On Mac OS X, default toolchain to clang after Xcode 5 - XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1` + XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version | $HEAD -n 1` $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null if test $? -ne 0; then AC_MSG_ERROR([Failed to determine Xcode version.]) diff -Nru openjdk-11-11.0.14+9/make/autoconf/version-numbers openjdk-11-11.0.15+10/make/autoconf/version-numbers --- openjdk-11-11.0.14+9/make/autoconf/version-numbers 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/autoconf/version-numbers 2022-04-19 19:38:30.000000000 +0000 @@ -28,12 +28,12 @@ DEFAULT_VERSION_FEATURE=11 DEFAULT_VERSION_INTERIM=0 -DEFAULT_VERSION_UPDATE=14 +DEFAULT_VERSION_UPDATE=15 DEFAULT_VERSION_PATCH=0 DEFAULT_VERSION_EXTRA1=0 DEFAULT_VERSION_EXTRA2=0 DEFAULT_VERSION_EXTRA3=0 -DEFAULT_VERSION_DATE=2022-01-18 +DEFAULT_VERSION_DATE=2022-04-19 DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11" diff -Nru openjdk-11-11.0.14+9/make/common/JavaCompilation.gmk openjdk-11-11.0.15+10/make/common/JavaCompilation.gmk --- openjdk-11-11.0.14+9/make/common/JavaCompilation.gmk 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/common/JavaCompilation.gmk 2022-04-19 19:38:30.000000000 +0000 @@ -121,7 +121,7 @@ $1_CLEAN_$$($2_TARGET) := 1 $$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2 $(MKDIR) -p $$(@D) - export LC_ALL=C ; ( $(CAT) $$< && $(ECHO) "" ) \ + ( $(CAT) $$< && $(ECHO) "" ) \ | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \ -e 's/\([^\\]\)!/\1\\!/g' -e 's/^[ ]*#.*/#/g' \ | $(SED) -f "$(TOPDIR)/make/common/support/unicode2x.sed" \ diff -Nru openjdk-11-11.0.14+9/make/common/NativeCompilation.gmk openjdk-11-11.0.15+10/make/common/NativeCompilation.gmk --- openjdk-11-11.0.14+9/make/common/NativeCompilation.gmk 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/common/NativeCompilation.gmk 2022-04-19 19:38:30.000000000 +0000 @@ -1213,7 +1213,7 @@ # This only works if the openjdk_codesign identity is present on the system. Let # silently fail otherwise. ifneq ($(CODESIGN), ) - $(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \ + $(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \ --entitlements $$(call GetEntitlementsFile, $$@) $$@ endif endif diff -Nru openjdk-11-11.0.14+9/make/data/currency/CurrencyData.properties openjdk-11-11.0.15+10/make/data/currency/CurrencyData.properties --- openjdk-11-11.0.14+9/make/data/currency/CurrencyData.properties 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/data/currency/CurrencyData.properties 2022-04-19 19:38:30.000000000 +0000 @@ -32,7 +32,7 @@ # Version of the currency code information in this class. # It is a serial number that accompanies with each amendment. -dataVersion=169 +dataVersion=170 # List of all valid ISO 4217 currency codes. # To ensure compatibility, do not remove codes. @@ -54,7 +54,7 @@ SBD090-SCR690-SDD736-SDG938-SEK752-SGD702-SHP654-SIT705-SKK703-SLL694-SOS706-\ SRD968-SRG740-SSP728-STD678-STN930-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TMT934-TND788-TOP776-\ TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-UYI940-\ - UYU858-UZS860-VEB862-VEF937-VES928-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\ + UYU858-UZS860-VEB862-VED926-VEF937-VES928-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\ XBB956-XBC957-XBD958-XCD951-XDR960-XFO000-XFU000-XOF952-XPD964-XPF953-\ XPT962-XSU994-XTS963-XUA965-XXX999-YER886-YUM891-ZAR710-ZMK894-ZMW967-ZWD716-ZWL932-\ ZWN942-ZWR935 diff -Nru openjdk-11-11.0.14+9/make/hotspot/gensrc/GensrcAdlc.gmk openjdk-11-11.0.15+10/make/hotspot/gensrc/GensrcAdlc.gmk --- openjdk-11-11.0.14+9/make/hotspot/gensrc/GensrcAdlc.gmk 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/hotspot/gensrc/GensrcAdlc.gmk 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -99,6 +99,9 @@ ADLCFLAGS += -DAIX=1 else ifeq ($(OPENJDK_TARGET_OS), macosx) ADLCFLAGS += -D_ALLBSD_SOURCE=1 -D_GNU_SOURCE=1 + ifeq ($(HOTSPOT_TARGET_CPU_ARCH), aarch64) + ADLCFLAGS += -DR18_RESERVED + endif else ifeq ($(OPENJDK_TARGET_OS), windows) ifeq ($(call isTargetCpuBits, 64), true) ADLCFLAGS += -D_WIN64=1 diff -Nru openjdk-11-11.0.14+9/make/hotspot/lib/CompileGtest.gmk openjdk-11-11.0.15+10/make/hotspot/lib/CompileGtest.gmk --- openjdk-11-11.0.14+9/make/hotspot/lib/CompileGtest.gmk 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/hotspot/lib/CompileGtest.gmk 2022-04-19 19:38:30.000000000 +0000 @@ -55,6 +55,9 @@ # Disabling undef, switch, format-nonliteral and tautological-undefined-compare # warnings for clang because of test source. +# Disable MSVC warning C4146 "unary minus operator applied to unsigned type, +# result still unsigned". This operation is well-defined. + # Solaris: Disable inlining (+d) to workaround Assertion: (../lnk/vardescr.h, line 109) $(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \ NAME := jvm, \ @@ -78,6 +81,7 @@ DISABLED_WARNINGS_clang := undef switch format-nonliteral \ tautological-undefined-compare $(BUILD_LIBJVM_DISABLED_WARNINGS_clang), \ DISABLED_WARNINGS_solstudio := identexpected, \ + DISABLED_WARNINGS_microsoft := 4146, \ LDFLAGS := $(JVM_LDFLAGS), \ LDFLAGS_solaris := -library=stlport4 $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(JVM_LIBS), \ diff -Nru openjdk-11-11.0.14+9/make/hotspot/lib/CompileJvm.gmk openjdk-11-11.0.15+10/make/hotspot/lib/CompileJvm.gmk --- openjdk-11-11.0.14+9/make/hotspot/lib/CompileJvm.gmk 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/hotspot/lib/CompileJvm.gmk 2022-04-19 19:38:30.000000000 +0000 @@ -148,6 +148,8 @@ ################################################################################ # Now set up the actual compilation of the main hotspot native library +# Disable MSVC warning C4146 "unary minus operator applied to unsigned type, +# result still unsigned". This operation is well-defined. $(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \ NAME := jvm, \ TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ @@ -164,6 +166,7 @@ DISABLED_WARNINGS_solstudio := $(DISABLED_WARNINGS_solstudio), \ DISABLED_WARNINGS_xlc := 1540-0216 1540-0198 1540-1090 1540-1639 \ 1540-1088 1500-010, \ + DISABLED_WARNINGS_microsoft := 4146, \ ASFLAGS := $(JVM_ASFLAGS), \ LDFLAGS := $(JVM_LDFLAGS), \ LIBS := $(JVM_LIBS), \ diff -Nru openjdk-11-11.0.14+9/make/lib/Awt2dLibraries.gmk openjdk-11-11.0.15+10/make/lib/Awt2dLibraries.gmk --- openjdk-11-11.0.14+9/make/lib/Awt2dLibraries.gmk 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/lib/Awt2dLibraries.gmk 2022-04-19 19:38:30.000000000 +0000 @@ -433,7 +433,7 @@ OPTIMIZATION := HIGHEST, \ CFLAGS := $(CFLAGS_JDKLIB), \ HEADERS_FROM_SRC := $(LIBJPEG_HEADERS_FROM_SRC), \ - DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value, \ + DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value array-bounds, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \ @@ -562,7 +562,7 @@ maybe-uninitialized class-memaccess HARFBUZZ_DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \ tautological-constant-out-of-range-compare int-to-pointer-cast \ - undef missing-field-initializers + undef missing-field-initializers deprecated-declarations c++11-narrowing HARFBUZZ_DISABLED_WARNINGS_microsoft := 4267 4244 4090 4146 4334 4819 4101 4068 4805 4138 HARFBUZZ_DISABLED_WARNINGS_C_solstudio := \ E_INTEGER_OVERFLOW_DETECTED \ diff -Nru openjdk-11-11.0.14+9/make/lib/Lib-jdk.hotspot.agent.gmk openjdk-11-11.0.15+10/make/lib/Lib-jdk.hotspot.agent.gmk --- openjdk-11-11.0.14+9/make/lib/Lib-jdk.hotspot.agent.gmk 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/lib/Lib-jdk.hotspot.agent.gmk 2022-04-19 19:38:30.000000000 +0000 @@ -36,7 +36,7 @@ SA_LDFLAGS := -mt else ifeq ($(OPENJDK_TARGET_OS), macosx) - SA_CFLAGS := -Damd64 -D_GNU_SOURCE -mno-omit-leaf-frame-pointer \ + SA_CFLAGS := -D_GNU_SOURCE -mno-omit-leaf-frame-pointer \ -mstack-alignment=16 -fPIC LIBSA_EXTRA_SRC := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent else ifeq ($(OPENJDK_TARGET_OS), windows) diff -Nru openjdk-11-11.0.14+9/make/scripts/compare.sh openjdk-11-11.0.15+10/make/scripts/compare.sh --- openjdk-11-11.0.14+9/make/scripts/compare.sh 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/scripts/compare.sh 2022-04-19 19:38:30.000000000 +0000 @@ -34,6 +34,9 @@ exit 1 fi +# Make sure all shell commands are executed with the C locale +export LC_ALL=C + if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then FULLDUMP_CMD="$OTOOL -v -V -h -X -d" LDD_CMD="$OTOOL -L" @@ -81,7 +84,7 @@ if [[ "$THIS_FILE" = *"META-INF/MANIFEST.MF" ]]; then # Filter out date string, ant version and java version differences. - TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \ + TMP=$($DIFF $OTHER_FILE $THIS_FILE | \ $GREP '^[<>]' | \ $SED -e '/[<>] Ant-Version: Apache Ant .*/d' \ -e '/[<>] Created-By: .* (Oracle [Corpatin)]*/d' \ @@ -89,7 +92,7 @@ -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d') fi if test "x$SUFFIX" = "xjava"; then - TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \ + TMP=$($DIFF $OTHER_FILE $THIS_FILE | \ $GREP '^[<>]' | \ $SED -e '/[<>] \* from.*\.idl/d' \ -e '/[<>] .*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \ @@ -144,7 +147,7 @@ fi if test "x$SUFFIX" = "xproperties"; then # Filter out date string differences. - TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \ + TMP=$($DIFF $OTHER_FILE $THIS_FILE | \ $GREP '^[<>]' | \ $SED -e '/[<>].*[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}-[0-9]\{6\}.*/d') fi @@ -154,7 +157,7 @@ -e 's///g'" $CAT $THIS_FILE | eval "$HTML_FILTER" > $THIS_FILE.filtered $CAT $OTHER_FILE | eval "$HTML_FILTER" > $OTHER_FILE.filtered - TMP=$(LC_ALL=C $DIFF $OTHER_FILE.filtered $THIS_FILE.filtered | \ + TMP=$($DIFF $OTHER_FILE.filtered $THIS_FILE.filtered | \ $GREP '^[<>]' | \ $SED -e '/[<>] /d' \ -e '/[<>] /d' ) @@ -481,11 +484,11 @@ CONTENTS_DIFF_FILE=$WORK_DIR/$ZIP_FILE.diff # On solaris, there is no -q option. if [ "$OPENJDK_TARGET_OS" = "solaris" ]; then - LC_ALL=C $DIFF -r $OTHER_UNZIPDIR $THIS_UNZIPDIR \ + $DIFF -r $OTHER_UNZIPDIR $THIS_UNZIPDIR \ | $GREP -v -e "^<" -e "^>" -e "^Common subdirectories:" \ > $CONTENTS_DIFF_FILE else - LC_ALL=C $DIFF -rq $OTHER_UNZIPDIR $THIS_UNZIPDIR > $CONTENTS_DIFF_FILE + $DIFF -rq $OTHER_UNZIPDIR $THIS_UNZIPDIR > $CONTENTS_DIFF_FILE fi ONLY_OTHER=$($GREP "^Only in $OTHER_UNZIPDIR" $CONTENTS_DIFF_FILE) @@ -532,11 +535,11 @@ if [ -n "$SHOW_DIFFS" ]; then for i in $(cat $WORK_DIR/$ZIP_FILE.difflist) ; do if [ -f "${OTHER_UNZIPDIR}/$i.javap" ]; then - LC_ALL=C $DIFF ${OTHER_UNZIPDIR}/$i.javap ${THIS_UNZIPDIR}/$i.javap + $DIFF ${OTHER_UNZIPDIR}/$i.javap ${THIS_UNZIPDIR}/$i.javap elif [ -f "${OTHER_UNZIPDIR}/$i.cleaned" ]; then - LC_ALL=C $DIFF ${OTHER_UNZIPDIR}/$i.cleaned ${THIS_UNZIPDIR}/$i + $DIFF ${OTHER_UNZIPDIR}/$i.cleaned ${THIS_UNZIPDIR}/$i else - LC_ALL=C $DIFF ${OTHER_UNZIPDIR}/$i ${THIS_UNZIPDIR}/$i + $DIFF ${OTHER_UNZIPDIR}/$i ${THIS_UNZIPDIR}/$i fi done fi @@ -776,7 +779,7 @@ > $WORK_FILE_BASE.symbols.this fi - LC_ALL=C $DIFF $WORK_FILE_BASE.symbols.other $WORK_FILE_BASE.symbols.this > $WORK_FILE_BASE.symbols.diff + $DIFF $WORK_FILE_BASE.symbols.other $WORK_FILE_BASE.symbols.this > $WORK_FILE_BASE.symbols.diff if [ -s $WORK_FILE_BASE.symbols.diff ]; then SYM_MSG=" diff " if [[ "$ACCEPTED_SYM_DIFF" != *"$BIN_FILE"* ]]; then @@ -816,9 +819,9 @@ | $UNIQ > $WORK_FILE_BASE.deps.this.uniq) (cd $FILE_WORK_DIR && $RM -f $NAME) - LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this \ + $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this \ > $WORK_FILE_BASE.deps.diff - LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq \ + $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq \ > $WORK_FILE_BASE.deps.diff.uniq if [ -s $WORK_FILE_BASE.deps.diff ]; then @@ -868,7 +871,7 @@ > $WORK_FILE_BASE.fulldump.this 2>&1 & wait - LC_ALL=C $DIFF $WORK_FILE_BASE.fulldump.other $WORK_FILE_BASE.fulldump.this \ + $DIFF $WORK_FILE_BASE.fulldump.other $WORK_FILE_BASE.fulldump.this \ > $WORK_FILE_BASE.fulldump.diff if [ -s $WORK_FILE_BASE.fulldump.diff ]; then @@ -915,7 +918,7 @@ | eval "$this_DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.this 2>&1 & wait - LC_ALL=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff + $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff if [ -s $WORK_FILE_BASE.dis.diff ]; then DIS_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.dis.diff | awk '{print $5}') diff -Nru openjdk-11-11.0.14+9/make/test/JtregNativeJdk.gmk openjdk-11-11.0.15+10/make/test/JtregNativeJdk.gmk --- openjdk-11-11.0.14+9/make/test/JtregNativeJdk.gmk 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/make/test/JtregNativeJdk.gmk 2022-04-19 19:38:30.000000000 +0000 @@ -83,6 +83,7 @@ else BUILD_JDK_JTREG_EXCLUDE += libTestMainKeyWindow.m BUILD_JDK_JTREG_EXCLUDE += libTestDynamicStore.m + BUILD_JDK_JTREG_EXCLUDE += exeLibraryCache.c endif $(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_LIBRARIES, \ diff -Nru openjdk-11-11.0.14+9/src/demo/share/java2d/J2DBench/options/default.opt openjdk-11-11.0.15+10/src/demo/share/java2d/J2DBench/options/default.opt --- openjdk-11-11.0.14+9/src/demo/share/java2d/J2DBench/options/default.opt 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/demo/share/java2d/J2DBench/options/default.opt 2022-04-19 19:38:30.000000000 +0000 @@ -8,8 +8,11 @@ global.results.workunits=units global.results.timeunits=sec global.results.ratio=unitspersec -global.dest.screen=disabled global.dest.offscreen=disabled +global.dest.frame.defaultframe=disabled +global.dest.frame.transframe=disabled +global.dest.frame.shapedframe=disabled +global.dest.frame.shapedtransframe=disabled global.dest.compatimg.compatimg=disabled global.dest.compatimg.opqcompatimg=disabled global.dest.compatimg.bmcompatimg=disabled diff -Nru openjdk-11-11.0.14+9/src/demo/share/java2d/J2DBench/src/j2dbench/Destinations.java openjdk-11-11.0.15+10/src/demo/share/java2d/J2DBench/src/j2dbench/Destinations.java --- openjdk-11-11.0.14+9/src/demo/share/java2d/J2DBench/src/j2dbench/Destinations.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/demo/share/java2d/J2DBench/src/j2dbench/Destinations.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -40,9 +40,11 @@ package j2dbench; -import java.awt.Image; import java.awt.Component; +import java.awt.Frame; import java.awt.GraphicsConfiguration; +import java.awt.Image; +import java.awt.Polygon; import java.awt.Transparency; import java.awt.color.ColorSpace; import java.awt.image.BufferedImage; @@ -50,11 +52,14 @@ import java.awt.image.DataBuffer; import java.awt.image.WritableRaster; +import javax.swing.SwingUtilities; + import j2dbench.tests.GraphicsTests; import j2dbench.tests.ImageTests; public abstract class Destinations extends Option.Enable { public static Group.EnableSet destroot; + public static Group frameroot; public static Group bufimgdestroot; public static Group compatimgdestroot; public static Group volimgdestroot; @@ -63,9 +68,22 @@ destroot = new Group.EnableSet(TestEnvironment.globaloptroot, "dest", "Output Destination Options"); - new Screen(); new OffScreen(); + frameroot = new Group.EnableSet(destroot, "frame", "Output to Frame"); + frameroot.setHorizontal(); + + new Screen(false, false); + if (ImageTests.hasOpacityWindow) { + new Screen(true, false); + } + if (ImageTests.hasShapedWindow) { + new Screen(false, true); + } + if (ImageTests.hasShapedWindow && ImageTests.hasOpacityWindow) { + new Screen(true, true); + } + if (GraphicsTests.hasGraphics2D) { if (ImageTests.hasCompatImage) { compatimgdestroot = @@ -129,17 +147,95 @@ public abstract void setDestination(TestEnvironment env); public static class Screen extends Destinations { - public Screen() { - super(destroot, "screen", "Output to Screen", false); + + private boolean opacity; + private boolean shaped; + + public Screen(boolean opacity, boolean shaped) { + super(frameroot, getDescription(opacity,shaped), + getLongDescription(opacity,shaped), false); + this.opacity = opacity; + this.shaped = shaped; + } + + private static String getDescription(boolean opacity, boolean shaped){ + if (opacity && shaped) { + return "shapedtransframe"; + } + if (shaped) { + return "shapedframe"; + } + if (opacity) { + return "transframe"; + } + return "defaultframe"; + } + + private static String getLongDescription(boolean opacity, boolean shaped){ + if (opacity && shaped) { + return "Translucent and Shaped"; + } + if (shaped) { + return "Shaped"; + } + if (opacity) { + return "Translucent"; + } + return "Default"; } public String getModifierValueName(Object val) { - return "Screen"; + if (opacity && shaped) { + return "Translucent and Shaped Frame"; + } + if (shaped) { + return "Shaped Frame"; + } + if (opacity) { + return "Translucent Frame"; + } + return "Default Frame"; } public void setDestination(TestEnvironment env) { env.setTestImage(null); } + + public void modifyTest(TestEnvironment env) { + setDestination(env); + Frame frame = (Frame) SwingUtilities.getWindowAncestor(env.comp); + if (frame != null && (opacity || shaped)) { + frame.dispose(); + frame.setUndecorated(true); + int w = frame.getWidth(); + int h = frame.getHeight(); + if (shaped) { + Polygon p = new Polygon(); + p.addPoint(0, 0); + p.addPoint(w, 0); + p.addPoint(0, h); + p.addPoint(w, h); + p.addPoint(0, 0); + frame.setShape(p); + } + if (opacity) { + frame.setOpacity(0.5f); + } + frame.setVisible(true); + } + } + + public void restoreTest(TestEnvironment env) { + env.setTestImage(null); + Frame frame = (Frame) SwingUtilities.getWindowAncestor(env.comp); + if (frame != null && (opacity || shaped)) { + frame.dispose(); + frame.setShape(null); + frame.setOpacity(1); + frame.setUndecorated(false); + frame.setVisible(true); + } + } } public static class OffScreen extends Destinations { diff -Nru openjdk-11-11.0.14+9/src/demo/share/java2d/J2DBench/src/j2dbench/J2DBench.java openjdk-11-11.0.15+10/src/demo/share/java2d/J2DBench/src/j2dbench/J2DBench.java --- openjdk-11-11.0.14+9/src/demo/share/java2d/J2DBench/src/j2dbench/J2DBench.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/demo/share/java2d/J2DBench/src/j2dbench/J2DBench.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -40,6 +40,8 @@ package j2dbench; +import java.awt.GraphicsEnvironment; +import java.awt.Rectangle; import java.io.PrintWriter; import java.io.FileReader; import java.io.FileWriter; @@ -780,7 +782,10 @@ f.getContentPane().add(p, BorderLayout.SOUTH); f.pack(); f.setLocationRelativeTo(null); - f.show(); + Rectangle usable = GraphicsEnvironment.getLocalGraphicsEnvironment() + .getMaximumWindowBounds().intersection(f.getBounds()); + f.setBounds(usable); + f.setVisible(true); } public static void runTests(boolean showresults) { diff -Nru openjdk-11-11.0.14+9/src/demo/share/java2d/J2DBench/src/j2dbench/tests/ImageTests.java openjdk-11-11.0.15+10/src/demo/share/java2d/J2DBench/src/j2dbench/tests/ImageTests.java --- openjdk-11-11.0.14+9/src/demo/share/java2d/J2DBench/src/j2dbench/tests/ImageTests.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/demo/share/java2d/J2DBench/src/j2dbench/tests/ImageTests.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -53,7 +53,9 @@ import java.awt.AlphaComposite; import java.awt.Dimension; import java.awt.GraphicsConfiguration; +import java.awt.Rectangle; import java.awt.RenderingHints; +import java.awt.Window; import java.awt.image.BufferedImage; import java.awt.image.BufferedImageOp; import java.awt.image.ByteLookupTable; @@ -79,6 +81,8 @@ public abstract class ImageTests extends GraphicsTests { public static boolean hasVolatileImage; public static boolean hasTransparentVolatileImage; + public static boolean hasShapedWindow; + public static boolean hasOpacityWindow; public static boolean hasCompatImage; static { @@ -96,6 +100,16 @@ hasTransparentVolatileImage = true; } catch (NoSuchMethodError e) { } + try { + new Window(null).setShape(new Rectangle()); + hasShapedWindow = true; + } catch (Exception e) { + } + try { + new Window(null).setOpacity(0.5f); + hasOpacityWindow = true; + } catch (Exception e) { + } } static Group imageroot; diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/aarch64.ad openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/aarch64.ad --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/aarch64.ad 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/aarch64.ad 2022-04-19 19:38:30.000000000 +0000 @@ -2055,11 +2055,6 @@ const bool Matcher::match_rule_supported(int opcode) { - switch (opcode) { - default: - break; - } - if (!has_match_rule(opcode)) { return false; } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/assembler_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/assembler_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/assembler_aarch64.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/assembler_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -214,7 +214,7 @@ static void patch(address a, int msb, int lsb, uint64_t val) { int nbits = msb - lsb + 1; - guarantee(val < (1U << nbits), "Field too big for insn"); + guarantee(val < (1ULL << nbits), "Field too big for insn"); assert_cond(msb >= lsb); unsigned mask = checked_cast(right_n_bits(nbits)); val <<= lsb; @@ -436,8 +436,8 @@ } Register base() const { - guarantee((_mode == base_plus_offset | _mode == base_plus_offset_reg - | _mode == post | _mode == post_reg), + guarantee((_mode == base_plus_offset || _mode == base_plus_offset_reg + || _mode == post || _mode == post_reg), "wrong mode"); return _base; } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1732,6 +1732,7 @@ default: ShouldNotReachHere(); } break; + default: ShouldNotReachHere(); } } else { diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -584,8 +584,8 @@ case doubleTag: do_ArithmeticOp_FPU(x); return; case longTag: do_ArithmeticOp_Long(x); return; case intTag: do_ArithmeticOp_Int(x); return; + default: ShouldNotReachHere(); return; } - ShouldNotReachHere(); } // _ishl, _lshl, _ishr, _lshr, _iushr, _lushr @@ -792,9 +792,13 @@ __ abs(value.result(), dst, LIR_OprFact::illegalOpr); break; } + default: + ShouldNotReachHere(); } break; } + default: + ShouldNotReachHere(); } } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/frame_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/frame_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/frame_aarch64.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/frame_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -676,11 +676,12 @@ #undef DESCRIBE_FP_OFFSET -#define DESCRIBE_FP_OFFSET(name) \ - { \ - uintptr_t *p = (uintptr_t *)fp; \ - printf("0x%016lx 0x%016lx %s\n", (uintptr_t)(p + frame::name##_offset), \ - p[frame::name##_offset], #name); \ +#define DESCRIBE_FP_OFFSET(name) \ + { \ + uintptr_t *p = (uintptr_t *)fp; \ + printf(INTPTR_FORMAT " " INTPTR_FORMAT " %s\n", \ + (uintptr_t)(p + frame::name##_offset), \ + p[frame::name##_offset], #name); \ } static THREAD_LOCAL_DECL uintptr_t nextfp; diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -53,7 +53,7 @@ #define THREAD_LOCAL_POLL -#if defined(_WIN64) +#if defined(__APPLE__) || defined(_WIN64) #define R18_RESERVED #define R18_RESERVED_ONLY(code) code #define NOT_R18_RESERVED(code) diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,6 +1,7 @@ /* - * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,9 +59,14 @@ return fnoreg; } -int InterpreterRuntime::SignatureHandlerGenerator::next_stack_offset() { +// On macos/aarch64 native stack is packed, int/float are using only 4 bytes +// on stack. Natural alignment for types are still in place, +// for example double/long should be 8 bytes aligned. + +int InterpreterRuntime::SignatureHandlerGenerator::next_stack_offset(unsigned elem_size) { + MACOS_ONLY(_stack_offset = align_up(_stack_offset, elem_size)); int ret = _stack_offset; - _stack_offset += wordSize; + _stack_offset += NOT_MACOS(wordSize) MACOS_ONLY(elem_size); return ret; } @@ -72,6 +78,30 @@ _stack_offset = 0; } +void InterpreterRuntime::SignatureHandlerGenerator::pass_byte() { + const Address src(from(), Interpreter::local_offset_in_bytes(offset())); + + Register reg = next_gpr(); + if (reg != noreg) { + __ ldr(reg, src); + } else { + __ ldrb(r0, src); + __ strb(r0, Address(to(), next_stack_offset(sizeof(jbyte)))); + } +} + +void InterpreterRuntime::SignatureHandlerGenerator::pass_short() { + const Address src(from(), Interpreter::local_offset_in_bytes(offset())); + + Register reg = next_gpr(); + if (reg != noreg) { + __ ldr(reg, src); + } else { + __ ldrh(r0, src); + __ strh(r0, Address(to(), next_stack_offset(sizeof(jshort)))); + } +} + void InterpreterRuntime::SignatureHandlerGenerator::pass_int() { const Address src(from(), Interpreter::local_offset_in_bytes(offset())); @@ -80,7 +110,7 @@ __ ldr(reg, src); } else { __ ldrw(r0, src); - __ strw(r0, Address(to(), next_stack_offset())); + __ strw(r0, Address(to(), next_stack_offset(sizeof(jint)))); } } @@ -92,7 +122,7 @@ __ ldr(reg, src); } else { __ ldr(r0, src); - __ str(r0, Address(to(), next_stack_offset())); + __ str(r0, Address(to(), next_stack_offset(sizeof(jlong)))); } } @@ -104,7 +134,7 @@ __ ldrs(reg, src); } else { __ ldrw(r0, src); - __ strw(r0, Address(to(), next_stack_offset())); + __ strw(r0, Address(to(), next_stack_offset(sizeof(jfloat)))); } } @@ -116,7 +146,7 @@ __ ldrd(reg, src); } else { __ ldr(r0, src); - __ str(r0, Address(to(), next_stack_offset())); + __ str(r0, Address(to(), next_stack_offset(sizeof(jdouble)))); } } @@ -140,7 +170,8 @@ __ cbnz(temp(), L); __ mov(r0, zr); __ bind(L); - __ str(r0, Address(to(), next_stack_offset())); + STATIC_ASSERT(sizeof(jobject) == wordSize); + __ str(r0, Address(to(), next_stack_offset(sizeof(jobject)))); } } @@ -165,7 +196,7 @@ : public NativeSignatureIterator { private: address _from; - intptr_t* _to; + char* _to; intptr_t* _int_args; intptr_t* _fp_args; intptr_t* _fp_identifiers; @@ -200,21 +231,38 @@ return -1; } - void pass_stack(intptr_t value) { - *_to++ = value; + template + void pass_stack(T value) { + MACOS_ONLY(_to = align_up(_to, sizeof(value))); + *(T *)_to = value; + _to += NOT_MACOS(wordSize) MACOS_ONLY(sizeof(value)); + } + + virtual void pass_byte() { + jbyte value = *(jbyte*)single_slot_addr(); + if (pass_gpr(value) < 0) { + pass_stack<>(value); + } + } + + virtual void pass_short() { + jshort value = *(jshort*)single_slot_addr(); + if (pass_gpr(value) < 0) { + pass_stack<>(value); + } } virtual void pass_int() { jint value = *(jint*)single_slot_addr(); if (pass_gpr(value) < 0) { - pass_stack(value); + pass_stack<>(value); } } virtual void pass_long() { intptr_t value = *double_slot_addr(); if (pass_gpr(value) < 0) { - pass_stack(value); + pass_stack<>(value); } } @@ -222,14 +270,14 @@ intptr_t* addr = single_slot_addr(); intptr_t value = *addr == 0 ? NULL : (intptr_t)addr; if (pass_gpr(value) < 0) { - pass_stack(value); + pass_stack<>(value); } } virtual void pass_float() { jint value = *(jint*)single_slot_addr(); if (pass_fpr(value) < 0) { - pass_stack(value); + pass_stack<>(value); } } @@ -239,7 +287,7 @@ if (0 <= arg) { *_fp_identifiers |= (1ull << arg); // mark as double } else { - pass_stack(value); + pass_stack<>(value); } } @@ -248,7 +296,7 @@ : NativeSignatureIterator(method) { _from = from; - _to = to; + _to = (char *)to; _int_args = to - (method->is_static() ? 16 : 17); _fp_args = to - 8; diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/interpreterRT_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/interpreterRT_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/interpreterRT_aarch64.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/interpreterRT_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,6 +1,7 @@ /* - * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,6 +39,8 @@ unsigned int _num_reg_int_args; int _stack_offset; + void pass_byte(); + void pass_short(); void pass_int(); void pass_long(); void pass_float(); @@ -46,7 +49,7 @@ Register next_gpr(); FloatRegister next_fpr(); - int next_stack_offset(); + int next_stack_offset(unsigned elem_size); public: // Creation diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -31,6 +31,7 @@ #include "prims/jniFastGetField.hpp" #include "prims/jvm_misc.hpp" #include "runtime/safepoint.hpp" +#include "runtime/threadWXSetters.inline.hpp" #define __ masm-> @@ -51,6 +52,48 @@ static const Register rcounter_addr = r6; static const Register result = r7; +// On macos/aarch64 we need to ensure WXExec mode when running generated +// FastGetXXXField, as these functions can be called from WXWrite context +// (8262896). So each FastGetXXXField is wrapped into a C++ statically +// compiled template function that optionally switches to WXExec if necessary. + +#ifdef __APPLE__ + +static address generated_fast_get_field[T_LONG + 1 - T_BOOLEAN]; + +template struct BasicTypeToJni {}; +template<> struct BasicTypeToJni { static const jboolean jni_type; }; +template<> struct BasicTypeToJni { static const jbyte jni_type; }; +template<> struct BasicTypeToJni { static const jchar jni_type; }; +template<> struct BasicTypeToJni { static const jshort jni_type; }; +template<> struct BasicTypeToJni { static const jint jni_type; }; +template<> struct BasicTypeToJni { static const jlong jni_type; }; +template<> struct BasicTypeToJni { static const jfloat jni_type; }; +template<> struct BasicTypeToJni { static const jdouble jni_type; }; + +template +decltype(BasicTypeToJni::jni_type) static_fast_get_field_wrapper(JNIEnv *env, jobject obj, jfieldID fieldID) { + JavaThread* thread = JavaThread::thread_from_jni_environment(env); + ThreadWXEnable wx(WXExec, thread); + address get_field_addr = generated_fast_get_field[BType - T_BOOLEAN]; + return ((decltype(BasicTypeToJni::jni_type)(*)(JNIEnv *env, jobject obj, jfieldID fieldID))get_field_addr)(env, obj, fieldID); +} + +template +address JNI_FastGetField::generate_fast_get_int_field1() { + generated_fast_get_field[BType - T_BOOLEAN] = generate_fast_get_int_field0((BasicType)BType); + return (address)static_fast_get_field_wrapper; +} + +#else // __APPLE__ + +template +address JNI_FastGetField::generate_fast_get_int_field1() { + return generate_fast_get_int_field0((BasicType)BType); +} + +#endif // __APPLE__ + address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { const char *name; switch (type) { @@ -147,33 +190,33 @@ } address JNI_FastGetField::generate_fast_get_boolean_field() { - return generate_fast_get_int_field0(T_BOOLEAN); + return generate_fast_get_int_field1(); } address JNI_FastGetField::generate_fast_get_byte_field() { - return generate_fast_get_int_field0(T_BYTE); + return generate_fast_get_int_field1(); } address JNI_FastGetField::generate_fast_get_char_field() { - return generate_fast_get_int_field0(T_CHAR); + return generate_fast_get_int_field1(); } address JNI_FastGetField::generate_fast_get_short_field() { - return generate_fast_get_int_field0(T_SHORT); + return generate_fast_get_int_field1(); } address JNI_FastGetField::generate_fast_get_int_field() { - return generate_fast_get_int_field0(T_INT); + return generate_fast_get_int_field1(); } address JNI_FastGetField::generate_fast_get_long_field() { - return generate_fast_get_int_field0(T_LONG); + return generate_fast_get_int_field1(); } address JNI_FastGetField::generate_fast_get_float_field() { - return generate_fast_get_int_field0(T_FLOAT); + return generate_fast_get_int_field1(); } address JNI_FastGetField::generate_fast_get_double_field() { - return generate_fast_get_int_field0(T_DOUBLE); + return generate_fast_get_int_field1(); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -21,6 +21,7 @@ * questions. */ +#include "precompiled.hpp" #include "asm/macroAssembler.hpp" #include "jvmci/jvmciCodeInstaller.hpp" #include "jvmci/jvmciRuntime.hpp" diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1492,7 +1492,7 @@ #ifndef PRODUCT { char buffer[64]; - snprintf(buffer, sizeof(buffer), PTR64_FORMAT, imm64); + snprintf(buffer, sizeof(buffer), "0x%" PRIX64, (uint64_t)imm64); block_comment(buffer); } #endif @@ -1555,7 +1555,7 @@ #ifndef PRODUCT { char buffer[64]; - snprintf(buffer, sizeof(buffer), PTR64_FORMAT, imm64); + snprintf(buffer, sizeof(buffer), "0x%" PRIX64, imm64); block_comment(buffer); } #endif @@ -1668,7 +1668,7 @@ #ifndef PRODUCT { char buffer[64]; - snprintf(buffer, sizeof(buffer), PTR32_FORMAT, imm32); + snprintf(buffer, sizeof(buffer), "0x%" PRIX32, imm32); block_comment(buffer); } #endif @@ -1832,7 +1832,7 @@ return true; } else { assert(size_in_bytes == 8 || size_in_bytes == 4, "only 8 bytes or 4 bytes load/store is supported."); - const unsigned mask = size_in_bytes - 1; + const uint64_t mask = size_in_bytes - 1; if (adr.getMode() == Address::base_plus_offset && (adr.offset() & mask) == 0) { // only supports base_plus_offset. code()->set_last_insn(pc()); @@ -2040,11 +2040,17 @@ void MacroAssembler::pusha() { - push(0x7fffffff, sp); + push(RegSet::range(r0, r30), sp); } void MacroAssembler::popa() { - pop(0x7fffffff, sp); + pop(RegSet::range(r0, r17), sp); +#ifdef R18_RESERVED + ldp(zr, r19, Address(post(sp, 2 * wordSize))); + pop(RegSet::range(r20, r30), sp); +#else + pop(RegSet::range(r18_tls, r30), sp); +#endif } // Push lots of registers in the bit set supplied. Don't push sp. @@ -2579,7 +2585,7 @@ void MacroAssembler::push_CPU_state(bool save_vectors) { int step = (save_vectors ? 8 : 4) * wordSize; - push(0x3fffffff, sp); // integer registers except lr & sp + push(RegSet::range(r0, r29), sp); // integer registers except lr & sp mov(rscratch1, -step); sub(sp, sp, step); for (int i = 28; i >= 4; i -= 4) { @@ -2594,7 +2600,15 @@ for (int i = 0; i <= 28; i += 4) ld1(as_FloatRegister(i), as_FloatRegister(i+1), as_FloatRegister(i+2), as_FloatRegister(i+3), restore_vectors ? T2D : T1D, Address(post(sp, step))); - pop(0x3fffffff, sp); // integer registers except lr & sp + + // integer registers except lr & sp + pop(RegSet::range(r0, r17), sp); +#ifdef R18_RESERVED + ldp(zr, r19, Address(post(sp, 2 * wordSize))); + pop(RegSet::range(r20, r29), sp); +#else + pop(RegSet::range(r18_tls, r29), sp); +#endif } /** @@ -2760,7 +2774,7 @@ // Overwrite previous generated binary. code_section()->set_end(prev); - const int sz = prev_ldst->size_in_bytes(); + const size_t sz = prev_ldst->size_in_bytes(); assert(sz == 8 || sz == 4, "only supports 64/32bit merging."); if (!is_store) { BLOCK_COMMENT("merged ldr pair"); diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -27,6 +27,7 @@ #define CPU_AARCH64_VM_MACROASSEMBLER_AARCH64_HPP #include "asm/assembler.inline.hpp" +#include "runtime/vm_version.hpp" // MacroAssembler extends Assembler by frequently used macros. // @@ -88,7 +89,7 @@ = (operand_valid_for_logical_immediate(false /*is32*/, (uint64_t)Universe::narrow_klass_base()) && ((uint64_t)Universe::narrow_klass_base() - > (1UL << log2_intptr(Universe::narrow_klass_range())))); + > (1ULL << log2_intptr(checked_cast(Universe::narrow_klass_range()))))); } // These routines should emit JVMTI PopFrame and ForceEarlyReturn handling code. diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -681,7 +681,7 @@ return 0; } } - size_t size_in_bytes() { return 1 << size(); } + size_t size_in_bytes() { return 1ULL << size(); } bool is_not_pre_post_index() { return (is_ldst_ur() || is_ldst_unsigned_offset()); } bool is_load() { assert(Instruction_aarch64::extract(uint_at(0), 23, 22) == 0b01 || diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,6 +1,7 @@ /* * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -715,7 +716,7 @@ return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry); } -int SharedRuntime::c_calling_convention(const BasicType *sig_bt, +static int c_calling_convention_priv(const BasicType *sig_bt, VMRegPair *regs, VMRegPair *regs2, int total_args_passed) { @@ -746,6 +747,11 @@ if (int_args < Argument::n_int_register_parameters_c) { regs[i].set1(INT_ArgReg[int_args++]->as_VMReg()); } else { +#ifdef __APPLE__ + // Less-than word types are stored one after another. + // The code is unable to handle this so bailout. + return -1; +#endif regs[i].set1(VMRegImpl::stack2reg(stk_args)); stk_args += 2; } @@ -768,6 +774,11 @@ if (fp_args < Argument::n_float_register_parameters_c) { regs[i].set1(FP_ArgReg[fp_args++]->as_VMReg()); } else { +#ifdef __APPLE__ + // Less-than word types are stored one after another. + // The code is unable to handle this so bailout. + return -1; +#endif regs[i].set1(VMRegImpl::stack2reg(stk_args)); stk_args += 2; } @@ -794,6 +805,16 @@ return stk_args; } +int SharedRuntime::c_calling_convention(const BasicType *sig_bt, + VMRegPair *regs, + VMRegPair *regs2, + int total_args_passed) +{ + int result = c_calling_convention_priv(sig_bt, regs, regs2, total_args_passed); + guarantee(result >= 0, "Unsupported arguments configuration"); + return result; +} + // On 64 bit we will store integer like items to the stack as // 64 bits items (sparc abi) even though java would only store // 32bits for a parameter. On 32bit it will simply be 32 bits @@ -1340,7 +1361,11 @@ // Now figure out where the args must be stored and how much stack space // they require. int out_arg_slots; - out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args); + out_arg_slots = c_calling_convention_priv(out_sig_bt, out_regs, NULL, total_c_args); + + if (out_arg_slots < 0) { + return NULL; + } // Compute framesize for the wrapper. We need to handlize all oops in // incoming registers @@ -1473,7 +1498,7 @@ // Generate stack overflow check if (UseStackBanging) { - __ bang_stack_with_offset(JavaThread::stack_shadow_zone_size()); + __ bang_stack_with_offset(checked_cast(JavaThread::stack_shadow_zone_size())); } else { Unimplemented(); } @@ -2421,7 +2446,7 @@ __ sub(sp, sp, r19); // Push interpreter frames in a loop - __ mov(rscratch1, (address)0xDEADDEAD); // Make a recognizable pattern + __ mov(rscratch1, (uint64_t)0xDEADDEAD); // Make a recognizable pattern __ mov(rscratch2, rscratch1); Label loop; __ bind(loop); diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1299,14 +1299,14 @@ // Scan over array at a for count oops, verifying each one. // Preserves a and count, clobbers rscratch1 and rscratch2. - void verify_oop_array (size_t size, Register a, Register count, Register temp) { + void verify_oop_array (int size, Register a, Register count, Register temp) { Label loop, end; __ mov(rscratch1, a); __ mov(rscratch2, zr); __ bind(loop); __ cmp(rscratch2, count); __ br(Assembler::HS, end); - if (size == (size_t)wordSize) { + if (size == wordSize) { __ ldr(temp, Address(a, rscratch2, Address::lsl(exact_log2(size)))); __ verify_oop(temp); } else { @@ -1338,7 +1338,7 @@ // used by generate_conjoint_int_oop_copy(). // address generate_disjoint_copy(size_t size, bool aligned, bool is_oop, address *entry, - const char *name, bool dest_uninitialized = false) { + const char *name, bool dest_uninitialized = false) { Register s = c_rarg0, d = c_rarg1, count = c_rarg2; RegSet saved_reg = RegSet::of(s, d, count); __ align(CodeEntryAlignment); @@ -1367,12 +1367,12 @@ // save regs before copy_memory __ push(RegSet::of(d, count), sp); } - copy_memory(aligned, s, d, count, rscratch1, size); + copy_memory(aligned, s, d, count, rscratch1, checked_cast(size)); if (is_oop) { __ pop(RegSet::of(d, count), sp); if (VerifyOops) - verify_oop_array(size, d, count, r16); + verify_oop_array(checked_cast(size), d, count, r16); } bs->arraycopy_epilogue(_masm, decorators, is_oop, d, count, rscratch1, RegSet()); @@ -1398,7 +1398,7 @@ // the hardware handle it. The two dwords within qwords that span // cache line boundaries will still be loaded and stored atomically. // - address generate_conjoint_copy(size_t size, bool aligned, bool is_oop, address nooverlap_target, + address generate_conjoint_copy(int size, bool aligned, bool is_oop, address nooverlap_target, address *entry, const char *name, bool dest_uninitialized = false) { Register s = c_rarg0, d = c_rarg1, count = c_rarg2; @@ -1644,7 +1644,7 @@ address generate_disjoint_oop_copy(bool aligned, address *entry, const char *name, bool dest_uninitialized) { const bool is_oop = true; - const size_t size = UseCompressedOops ? sizeof (jint) : sizeof (jlong); + const int size = UseCompressedOops ? sizeof (jint) : sizeof (jlong); return generate_disjoint_copy(size, aligned, is_oop, entry, name, dest_uninitialized); } @@ -1662,7 +1662,7 @@ address nooverlap_target, address *entry, const char *name, bool dest_uninitialized) { const bool is_oop = true; - const size_t size = UseCompressedOops ? sizeof (jint) : sizeof (jlong); + const int size = UseCompressedOops ? sizeof (jint) : sizeof (jlong); return generate_conjoint_copy(size, aligned, is_oop, nooverlap_target, entry, name, dest_uninitialized); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1125,7 +1125,7 @@ // an interpreter frame with greater than a page of locals, so each page // needs to be checked. Only true for non-native. if (UseStackBanging) { - const int n_shadow_pages = JavaThread::stack_shadow_zone_size() / os::vm_page_size(); + const int n_shadow_pages = checked_cast(JavaThread::stack_shadow_zone_size() / os::vm_page_size()); const int start_page = native_call ? n_shadow_pages : 1; const int page_size = os::vm_page_size(); for (int pages = start_page; pages <= n_shadow_pages ; pages++) { @@ -1458,11 +1458,12 @@ __ cmp(rscratch1, JavaThread::stack_guard_yellow_reserved_disabled); __ br(Assembler::NE, no_reguard); - __ pusha(); // XXX only save smashed registers + __ push_call_clobbered_registers(); __ mov(c_rarg0, rthread); __ mov(rscratch2, CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages)); __ blr(rscratch2); - __ popa(); // XXX only restore smashed registers + __ pop_call_clobbered_registers(); + __ bind(no_reguard); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -94,10 +94,6 @@ return iaddress(r); } -static inline Address at_rsp() { - return Address(esp, 0); -} - // At top of Java expression stack which may be different than esp(). It // isn't for category 1 objects. static inline Address at_tos () { @@ -2323,6 +2319,7 @@ switch (code) { case Bytecodes::_nofast_getfield: code = Bytecodes::_getfield; break; case Bytecodes::_nofast_putfield: code = Bytecodes::_putfield; break; + default: break; } assert(byte_no == f1_byte || byte_no == f2_byte, "byte_no out of range"); @@ -2947,6 +2944,7 @@ case Bytecodes::_fast_dputfield: __ pop_d(); break; case Bytecodes::_fast_fputfield: __ pop_f(); break; case Bytecodes::_fast_lputfield: __ pop_l(r0); break; + default: break; } __ bind(L2); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -67,6 +67,9 @@ return false; } + // Arm can assign codes that are not published in the manual. + // Apple's code is defined in + // https://github.com/apple/darwin-xnu/blob/33eb983/osfmk/arm/cpuid.h#L62 enum Family { CPU_ARM = 'A', CPU_BROADCOM = 'B', @@ -79,6 +82,7 @@ CPU_QUALCOM = 'Q', CPU_MARVELL = 'V', CPU_INTEL = 'i', + CPU_APPLE = 'a', }; enum Feature_Flag { @@ -111,6 +115,11 @@ static int icache_line_size() { return _icache_line_size; } static int dcache_line_size() { return _dcache_line_size; } + +#ifdef __APPLE__ + // Is the CPU running emulated (for example macOS Rosetta running x86_64 code on M1 ARM (aarch64) + static bool is_cpu_emulated(); +#endif }; #endif // CPU_AARCH64_VM_VM_VERSION_AARCH64_HPP diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/arm/arm.ad openjdk-11-11.0.15+10/src/hotspot/cpu/arm/arm.ad --- openjdk-11-11.0.14+9/src/hotspot/cpu/arm/arm.ad 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/arm/arm.ad 2022-04-19 19:38:30.000000000 +0000 @@ -5317,7 +5317,7 @@ // Must be safe to execute with invalid address (cannot fault). instruct prefetchAlloc_mp( memoryP mem ) %{ - predicate(os::is_MP()); + predicate(VM_Version::has_multiprocessing_extensions()); match( PrefetchAllocation mem ); ins_cost(MEMORY_REF_COST); size(4); @@ -5334,7 +5334,7 @@ %} instruct prefetchAlloc_sp( memoryP mem ) %{ - predicate(!os::is_MP()); + predicate(!VM_Version::has_multiprocessing_extensions()); match( PrefetchAllocation mem ); ins_cost(MEMORY_REF_COST); size(4); diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/arm/assembler_arm_32.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/arm/assembler_arm_32.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/arm/assembler_arm_32.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/arm/assembler_arm_32.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -47,7 +47,7 @@ // Convert the raw encoding form into the form expected by the // constructor for Address. Address Address::make_raw(int base, int index, int scale, int disp, relocInfo::relocType disp_reloc) { - RelocationHolder rspec; + RelocationHolder rspec = RelocationHolder::none; if (disp_reloc != relocInfo::none) { rspec = Relocation::spec_simple(disp_reloc); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/arm/assembler_arm_32.hpp openjdk-11-11.0.15+10/src/hotspot/cpu/arm/assembler_arm_32.hpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/arm/assembler_arm_32.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/arm/assembler_arm_32.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -434,7 +434,9 @@ } void pldw(Address addr) { - assert(VM_Version::arm_arch() >= 7 && os::is_MP(), "no pldw on this processor"); + assert(!VM_Version::is_initialized() || + (VM_Version::arm_arch() >= 7 && VM_Version::has_multiprocessing_extensions()), + "PLDW is available on ARMv7 with Multiprocessing Extensions only"); emit_int32(0xf510f000 | addr.encoding2()); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -2201,6 +2201,9 @@ } else { assert(right->is_constant(), "must be"); const uint c = (uint)right->as_constant_ptr()->as_jint(); + if (!Assembler::is_arith_imm_in_range(c)) { + BAILOUT("illegal arithmetic operand"); + } switch (code) { case lir_logic_and: __ and_32(res, lreg, c); break; case lir_logic_or: __ orr_32(res, lreg, c); break; @@ -2396,8 +2399,8 @@ __ teq(xhi, yhi); __ teq(xlo, ylo, eq); } else { - __ subs(xlo, xlo, ylo); - __ sbcs(xhi, xhi, yhi); + __ subs(Rtemp, xlo, ylo); + __ sbcs(Rtemp, xhi, yhi); } } else { ShouldNotReachHere(); diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/arm/vm_version_arm.hpp openjdk-11-11.0.15+10/src/hotspot/cpu/arm/vm_version_arm.hpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/arm/vm_version_arm.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/arm/vm_version_arm.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -54,6 +54,7 @@ static bool has_simd() { return _has_simd; } static bool has_vfp() { return has_simd(); } static bool simd_math_is_compliant() { return true; } + static bool has_multiprocessing_extensions() { return true; } static bool prefer_moves_over_load_literal() { return true; } @@ -64,6 +65,7 @@ vfp = 0, vfp3_32 = 1, simd = 2, + mp_ext = 3 }; enum Feature_Flag_Set { @@ -73,6 +75,7 @@ vfp_m = 1 << vfp, vfp3_32_m = 1 << vfp3_32, simd_m = 1 << simd, + mp_ext_m = 1 << mp_ext }; // The value stored by "STR PC, [addr]" instruction can be either @@ -115,6 +118,7 @@ static bool has_vfp() { return (_features & vfp_m) != 0; } static bool has_vfp3_32() { return (_features & vfp3_32_m) != 0; } static bool has_simd() { return (_features & simd_m) != 0; } + static bool has_multiprocessing_extensions() { return (_features & mp_ext_m) != 0; } static bool simd_math_is_compliant() { return false; } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/arm/vm_version_arm_32.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/arm/vm_version_arm_32.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/arm/vm_version_arm_32.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/arm/vm_version_arm_32.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -40,6 +40,7 @@ typedef int (*get_cpu_info_t)(); typedef bool (*check_vfp_t)(double *d); typedef bool (*check_simd_t)(); + typedef bool (*check_mp_ext_t)(int *addr); } #define __ _masm-> @@ -95,6 +96,20 @@ return start; }; + + address generate_check_mp_ext() { + StubCodeMark mark(this, "VM_Version", "check_mp_ext"); + address start = __ pc(); + + // PLDW is available with Multiprocessing Extensions only + __ pldw(Address(R0)); + // Return true if instruction caused no signals + __ mov(R0, 1); + // JVM_handle_linux_signal moves PC here if SIGILL happens + __ bx(LR); + + return start; + }; }; #undef __ @@ -103,6 +118,7 @@ extern "C" address check_vfp3_32_fault_instr; extern "C" address check_vfp_fault_instr; extern "C" address check_simd_fault_instr; +extern "C" address check_mp_ext_fault_instr; void VM_Version::early_initialize() { @@ -165,6 +181,13 @@ #endif #endif + address check_mp_ext_pc = g.generate_check_mp_ext(); + check_mp_ext_t check_mp_ext = CAST_TO_FN_PTR(check_mp_ext_t, check_mp_ext_pc); + check_mp_ext_fault_instr = (address)check_mp_ext; + int dummy_local_variable; + if (check_mp_ext(&dummy_local_variable)) { + _features |= mp_ext_m; + } if (UseAESIntrinsics && !FLAG_IS_DEFAULT(UseAESIntrinsics)) { warning("AES intrinsics are not available on this CPU"); @@ -247,11 +270,12 @@ && _supports_atomic_getset8 && _supports_atomic_getadd8, "C2: atomic operations must be supported"); #endif char buf[512]; - jio_snprintf(buf, sizeof(buf), "(ARMv%d)%s%s%s", + jio_snprintf(buf, sizeof(buf), "(ARMv%d)%s%s%s%s", _arm_arch, (has_vfp() ? ", vfp" : ""), (has_vfp3_32() ? ", vfp3-32" : ""), - (has_simd() ? ", simd" : "")); + (has_simd() ? ", simd" : ""), + (has_multiprocessing_extensions() ? ", mp_ext" : "")); // buf is started with ", " or is empty _features_string = os::strdup(buf); diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -55,8 +55,6 @@ if (_info->deoptimize_on_exception()) { address a = Runtime1::entry_for(Runtime1::predicate_failed_trap_id); - // May be used by optimizations like LoopInvariantCodeMotion or RangeCheckEliminator. - DEBUG_ONLY( __ untested("RangeCheckStub: predicate_failed_trap_id"); ) //__ load_const_optimized(R0, a); __ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(a)); __ mtctr(R0); diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/ppc/frame_ppc.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/ppc/frame_ppc.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/ppc/frame_ppc.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/ppc/frame_ppc.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2017 SAP SE. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -280,8 +280,60 @@ } bool frame::is_interpreted_frame_valid(JavaThread* thread) const { - // Is there anything to do? assert(is_interpreted_frame(), "Not an interpreted frame"); + // These are reasonable sanity checks + if (fp() == 0 || (intptr_t(fp()) & (wordSize-1)) != 0) { + return false; + } + if (sp() == 0 || (intptr_t(sp()) & (wordSize-1)) != 0) { + return false; + } + int min_frame_slots = (abi_minframe_size + ijava_state_size) / sizeof(intptr_t); + if (fp() - min_frame_slots < sp()) { + return false; + } + // These are hacks to keep us out of trouble. + // The problem with these is that they mask other problems + if (fp() <= sp()) { // this attempts to deal with unsigned comparison above + return false; + } + + // do some validation of frame elements + + // first the method + + Method* m = *interpreter_frame_method_addr(); + + // validate the method we'd find in this potential sender + if (!Method::is_valid_method(m)) return false; + + // stack frames shouldn't be much larger than max_stack elements + // this test requires the use of unextended_sp which is the sp as seen by + // the current frame, and not sp which is the "raw" pc which could point + // further because of local variables of the callee method inserted after + // method arguments + if (fp() - unextended_sp() > 1024 + m->max_stack()*Interpreter::stackElementSize) { + return false; + } + + // validate bci/bcx + + address bcp = interpreter_frame_bcp(); + if (m->validate_bci_from_bcp(bcp) < 0) { + return false; + } + + // validate constantPoolCache* + ConstantPoolCache* cp = *interpreter_frame_cache_addr(); + if (MetaspaceObj::is_valid(cp) == false) return false; + + // validate locals + + address locals = (address) *interpreter_frame_locals_addr(); + + if (locals > thread->stack_base() || locals < (address) fp()) return false; + + // We'd have to be pretty unlucky to be mislead at this point return true; } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/s390/frame_s390.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/s390/frame_s390.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/s390/frame_s390.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/s390/frame_s390.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016, 2019, SAP SE. All rights reserved. + * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2022 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -124,8 +124,8 @@ return false; } - z_abi_160* sender_abi = (z_abi_160*) fp; - intptr_t* sender_sp = (intptr_t*) sender_abi->callers_sp; + z_abi_16* sender_abi = (z_abi_16*) fp; + intptr_t* sender_sp = (intptr_t*) fp; address sender_pc = (address) sender_abi->return_pc; // We must always be able to find a recognizable pc. @@ -149,7 +149,7 @@ // sender_fp must be within the stack and above (but not // equal) current frame's fp. if (sender_fp > thread->stack_base() || sender_fp <= fp) { - return false; + return false; } // If the potential sender is the interpreter then we can do some more checking. @@ -295,8 +295,58 @@ } bool frame::is_interpreted_frame_valid(JavaThread* thread) const { - // Is there anything to do? assert(is_interpreted_frame(), "Not an interpreted frame"); + // These are reasonable sanity checks + if (fp() == 0 || (intptr_t(fp()) & (wordSize-1)) != 0) { + return false; + } + if (sp() == 0 || (intptr_t(sp()) & (wordSize-1)) != 0) { + return false; + } + int min_frame_slots = (z_abi_16_size + z_ijava_state_size) / sizeof(intptr_t); + if (fp() - min_frame_slots < sp()) { + return false; + } + // These are hacks to keep us out of trouble. + // The problem with these is that they mask other problems + if (fp() <= sp()) { // this attempts to deal with unsigned comparison above + return false; + } + + // do some validation of frame elements + + // first the method + // Need to use "unchecked" versions to avoid "z_istate_magic_number" assertion. + Method* m = (Method*)(ijava_state_unchecked()->method); + + // validate the method we'd find in this potential sender + if (!Method::is_valid_method(m)) return false; + + // stack frames shouldn't be much larger than max_stack elements + // this test requires the use of unextended_sp which is the sp as seen by + // the current frame, and not sp which is the "raw" pc which could point + // further because of local variables of the callee method inserted after + // method arguments + if (fp() - unextended_sp() > 1024 + m->max_stack()*Interpreter::stackElementSize) { + return false; + } + + // validate bci/bcx + address bcp = (address)(ijava_state_unchecked()->bcp); + if (m->validate_bci_from_bcp(bcp) < 0) { + return false; + } + + // validate constantPoolCache* + ConstantPoolCache* cp = (ConstantPoolCache*)(ijava_state_unchecked()->cpoolCache); + if (MetaspaceObj::is_valid(cp) == false) return false; + + // validate locals + address locals = (address)(ijava_state_unchecked()->locals); + + if (locals > thread->stack_base() || locals < (address) fp()) return false; + + // We'd have to be pretty unlucky to be mislead at this point return true; } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/x86/assembler_x86.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/x86/assembler_x86.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/x86/assembler_x86.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/x86/assembler_x86.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -186,7 +186,7 @@ // Address. An index of 4 (rsp) corresponds to having no index, so convert // that to noreg for the Address constructor. Address Address::make_raw(int base, int index, int scale, int disp, relocInfo::relocType disp_reloc) { - RelocationHolder rspec; + RelocationHolder rspec = RelocationHolder::none; if (disp_reloc != relocInfo::none) { rspec = Relocation::spec_simple(disp_reloc); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -153,14 +153,15 @@ method = getMethodFromHotSpotMethod(hotspot_method()); } #endif + NativeCall* call = NULL; switch (_next_call_type) { case INLINE_INVOKE: - break; + return; case INVOKEVIRTUAL: case INVOKEINTERFACE: { assert(method == NULL || !method->is_static(), "cannot call static method with invokeinterface"); - NativeCall* call = nativeCall_at(_instructions->start() + pc_offset); + call = nativeCall_at(_instructions->start() + pc_offset); call->set_destination(SharedRuntime::get_resolve_virtual_call_stub()); _instructions->relocate(call->instruction_address(), virtual_call_Relocation::spec(_invoke_mark_pc), @@ -170,7 +171,7 @@ case INVOKESTATIC: { assert(method == NULL || method->is_static(), "cannot call non-static method with invokestatic"); - NativeCall* call = nativeCall_at(_instructions->start() + pc_offset); + call = nativeCall_at(_instructions->start() + pc_offset); call->set_destination(SharedRuntime::get_resolve_static_call_stub()); _instructions->relocate(call->instruction_address(), relocInfo::static_call_type, Assembler::call32_operand); @@ -178,15 +179,18 @@ } case INVOKESPECIAL: { assert(method == NULL || !method->is_static(), "cannot call static method with invokespecial"); - NativeCall* call = nativeCall_at(_instructions->start() + pc_offset); + call = nativeCall_at(_instructions->start() + pc_offset); call->set_destination(SharedRuntime::get_resolve_opt_virtual_call_stub()); _instructions->relocate(call->instruction_address(), relocInfo::opt_virtual_call_type, Assembler::call32_operand); break; } default: - JVMCI_ERROR("invalid _next_call_type value"); - break; + JVMCI_ERROR("invalid _next_call_type value: %d", _next_call_type); + return; + } + if (!call->is_displacement_aligned()) { + JVMCI_ERROR("unaligned displacement for call at offset %d", pc_offset); } } diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/x86/nativeInst_x86.cpp openjdk-11-11.0.15+10/src/hotspot/cpu/x86/nativeInst_x86.cpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/x86/nativeInst_x86.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/x86/nativeInst_x86.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -241,6 +241,9 @@ } +bool NativeCall::is_displacement_aligned() { + return (uintptr_t) displacement_address() % 4 == 0; +} // Similar to replace_mt_safe, but just changes the destination. The // important thing is that free-running threads are able to execute this @@ -264,16 +267,15 @@ // Both C1 and C2 should now be generating code which aligns the patched address // to be within a single cache line except that C1 does not do the alignment on // uniprocessor systems. - bool is_aligned = ((uintptr_t)displacement_address() + 0) / cache_line_size == - ((uintptr_t)displacement_address() + 3) / cache_line_size; + bool is_aligned = is_displacement_aligned(); guarantee(!os::is_MP() || is_aligned, "destination must be aligned"); if (is_aligned) { // Simple case: The destination lies within a single cache line. set_destination(dest); - } else if ((uintptr_t)instruction_address() / cache_line_size == - ((uintptr_t)instruction_address()+1) / cache_line_size) { + } else if ((uintptr_t)instruction_address() / 4 == + ((uintptr_t)instruction_address()+1) / 4) { // Tricky case: The instruction prefix lies within a single cache line. intptr_t disp = dest - return_address(); #ifdef AMD64 diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/x86/nativeInst_x86.hpp openjdk-11-11.0.15+10/src/hotspot/cpu/x86/nativeInst_x86.hpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/x86/nativeInst_x86.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/x86/nativeInst_x86.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -163,8 +163,6 @@ return_address_offset = 5 }; - enum { cache_line_size = BytesPerWord }; // conservative estimate! - address instruction_address() const { return addr_at(instruction_offset); } address next_instruction_address() const { return addr_at(return_address_offset); } int displacement() const { return (jint) int_at(displacement_offset); } @@ -178,9 +176,11 @@ #endif // AMD64 set_int_at(displacement_offset, dest - return_address()); } + // Returns whether the 4-byte displacement operand is 4-byte aligned. + bool is_displacement_aligned(); void set_destination_mt_safe(address dest); - void verify_alignment() { assert((intptr_t)addr_at(displacement_offset) % BytesPerInt == 0, "must be aligned"); } + void verify_alignment() { assert(is_displacement_aligned(), "displacement of call is not aligned"); } void verify(); void print(); diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/x86/x86.ad openjdk-11-11.0.15+10/src/hotspot/cpu/x86/x86.ad --- openjdk-11-11.0.14+9/src/hotspot/cpu/x86/x86.ad 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/x86/x86.ad 2022-04-19 19:38:30.000000000 +0000 @@ -1491,6 +1491,21 @@ if (UseSSE < 4) ret_value = false; break; + case Op_SqrtF: + if (UseSSE < 1) { + return false; + } + break; + case Op_SqrtD: +#ifdef _LP64 + if (UseSSE < 2) { + return false; + } +#else + // x86_32.ad has a special match rule for SqrtD. + // Together with common x86 rules, this handles all UseSSE cases. +#endif + break; } return ret_value; // Per default match rules are supported. diff -Nru openjdk-11-11.0.14+9/src/hotspot/cpu/zero/globals_zero.hpp openjdk-11-11.0.15+10/src/hotspot/cpu/zero/globals_zero.hpp --- openjdk-11-11.0.14+9/src/hotspot/cpu/zero/globals_zero.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/cpu/zero/globals_zero.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -77,8 +77,7 @@ define_pd_global(bool, PreserveFramePointer, false); -// No performance work done here yet. -define_pd_global(bool, CompactStrings, false); +define_pd_global(bool, CompactStrings, true); define_pd_global(bool, ThreadLocalHandshakes, false); diff -Nru openjdk-11-11.0.14+9/src/hotspot/os/bsd/os_bsd.cpp openjdk-11-11.0.15+10/src/hotspot/os/bsd/os_bsd.cpp --- openjdk-11-11.0.14+9/src/hotspot/os/bsd/os_bsd.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os/bsd/os_bsd.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -22,6 +22,16 @@ * */ +/* + * On macOS MAP_JIT cannot be used in conjunction with MAP_FIXED when mapping + * a page for codecache. Therefore our traditional technique of doing commit + * and uncommit - replacing a mapping with another one at the same address + * range but swapped MAP_NORESERVE - does not work. + * The "exec" flag basically means "its code cache" and it should be used + * consistently for the same mapping (reserve-commit-uncommit etc) + * This affects pd_reserve_memory, pd_commit_memory, pd_uncommit_memory functions + */ + // no precompiled headers #include "jvm.h" #include "classfile/classLoader.hpp" @@ -229,6 +239,8 @@ static char cpu_arch[] = "amd64"; #elif defined(ARM) static char cpu_arch[] = "arm"; +#elif defined(AARCH64) +static char cpu_arch[] = "aarch64"; #elif defined(PPC32) static char cpu_arch[] = "ppc"; #elif defined(SPARC) @@ -468,7 +480,9 @@ } } Arguments::set_java_home(buf); - set_boot_path('/', ':'); + if (!set_boot_path('/', ':')) { + vm_exit_during_initialization("Failed setting boot class path.", NULL); + } } // Where to look for native libraries. @@ -2005,12 +2019,25 @@ // problem. bool os::pd_commit_memory(char* addr, size_t size, bool exec) { int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE; -#ifdef __OpenBSD__ +#if defined(__OpenBSD__) // XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD Events::log(NULL, "Protecting memory [" INTPTR_FORMAT "," INTPTR_FORMAT "] with protection modes %x", p2i(addr), p2i(addr+size), prot); if (::mprotect(addr, size, prot) == 0) { return true; } +#elif defined(__APPLE__) + if (exec) { + // Do not replace MAP_JIT mappings, see JDK-8234930 + if (::mprotect(addr, size, prot) == 0) { + return true; + } + } else { + uintptr_t res = (uintptr_t) ::mmap(addr, size, prot, + MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0); + if (res != (uintptr_t) MAP_FAILED) { + return true; + } + } #else uintptr_t res = (uintptr_t) ::mmap(addr, size, prot, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0); @@ -2089,11 +2116,23 @@ } -bool os::pd_uncommit_memory(char* addr, size_t size) { -#ifdef __OpenBSD__ +MACOS_ONLY(bool os::pd_uncommit_memory(char* addr, size_t size, bool executable)) +NOT_MACOS(bool os::pd_uncommit_memory(char* addr, size_t size)) { +#if defined(__OpenBSD__) // XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD Events::log(NULL, "Protecting memory [" INTPTR_FORMAT "," INTPTR_FORMAT "] with PROT_NONE", p2i(addr), p2i(addr+size)); return ::mprotect(addr, size, PROT_NONE) == 0; +#elif defined(__APPLE__) + if (executable) { + if (::madvise(addr, size, MADV_FREE) != 0) { + return false; + } + return ::mprotect(addr, size, PROT_NONE) == 0; + } else { + uintptr_t res = (uintptr_t) ::mmap(addr, size, PROT_NONE, + MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0); + return res != (uintptr_t) MAP_FAILED; + } #else uintptr_t res = (uintptr_t) ::mmap(addr, size, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0); @@ -2117,11 +2156,17 @@ // 'requested_addr' is only treated as a hint, the return value may or // may not start from the requested address. Unlike Bsd mmap(), this // function returns NULL to indicate failure. -static char* anon_mmap(char* requested_addr, size_t bytes, bool fixed) { +static char* anon_mmap(char* requested_addr, size_t bytes, bool fixed, bool executable = false) { char * addr; int flags; flags = MAP_PRIVATE | MAP_NORESERVE | MAP_ANONYMOUS; +#ifdef __APPLE__ + if (executable) { + guarantee(!fixed, "MAP_JIT (for execute) is incompatible with MAP_FIXED"); + flags |= MAP_JIT; + } +#endif if (fixed) { assert((uintptr_t)requested_addr % os::Bsd::page_size() == 0, "unaligned address"); flags |= MAP_FIXED; @@ -2140,10 +2185,18 @@ return ::munmap(addr, size) == 0; } +#if defined(__APPLE__) +char* os::pd_reserve_memory(size_t bytes, char* requested_addr, + size_t alignment_hint, + bool executable) { + return anon_mmap(requested_addr, bytes, (requested_addr != NULL), executable); +} +#else char* os::pd_reserve_memory(size_t bytes, char* requested_addr, size_t alignment_hint) { return anon_mmap(requested_addr, bytes, (requested_addr != NULL)); } +#endif bool os::pd_release_memory(char* addr, size_t size) { return anon_munmap(addr, size); @@ -3018,20 +3071,17 @@ set_signal_handler(SIGXFSZ, true); #if defined(__APPLE__) - // In Mac OS X 10.4, CrashReporter will write a crash log for all 'fatal' signals, including - // signals caught and handled by the JVM. To work around this, we reset the mach task - // signal handler that's placed on our process by CrashReporter. This disables - // CrashReporter-based reporting. - // - // This work-around is not necessary for 10.5+, as CrashReporter no longer intercedes - // on caught fatal signals. - // - // Additionally, gdb installs both standard BSD signal handlers, and mach exception - // handlers. By replacing the existing task exception handler, we disable gdb's mach + // lldb (gdb) installs both standard BSD signal handlers, and mach exception + // handlers. By replacing the existing task exception handler, we disable lldb's mach // exception handling, while leaving the standard BSD signal handlers functional. + // + // EXC_MASK_BAD_ACCESS needed by all architectures for NULL ptr checking + // EXC_MASK_ARITHMETIC needed by all architectures for div by 0 checking + // EXC_MASK_BAD_INSTRUCTION needed by aarch64 to initiate deoptimization kern_return_t kr; kr = task_set_exception_ports(mach_task_self(), - EXC_MASK_BAD_ACCESS | EXC_MASK_ARITHMETIC, + EXC_MASK_BAD_ACCESS | EXC_MASK_ARITHMETIC + AARCH64_ONLY(| EXC_MASK_BAD_INSTRUCTION), MACH_PORT_NULL, EXCEPTION_STATE_IDENTITY, MACHINE_THREAD_STATE); diff -Nru openjdk-11-11.0.14+9/src/hotspot/os/linux/os_linux.cpp openjdk-11-11.0.15+10/src/hotspot/os/linux/os_linux.cpp --- openjdk-11-11.0.14+9/src/hotspot/os/linux/os_linux.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os/linux/os_linux.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -158,6 +158,11 @@ const char * os::Linux::_glibc_version = NULL; const char * os::Linux::_libpthread_version = NULL; +#ifdef __GLIBC__ +os::Linux::mallinfo_func_t os::Linux::_mallinfo = NULL; +os::Linux::mallinfo2_func_t os::Linux::_mallinfo2 = NULL; +#endif // __GLIBC__ + static jlong initial_time_count=0; static int clock_tics_per_sec = 100; @@ -2345,19 +2350,25 @@ // Print glibc outstanding allocations. // (note: there is no implementation of mallinfo for muslc) #ifdef __GLIBC__ - struct mallinfo mi = ::mallinfo(); - - // mallinfo is an old API. Member names mean next to nothing and, beyond that, are int. - // So values may have wrapped around. Still useful enough to see how much glibc thinks - // we allocated. - const size_t total_allocated = (size_t)(unsigned)mi.uordblks; - st->print("C-Heap outstanding allocations: " SIZE_FORMAT "K", total_allocated / K); - // Since mallinfo members are int, glibc values may have wrapped. Warn about this. - if ((vmrss * K) > UINT_MAX && (vmrss * K) > (total_allocated + UINT_MAX)) { - st->print(" (may have wrapped)"); + size_t total_allocated = 0; + bool might_have_wrapped = false; + if (_mallinfo2 != NULL) { + struct glibc_mallinfo2 mi = _mallinfo2(); + total_allocated = mi.uordblks; + } else if (_mallinfo != NULL) { + // mallinfo is an old API. Member names mean next to nothing and, beyond that, are int. + // So values may have wrapped around. Still useful enough to see how much glibc thinks + // we allocated. + struct glibc_mallinfo mi = _mallinfo(); + total_allocated = (size_t)(unsigned)mi.uordblks; + // Since mallinfo members are int, glibc values may have wrapped. Warn about this. + might_have_wrapped = (vmrss * K) > UINT_MAX && (vmrss * K) > (total_allocated + UINT_MAX); + } + if (_mallinfo2 != NULL || _mallinfo != NULL) { + st->print_cr("C-Heap outstanding allocations: " SIZE_FORMAT "K%s", + total_allocated / K, + might_have_wrapped ? " (may have wrapped)" : ""); } - st->cr(); - #endif // __GLIBC__ } @@ -3214,8 +3225,26 @@ return dlvsym(handle, name, "libnuma_1.2"); } +// Check numa dependent syscalls +static bool numa_syscall_check() { + // NUMA APIs depend on several syscalls. E.g., get_mempolicy is required for numa_get_membind and + // numa_get_interleave_mask. But these dependent syscalls can be unsupported for various reasons. + // Especially in dockers, get_mempolicy is not allowed with the default configuration. So it's necessary + // to check whether the syscalls are available. Currently, only get_mempolicy is checked since checking + // others like mbind would cause unexpected side effects. +#ifdef SYS_get_mempolicy + int dummy = 0; + if (syscall(SYS_get_mempolicy, &dummy, NULL, 0, (void*)&dummy, 3) == -1) { + return false; + } +#endif + + return true; +} + bool os::Linux::libnuma_init() { - if (sched_getcpu() != -1) { // Requires sched_getcpu() support + // Requires sched_getcpu() and numa dependent syscalls support + if ((sched_getcpu() != -1) && numa_syscall_check()) { void *handle = dlopen("libnuma.so.1", RTLD_LAZY); if (handle != NULL) { set_numa_node_to_cpus(CAST_TO_FN_PTR(numa_node_to_cpus_func_t, @@ -5244,6 +5273,11 @@ Linux::initialize_os_info(); +#ifdef __GLIBC__ + Linux::_mallinfo = CAST_TO_FN_PTR(Linux::mallinfo_func_t, dlsym(RTLD_DEFAULT, "mallinfo")); + Linux::_mallinfo2 = CAST_TO_FN_PTR(Linux::mallinfo2_func_t, dlsym(RTLD_DEFAULT, "mallinfo2")); +#endif // __GLIBC__ + os::Linux::CPUPerfTicks pticks; bool res = os::Linux::get_tick_information(&pticks, -1); diff -Nru openjdk-11-11.0.14+9/src/hotspot/os/linux/os_linux.hpp openjdk-11-11.0.15+10/src/hotspot/os/linux/os_linux.hpp --- openjdk-11-11.0.14+9/src/hotspot/os/linux/os_linux.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os/linux/os_linux.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -278,6 +278,41 @@ static void set_numa_all_nodes_ptr(struct bitmask **ptr) { _numa_all_nodes_ptr = (ptr == NULL ? NULL : *ptr); } static void set_numa_nodes_ptr(struct bitmask **ptr) { _numa_nodes_ptr = (ptr == NULL ? NULL : *ptr); } static int sched_getcpu_syscall(void); + +#ifdef __GLIBC__ + struct glibc_mallinfo { + int arena; + int ordblks; + int smblks; + int hblks; + int hblkhd; + int usmblks; + int fsmblks; + int uordblks; + int fordblks; + int keepcost; + }; + + struct glibc_mallinfo2 { + size_t arena; + size_t ordblks; + size_t smblks; + size_t hblks; + size_t hblkhd; + size_t usmblks; + size_t fsmblks; + size_t uordblks; + size_t fordblks; + size_t keepcost; + }; + + typedef struct glibc_mallinfo (*mallinfo_func_t)(void); + typedef struct glibc_mallinfo2 (*mallinfo2_func_t)(void); + + static mallinfo_func_t _mallinfo; + static mallinfo2_func_t _mallinfo2; +#endif + public: static int sched_getcpu() { return _sched_getcpu != NULL ? _sched_getcpu() : -1; } static int numa_node_to_cpus(int node, unsigned long *buffer, int bufferlen) { diff -Nru openjdk-11-11.0.14+9/src/hotspot/os/windows/os_windows.cpp openjdk-11-11.0.15+10/src/hotspot/os/windows/os_windows.cpp --- openjdk-11-11.0.14+9/src/hotspot/os/windows/os_windows.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os/windows/os_windows.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -610,6 +610,9 @@ return false; } + // Initial state is ALLOCATED but not INITIALIZED + osthread->set_state(ALLOCATED); + // Initialize support for Java interrupts HANDLE interrupt_event = CreateEvent(NULL, true, false, NULL); if (interrupt_event == NULL) { @@ -701,7 +704,7 @@ osthread->set_thread_handle(thread_handle); osthread->set_thread_id(thread_id); - // Initial thread state is INITIALIZED, not SUSPENDED + // Thread state now is INITIALIZED, not SUSPENDED osthread->set_state(INITIALIZED); // The thread is returned suspended (in state INITIALIZED), and is started higher up in the call chain diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/aix_ppc/orderAccess_aix_ppc.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/aix_ppc/orderAccess_aix_ppc.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/aix_ppc/orderAccess_aix_ppc.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/aix_ppc/orderAccess_aix_ppc.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -82,7 +82,7 @@ struct OrderAccess::PlatformOrderedLoad { template - T operator()(const volatile T* p) const { register T t = Atomic::load(p); inlasm_acquire_reg(t); return t; } + T operator()(const volatile T* p) const { T t = Atomic::load(p); inlasm_acquire_reg(t); return t; } }; #undef inlasm_sync diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -152,7 +152,9 @@ // method returns the Java sender of the current frame. *fr = os::fetch_frame_from_context(uc); if (!fr->is_first_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. *fr = fr->java_sender(); } } else { @@ -169,7 +171,7 @@ address lr = ucontext_get_lr(uc); *fr = frame(sp, lr); if (!fr->is_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // See java_sender() comment above. assert(!fr->is_first_frame(), "Safety check"); *fr = fr->java_sender(); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/atomic_bsd_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/atomic_bsd_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/atomic_bsd_aarch64.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/atomic_bsd_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,82 @@ +/* + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_BSD_AARCH64_VM_ATOMIC_BSD_AARCH64_HPP +#define OS_CPU_BSD_AARCH64_VM_ATOMIC_BSD_AARCH64_HPP + +// Implementation of class atomic +// Note that memory_order_conservative requires a full barrier after atomic stores. +// See https://patchwork.kernel.org/patch/3575821/ + +#define FULL_MEM_BARRIER __sync_synchronize() +#define READ_MEM_BARRIER __atomic_thread_fence(__ATOMIC_ACQUIRE); +#define WRITE_MEM_BARRIER __atomic_thread_fence(__ATOMIC_RELEASE); + +template +struct Atomic::PlatformAdd + : Atomic::AddAndFetch > +{ + template + D add_and_fetch(I add_value, D volatile* dest, atomic_memory_order order) const { + D res = __atomic_add_fetch(dest, add_value, __ATOMIC_RELEASE); + FULL_MEM_BARRIER; + return res; + } +}; + +template +template +inline T Atomic::PlatformXchg::operator()(T exchange_value, + T volatile* dest, + atomic_memory_order order) const { + STATIC_ASSERT(byte_size == sizeof(T)); + T res = __atomic_exchange_n(dest, exchange_value, __ATOMIC_RELEASE); + FULL_MEM_BARRIER; + return res; +} + +template +template +inline T Atomic::PlatformCmpxchg::operator()(T exchange_value, + T volatile* dest, + T compare_value, + atomic_memory_order order) const { + STATIC_ASSERT(byte_size == sizeof(T)); + if (order == memory_order_relaxed) { + T value = compare_value; + __atomic_compare_exchange(dest, &value, &exchange_value, /*weak*/false, + __ATOMIC_RELAXED, __ATOMIC_RELAXED); + return value; + } else { + T value = compare_value; + FULL_MEM_BARRIER; + __atomic_compare_exchange(dest, &value, &exchange_value, /*weak*/false, + __ATOMIC_RELAXED, __ATOMIC_RELAXED); + FULL_MEM_BARRIER; + return value; + } +} + +#endif // OS_CPU_BSD_AARCH64_VM_ATOMIC_BSD_AARCH64_HPP diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/bytes_bsd_aarch64.inline.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/bytes_bsd_aarch64.inline.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/bytes_bsd_aarch64.inline.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/bytes_bsd_aarch64.inline.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,55 @@ +/* + * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_BSD_AARCH64_VM_BYTES_BSD_AARCH64_INLINE_HPP +#define OS_CPU_BSD_AARCH64_VM_BYTES_BSD_AARCH64_INLINE_HPP + +#ifdef __APPLE__ +#include +#endif + +#if defined(__APPLE__) +# define bswap_16(x) OSSwapInt16(x) +# define bswap_32(x) OSSwapInt32(x) +# define bswap_64(x) OSSwapInt64(x) +#else +# error "Unimplemented" +#endif + +// Efficient swapping of data bytes from Java byte +// ordering to native byte ordering and vice versa. +inline u2 Bytes::swap_u2(u2 x) { + return bswap_16(x); +} + +inline u4 Bytes::swap_u4(u4 x) { + return bswap_32(x); +} + +inline u8 Bytes::swap_u8(u8 x) { + return bswap_64(x); +} + +#endif // OS_CPU_BSD_AARCH64_VM_BYTES_BSD_AARCH64_INLINE_HPP diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/copy_bsd_aarch64.inline.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/copy_bsd_aarch64.inline.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/copy_bsd_aarch64.inline.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/copy_bsd_aarch64.inline.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_BSD_AARCH64_VM_COPY_BSD_AARCH64_INLINE_HPP +#define OS_CPU_BSD_AARCH64_VM_COPY_BSD_AARCH64_INLINE_HPP + +#define COPY_SMALL(from, to, count) \ +{ \ + long tmp0, tmp1, tmp2, tmp3; \ + long tmp4, tmp5, tmp6, tmp7; \ + __asm volatile( \ +" adr %[t0], 0f;\n" \ +" add %[t0], %[t0], %[cnt], lsl #5;\n" \ +" br %[t0];\n" \ +" .align 5;\n" \ +"0:" \ +" b 1f;\n" \ +" .align 5;\n" \ +" ldr %[t0], [%[s], #0];\n" \ +" str %[t0], [%[d], #0];\n" \ +" b 1f;\n" \ +" .align 5;\n" \ +" ldp %[t0], %[t1], [%[s], #0];\n" \ +" stp %[t0], %[t1], [%[d], #0];\n" \ +" b 1f;\n" \ +" .align 5;\n" \ +" ldp %[t0], %[t1], [%[s], #0];\n" \ +" ldr %[t2], [%[s], #16];\n" \ +" stp %[t0], %[t1], [%[d], #0];\n" \ +" str %[t2], [%[d], #16];\n" \ +" b 1f;\n" \ +" .align 5;\n" \ +" ldp %[t0], %[t1], [%[s], #0];\n" \ +" ldp %[t2], %[t3], [%[s], #16];\n" \ +" stp %[t0], %[t1], [%[d], #0];\n" \ +" stp %[t2], %[t3], [%[d], #16];\n" \ +" b 1f;\n" \ +" .align 5;\n" \ +" ldp %[t0], %[t1], [%[s], #0];\n" \ +" ldp %[t2], %[t3], [%[s], #16];\n" \ +" ldr %[t4], [%[s], #32];\n" \ +" stp %[t0], %[t1], [%[d], #0];\n" \ +" stp %[t2], %[t3], [%[d], #16];\n" \ +" str %[t4], [%[d], #32];\n" \ +" b 1f;\n" \ +" .align 5;\n" \ +" ldp %[t0], %[t1], [%[s], #0];\n" \ +" ldp %[t2], %[t3], [%[s], #16];\n" \ +" ldp %[t4], %[t5], [%[s], #32];\n" \ +"2:" \ +" stp %[t0], %[t1], [%[d], #0];\n" \ +" stp %[t2], %[t3], [%[d], #16];\n" \ +" stp %[t4], %[t5], [%[d], #32];\n" \ +" b 1f;\n" \ +" .align 5;\n" \ +" ldr %[t6], [%[s], #0];\n" \ +" ldp %[t0], %[t1], [%[s], #8];\n" \ +" ldp %[t2], %[t3], [%[s], #24];\n" \ +" ldp %[t4], %[t5], [%[s], #40];\n" \ +" str %[t6], [%[d]], #8;\n" \ +" b 2b;\n" \ +" .align 5;\n" \ +" ldp %[t0], %[t1], [%[s], #0];\n" \ +" ldp %[t2], %[t3], [%[s], #16];\n" \ +" ldp %[t4], %[t5], [%[s], #32];\n" \ +" ldp %[t6], %[t7], [%[s], #48];\n" \ +" stp %[t0], %[t1], [%[d], #0];\n" \ +" stp %[t2], %[t3], [%[d], #16];\n" \ +" stp %[t4], %[t5], [%[d], #32];\n" \ +" stp %[t6], %[t7], [%[d], #48];\n" \ +"1:" \ + \ + : [s]"+r"(from), [d]"+r"(to), [cnt]"+r"(count), \ + [t0]"=&r"(tmp0), [t1]"=&r"(tmp1), [t2]"=&r"(tmp2), [t3]"=&r"(tmp3), \ + [t4]"=&r"(tmp4), [t5]"=&r"(tmp5), [t6]"=&r"(tmp6), [t7]"=&r"(tmp7) \ + : \ + : "memory", "cc"); \ +} + +static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) { + __asm volatile( "prfm pldl1strm, [%[s], #0];" :: [s]"r"(from) : "memory"); + if (__builtin_expect(count <= 8, 1)) { + COPY_SMALL(from, to, count); + return; + } + _Copy_conjoint_words(from, to, count); +} + +static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) { + if (__builtin_constant_p(count)) { + memcpy(to, from, count * sizeof(HeapWord)); + return; + } + __asm volatile( "prfm pldl1strm, [%[s], #0];" :: [s]"r"(from) : "memory"); + if (__builtin_expect(count <= 8, 1)) { + COPY_SMALL(from, to, count); + return; + } + _Copy_disjoint_words(from, to, count); +} + +static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) { + __asm volatile( "prfm pldl1strm, [%[s], #0];" :: [s]"r"(from) : "memory"); + if (__builtin_expect(count <= 8, 1)) { + COPY_SMALL(from, to, count); + return; + } + _Copy_disjoint_words(from, to, count); +} + +static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) { + pd_conjoint_words(from, to, count); +} + +static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) { + pd_disjoint_words(from, to, count); +} + +static void pd_conjoint_bytes(const void* from, void* to, size_t count) { + (void)memmove(to, from, count); +} + +static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) { + pd_conjoint_bytes(from, to, count); +} + +static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) { + _Copy_conjoint_jshorts_atomic(from, to, count); +} + +static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) { + _Copy_conjoint_jints_atomic(from, to, count); +} + +static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) { + _Copy_conjoint_jlongs_atomic(from, to, count); +} + +static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) { + assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size"); + _Copy_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count); +} + +static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) { + _Copy_arrayof_conjoint_bytes(from, to, count); +} + +static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) { + _Copy_arrayof_conjoint_jshorts(from, to, count); +} + +static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) { + _Copy_arrayof_conjoint_jints(from, to, count); +} + +static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) { + _Copy_arrayof_conjoint_jlongs(from, to, count); +} + +static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) { + assert(!UseCompressedOops, "foo!"); + assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size"); + _Copy_arrayof_conjoint_jlongs(from, to, count); +} + +#endif // OS_CPU_BSD_AARCH64_VM_COPY_BSD_AARCH64_INLINE_HPP diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/copy_bsd_aarch64.s openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/copy_bsd_aarch64.s --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/copy_bsd_aarch64.s 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/copy_bsd_aarch64.s 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,239 @@ +/* + * Copyright (c) 2016, Linaro Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#define CFUNC(x) _##x + + .global CFUNC(_Copy_conjoint_words) + .global CFUNC(_Copy_disjoint_words) + +s .req x0 +d .req x1 +count .req x2 +t0 .req x3 +t1 .req x4 +t2 .req x5 +t3 .req x6 +t4 .req x7 +t5 .req x8 +t6 .req x9 +t7 .req x10 + + .align 6 +CFUNC(_Copy_disjoint_words): + // Ensure 2 word aligned + tbz s, #3, fwd_copy_aligned + ldr t0, [s], #8 + str t0, [d], #8 + sub count, count, #1 + +fwd_copy_aligned: + // Bias s & d so we only pre index on the last copy + sub s, s, #16 + sub d, d, #16 + + ldp t0, t1, [s, #16] + ldp t2, t3, [s, #32] + ldp t4, t5, [s, #48] + ldp t6, t7, [s, #64]! + + subs count, count, #16 + blo fwd_copy_drain + +fwd_copy_again: + prfm pldl1keep, [s, #256] + stp t0, t1, [d, #16] + ldp t0, t1, [s, #16] + stp t2, t3, [d, #32] + ldp t2, t3, [s, #32] + stp t4, t5, [d, #48] + ldp t4, t5, [s, #48] + stp t6, t7, [d, #64]! + ldp t6, t7, [s, #64]! + subs count, count, #8 + bhs fwd_copy_again + +fwd_copy_drain: + stp t0, t1, [d, #16] + stp t2, t3, [d, #32] + stp t4, t5, [d, #48] + stp t6, t7, [d, #64]! + + // count is now -8..-1 for 0..7 words to copy + adr t0, 0f + add t0, t0, count, lsl #5 + br t0 + + .align 5 + ret // -8 == 0 words + .align 5 + ldr t0, [s, #16] // -7 == 1 word + str t0, [d, #16] + ret + .align 5 + ldp t0, t1, [s, #16] // -6 = 2 words + stp t0, t1, [d, #16] + ret + .align 5 + ldp t0, t1, [s, #16] // -5 = 3 words + ldr t2, [s, #32] + stp t0, t1, [d, #16] + str t2, [d, #32] + ret + .align 5 + ldp t0, t1, [s, #16] // -4 = 4 words + ldp t2, t3, [s, #32] + stp t0, t1, [d, #16] + stp t2, t3, [d, #32] + ret + .align 5 + ldp t0, t1, [s, #16] // -3 = 5 words + ldp t2, t3, [s, #32] + ldr t4, [s, #48] + stp t0, t1, [d, #16] + stp t2, t3, [d, #32] + str t4, [d, #48] + ret + .align 5 + ldp t0, t1, [s, #16] // -2 = 6 words + ldp t2, t3, [s, #32] + ldp t4, t5, [s, #48] + stp t0, t1, [d, #16] + stp t2, t3, [d, #32] + stp t4, t5, [d, #48] + ret + .align 5 + ldp t0, t1, [s, #16] // -1 = 7 words + ldp t2, t3, [s, #32] + ldp t4, t5, [s, #48] + ldr t6, [s, #64] + stp t0, t1, [d, #16] + stp t2, t3, [d, #32] + stp t4, t5, [d, #48] + str t6, [d, #64] + // Is always aligned here, code for 7 words is one instruction + // too large so it just falls through. + .align 5 +0: + ret + + .align 6 +CFUNC(_Copy_conjoint_words): + sub t0, d, s + cmp t0, count, lsl #3 + bhs CFUNC(_Copy_disjoint_words) + + add s, s, count, lsl #3 + add d, d, count, lsl #3 + + // Ensure 2 word aligned + tbz s, #3, bwd_copy_aligned + ldr t0, [s, #-8]! + str t0, [d, #-8]! + sub count, count, #1 + +bwd_copy_aligned: + ldp t0, t1, [s, #-16] + ldp t2, t3, [s, #-32] + ldp t4, t5, [s, #-48] + ldp t6, t7, [s, #-64]! + + subs count, count, #16 + blo bwd_copy_drain + +bwd_copy_again: + prfum pldl1keep, [s, #-256] + stp t0, t1, [d, #-16] + ldp t0, t1, [s, #-16] + stp t2, t3, [d, #-32] + ldp t2, t3, [s, #-32] + stp t4, t5, [d, #-48] + ldp t4, t5, [s, #-48] + stp t6, t7, [d, #-64]! + ldp t6, t7, [s, #-64]! + subs count, count, #8 + bhs bwd_copy_again + +bwd_copy_drain: + stp t0, t1, [d, #-16] + stp t2, t3, [d, #-32] + stp t4, t5, [d, #-48] + stp t6, t7, [d, #-64]! + + // count is now -8..-1 for 0..7 words to copy + adr t0, 0f + add t0, t0, count, lsl #5 + br t0 + + .align 5 + ret // -8 == 0 words + .align 5 + ldr t0, [s, #-8] // -7 == 1 word + str t0, [d, #-8] + ret + .align 5 + ldp t0, t1, [s, #-16] // -6 = 2 words + stp t0, t1, [d, #-16] + ret + .align 5 + ldp t0, t1, [s, #-16] // -5 = 3 words + ldr t2, [s, #-24] + stp t0, t1, [d, #-16] + str t2, [d, #-24] + ret + .align 5 + ldp t0, t1, [s, #-16] // -4 = 4 words + ldp t2, t3, [s, #-32] + stp t0, t1, [d, #-16] + stp t2, t3, [d, #-32] + ret + .align 5 + ldp t0, t1, [s, #-16] // -3 = 5 words + ldp t2, t3, [s, #-32] + ldr t4, [s, #-40] + stp t0, t1, [d, #-16] + stp t2, t3, [d, #-32] + str t4, [d, #-40] + ret + .align 5 + ldp t0, t1, [s, #-16] // -2 = 6 words + ldp t2, t3, [s, #-32] + ldp t4, t5, [s, #-48] + stp t0, t1, [d, #-16] + stp t2, t3, [d, #-32] + stp t4, t5, [d, #-48] + ret + .align 5 + ldp t0, t1, [s, #-16] // -1 = 7 words + ldp t2, t3, [s, #-32] + ldp t4, t5, [s, #-48] + ldr t6, [s, #-56] + stp t0, t1, [d, #-16] + stp t2, t3, [d, #-32] + stp t4, t5, [d, #-48] + str t6, [d, #-56] + // Is always aligned here, code for 7 words is one instruction + // too large so it just falls through. + .align 5 +0: + ret diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/globals_bsd_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/globals_bsd_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/globals_bsd_aarch64.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/globals_bsd_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_BSD_AARCH64_VM_GLOBALS_BSD_AARCH64_HPP +#define OS_CPU_BSD_AARCH64_VM_GLOBALS_BSD_AARCH64_HPP + +// Sets the default values for platform dependent flags used by the runtime system. +// (see globals.hpp) + +define_pd_global(bool, DontYieldALot, false); +define_pd_global(intx, ThreadStackSize, 2048); // 0 => use system default +define_pd_global(intx, VMThreadStackSize, 2048); + +define_pd_global(intx, CompilerThreadStackSize, 2048); + +define_pd_global(uintx,JVMInvokeMethodSlack, 8192); + +// Used on 64 bit platforms for UseCompressedOops base address +define_pd_global(uintx,HeapBaseMinAddress, 2*G); + +#endif // OS_CPU_BSD_AARCH64_VM_GLOBALS_BSD_AARCH64_HPP diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/icache_bsd_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/icache_bsd_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/icache_bsd_aarch64.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/icache_bsd_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_BSD_AARCH64_ICACHE_AARCH64_HPP +#define OS_CPU_BSD_AARCH64_ICACHE_AARCH64_HPP + +// Interface for updating the instruction cache. Whenever the VM +// modifies code, part of the processor instruction cache potentially +// has to be flushed. + +class ICache : public AbstractICache { + public: + static void initialize(); + static void invalidate_word(address addr) { + __clear_cache((char *)addr, (char *)(addr + 4)); + } + static void invalidate_range(address start, int nbytes) { + __clear_cache((char *)start, (char *)(start + nbytes)); + } +}; + +#endif // OS_CPU_BSD_AARCH64_ICACHE_AARCH64_HPP \ No newline at end of file diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/orderAccess_bsd_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/orderAccess_bsd_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/orderAccess_bsd_aarch64.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/orderAccess_bsd_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_BSD_AARCH64_VM_ORDERACCESS_BSD_AARCH64_HPP +#define OS_CPU_BSD_AARCH64_VM_ORDERACCESS_BSD_AARCH64_HPP + +// Included in orderAccess.hpp header file. + +// Implementation of class OrderAccess. + +inline void OrderAccess::loadload() { acquire(); } +inline void OrderAccess::storestore() { release(); } +inline void OrderAccess::loadstore() { acquire(); } +inline void OrderAccess::storeload() { fence(); } + +#define FULL_MEM_BARRIER __sync_synchronize() +#define READ_MEM_BARRIER __atomic_thread_fence(__ATOMIC_ACQUIRE); +#define WRITE_MEM_BARRIER __atomic_thread_fence(__ATOMIC_RELEASE); + +inline void OrderAccess::acquire() { + READ_MEM_BARRIER; +} + +inline void OrderAccess::release() { + WRITE_MEM_BARRIER; +} + +inline void OrderAccess::fence() { + FULL_MEM_BARRIER; +} + +#endif // OS_CPU_BSD_AARCH64_VM_ORDERACCESS_BSD_AARCH64_HPP diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,753 @@ +/* + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +// no precompiled headers +#include "jvm.h" +#include "asm/macroAssembler.hpp" +#include "classfile/classLoader.hpp" +#include "classfile/systemDictionary.hpp" +#include "classfile/vmSymbols.hpp" +#include "code/codeCache.hpp" +#include "code/icBuffer.hpp" +#include "code/vtableStubs.hpp" +#include "interpreter/interpreter.hpp" +#include "logging/log.hpp" +#include "memory/allocation.inline.hpp" +#include "os_share_bsd.hpp" +#include "prims/jniFastGetField.hpp" +#include "prims/jvm_misc.hpp" +#include "runtime/arguments.hpp" +#include "runtime/extendedPC.hpp" +#include "runtime/frame.inline.hpp" +#include "runtime/interfaceSupport.inline.hpp" +#include "runtime/java.hpp" +#include "runtime/javaCalls.hpp" +#include "runtime/mutexLocker.hpp" +#include "runtime/osThread.hpp" +#include "runtime/sharedRuntime.hpp" +#include "runtime/stubRoutines.hpp" +#include "runtime/thread.inline.hpp" +#include "runtime/timer.hpp" +#include "utilities/align.hpp" +#include "utilities/events.hpp" +#include "utilities/vmError.hpp" + +// put OS-includes here +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#ifndef __OpenBSD__ + # include +#endif + +#if !defined(__APPLE__) && !defined(__NetBSD__) +# include +#endif + +#define SPELL_REG_SP "sp" +#define SPELL_REG_FP "fp" + +#ifdef __APPLE__ +// see darwin-xnu/osfmk/mach/arm/_structs.h + +// 10.5 UNIX03 member name prefixes +#define DU3_PREFIX(s, m) __ ## s.__ ## m +#endif + +#define context_x uc_mcontext->DU3_PREFIX(ss,x) +#define context_fp uc_mcontext->DU3_PREFIX(ss,fp) +#define context_lr uc_mcontext->DU3_PREFIX(ss,lr) +#define context_sp uc_mcontext->DU3_PREFIX(ss,sp) +#define context_pc uc_mcontext->DU3_PREFIX(ss,pc) +#define context_cpsr uc_mcontext->DU3_PREFIX(ss,cpsr) +#define context_esr uc_mcontext->DU3_PREFIX(es,esr) + +address os::current_stack_pointer() { +#if defined(__clang__) || defined(__llvm__) + void *sp; + __asm__("mov %0, " SPELL_REG_SP : "=r"(sp)); + return (address) sp; +#else + register void *sp __asm__ (SPELL_REG_SP); + return (address) sp; +#endif +} + +char* os::non_memory_address_word() { + // Must never look like an address returned by reserve_memory, + // even in its subfields (as defined by the CPU immediate fields, + // if the CPU splits constants across multiple instructions). + + // the return value used in computation of Universe::non_oop_word(), which + // is loaded by cpu/aarch64 by MacroAssembler::movptr(Register, uintptr_t) + return (char*) 0xffffffffffff; +} + +address os::Bsd::ucontext_get_pc(const ucontext_t * uc) { + return (address)uc->context_pc; +} + +void os::Bsd::ucontext_set_pc(ucontext_t * uc, address pc) { + uc->context_pc = (intptr_t)pc; +} + +intptr_t* os::Bsd::ucontext_get_sp(const ucontext_t * uc) { + return (intptr_t*)uc->context_sp; +} + +intptr_t* os::Bsd::ucontext_get_fp(const ucontext_t * uc) { + return (intptr_t*)uc->context_fp; +} + +// For Forte Analyzer AsyncGetCallTrace profiling support - thread +// is currently interrupted by SIGPROF. +// os::Solaris::fetch_frame_from_ucontext() tries to skip nested signal +// frames. Currently we don't do that on Linux, so it's the same as +// os::fetch_frame_from_context(). +ExtendedPC os::Bsd::fetch_frame_from_ucontext(Thread* thread, + const ucontext_t* uc, intptr_t** ret_sp, intptr_t** ret_fp) { + + assert(thread != NULL, "just checking"); + assert(ret_sp != NULL, "just checking"); + assert(ret_fp != NULL, "just checking"); + + return os::fetch_frame_from_context(uc, ret_sp, ret_fp); +} + +ExtendedPC os::fetch_frame_from_context(const void* ucVoid, + intptr_t** ret_sp, intptr_t** ret_fp) { + + ExtendedPC epc; + const ucontext_t* uc = (const ucontext_t*)ucVoid; + + if (uc != NULL) { + epc = ExtendedPC(os::Bsd::ucontext_get_pc(uc)); + if (ret_sp) *ret_sp = os::Bsd::ucontext_get_sp(uc); + if (ret_fp) *ret_fp = os::Bsd::ucontext_get_fp(uc); + } else { + // construct empty ExtendedPC for return value checking + epc = ExtendedPC(NULL); + if (ret_sp) *ret_sp = (intptr_t *)NULL; + if (ret_fp) *ret_fp = (intptr_t *)NULL; + } + + return epc; +} + +frame os::fetch_frame_from_context(const void* ucVoid) { + intptr_t* sp; + intptr_t* fp; + ExtendedPC epc = fetch_frame_from_context(ucVoid, &sp, &fp); + return frame(sp, fp, epc.pc()); +} + +bool os::Bsd::get_frame_at_stack_banging_point(JavaThread* thread, ucontext_t* uc, frame* fr) { + address pc = (address) os::Bsd::ucontext_get_pc(uc); + if (Interpreter::contains(pc)) { + // interpreter performs stack banging after the fixed frame header has + // been generated while the compilers perform it before. To maintain + // semantic consistency between interpreted and compiled frames, the + // method returns the Java sender of the current frame. + *fr = os::fetch_frame_from_context(uc); + if (!fr->is_first_java_frame()) { + assert(fr->safe_for_sender(thread), "Safety check"); + *fr = fr->java_sender(); + } + } else { + // more complex code with compiled code + assert(!Interpreter::contains(pc), "Interpreted methods should have been handled above"); + CodeBlob* cb = CodeCache::find_blob(pc); + if (cb == NULL || !cb->is_nmethod() || cb->is_frame_complete_at(pc)) { + // Not sure where the pc points to, fallback to default + // stack overflow handling + return false; + } else { + // In compiled code, the stack banging is performed before LR + // has been saved in the frame. LR is live, and SP and FP + // belong to the caller. + intptr_t* fp = os::Bsd::ucontext_get_fp(uc); + intptr_t* sp = os::Bsd::ucontext_get_sp(uc); + address pc = (address)(uc->context_lr + - NativeInstruction::instruction_size); + *fr = frame(sp, fp, pc); + if (!fr->is_java_frame()) { + assert(fr->safe_for_sender(thread), "Safety check"); + assert(!fr->is_first_frame(), "Safety check"); + *fr = fr->java_sender(); + } + } + } + assert(fr->is_java_frame(), "Safety check"); + return true; +} + +// JVM compiled with -fno-omit-frame-pointer, so RFP is saved on the stack. +frame os::get_sender_for_C_frame(frame* fr) { + return frame(fr->link(), fr->link(), fr->sender_pc()); +} + +NOINLINE frame os::current_frame() { + intptr_t *fp = *(intptr_t **)__builtin_frame_address(0); + frame myframe((intptr_t*)os::current_stack_pointer(), + (intptr_t*)fp, + CAST_FROM_FN_PTR(address, os::current_frame)); + if (os::is_first_C_frame(&myframe)) { + // stack is not walkable + return frame(); + } else { + return os::get_sender_for_C_frame(&myframe); + } +} + +// Utility functions +extern "C" JNIEXPORT int +JVM_handle_bsd_signal(int sig, + siginfo_t* info, + void* ucVoid, + int abort_if_unrecognized) { + ucontext_t* uc = (ucontext_t*) ucVoid; + + Thread* t = Thread::current_or_null_safe(); + + // Must do this before SignalHandlerMark, if crash protection installed we will longjmp away + // (no destructors can be run) + os::ThreadCrashProtection::check_crash_protection(sig, t); + + SignalHandlerMark shm(t); + + // Note: it's not uncommon that JNI code uses signal/sigset to install + // then restore certain signal handler (e.g. to temporarily block SIGPIPE, + // or have a SIGILL handler when detecting CPU type). When that happens, + // JVM_handle_bsd_signal() might be invoked with junk info/ucVoid. To + // avoid unnecessary crash when libjsig is not preloaded, try handle signals + // that do not require siginfo/ucontext first. + + if (sig == SIGPIPE || sig == SIGXFSZ) { + // allow chained handler to go first + if (os::Bsd::chained_handler(sig, info, ucVoid)) { + return true; + } else { + // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219 + return true; + } + } + +#ifdef CAN_SHOW_REGISTERS_ON_ASSERT + if ((sig == SIGSEGV || sig == SIGBUS) && info != NULL && info->si_addr == g_assert_poison) { + if (handle_assert_poison_fault(ucVoid, info->si_addr)) { + return 1; + } + } +#endif + + JavaThread* thread = NULL; + VMThread* vmthread = NULL; + if (os::Bsd::signal_handlers_are_installed) { + if (t != NULL ){ + if(t->is_Java_thread()) { + thread = (JavaThread*)t; + } + else if(t->is_VM_thread()){ + vmthread = (VMThread *)t; + } + } + } + + // Handle SafeFetch faults: + if (uc != NULL) { + address const pc = (address) os::Bsd::ucontext_get_pc(uc); + if (pc && StubRoutines::is_safefetch_fault(pc)) { + os::Bsd::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc)); + return 1; + } + } + + // decide if this trap can be handled by a stub + address stub = NULL; + + address pc = NULL; + + //%note os_trap_1 + if (info != NULL && uc != NULL && thread != NULL) { + pc = (address) os::Bsd::ucontext_get_pc(uc); + + // Handle ALL stack overflow variations here + if (sig == SIGSEGV || sig == SIGBUS) { + address addr = (address) info->si_addr; + + // check if fault address is within thread stack + if (thread->on_local_stack(addr)) { + ThreadWXEnable wx(WXWrite, thread); + // stack overflow + if (thread->in_stack_yellow_reserved_zone(addr)) { + if (thread->thread_state() == _thread_in_Java) { + if (thread->in_stack_reserved_zone(addr)) { + frame fr; + if (os::Bsd::get_frame_at_stack_banging_point(thread, uc, &fr)) { + assert(fr.is_java_frame(), "Must be a Java frame"); + frame activation = + SharedRuntime::look_for_reserved_stack_annotated_method(thread, fr); + if (activation.sp() != NULL) { + thread->disable_stack_reserved_zone(); + if (activation.is_interpreted_frame()) { + thread->set_reserved_stack_activation((address)( + activation.fp() + frame::interpreter_frame_initial_sp_offset)); + } else { + thread->set_reserved_stack_activation((address)activation.unextended_sp()); + } + return 1; + } + } + } + // Throw a stack overflow exception. Guard pages will be reenabled + // while unwinding the stack. + thread->disable_stack_yellow_reserved_zone(); + stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::STACK_OVERFLOW); + } else { + // Thread was in the vm or native code. Return and try to finish. + thread->disable_stack_yellow_reserved_zone(); + return 1; + } + } else if (thread->in_stack_red_zone(addr)) { + // Fatal red zone violation. Disable the guard pages and fall through + // to handle_unexpected_exception way down below. + thread->disable_stack_red_zone(); + tty->print_raw_cr("An irrecoverable stack overflow has occurred."); + } + } + } + + // We test if stub is already set (by the stack overflow code + // above) so it is not overwritten by the code that follows. This + // check is not required on other platforms, because on other + // platforms we check for SIGSEGV only or SIGBUS only, where here + // we have to check for both SIGSEGV and SIGBUS. + if (thread->thread_state() == _thread_in_Java && stub == NULL) { + // Java thread running in Java code => find exception handler if any + // a fault inside compiled code, the interpreter, or a stub + ThreadWXEnable wx(WXWrite, thread); + // Handle signal from NativeJump::patch_verified_entry(). + if ((sig == SIGILL) + && nativeInstruction_at(pc)->is_sigill_zombie_not_entrant()) { + if (TraceTraps) { + tty->print_cr("trap: zombie_not_entrant"); + } + stub = SharedRuntime::get_handle_wrong_method_stub(); + } else if ((sig == SIGSEGV || sig == SIGBUS) && os::is_poll_address((address)info->si_addr)) { + stub = SharedRuntime::get_poll_stub(pc); +#if defined(__APPLE__) + // 32-bit Darwin reports a SIGBUS for nearly all memory access exceptions. + // 64-bit Darwin may also use a SIGBUS (seen with compressed oops). + // Catching SIGBUS here prevents the implicit SIGBUS NULL check below from + // being called, so only do so if the implicit NULL check is not necessary. + } else if (sig == SIGBUS && MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) { +#else + } else if (sig == SIGBUS /* && info->si_code == BUS_OBJERR */) { +#endif + // BugId 4454115: A read from a MappedByteBuffer can fault + // here if the underlying file has been truncated. + // Do not crash the VM in such a case. + CodeBlob* cb = CodeCache::find_blob_unsafe(pc); + CompiledMethod* nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL; + if ((nm != NULL && nm->has_unsafe_access())) { + address next_pc = pc + NativeCall::instruction_size; + stub = SharedRuntime::handle_unsafe_access(thread, next_pc); + } + } + else + + if (sig == SIGFPE && + (info->si_code == FPE_INTDIV || info->si_code == FPE_FLTDIV)) { + stub = + SharedRuntime:: + continuation_for_implicit_exception(thread, + pc, + SharedRuntime:: + IMPLICIT_DIVIDE_BY_ZERO); +#ifdef __APPLE__ + } else if (sig == SIGFPE && info->si_code == FPE_NOOP) { + Unimplemented(); +#endif /* __APPLE__ */ + + } else if ((sig == SIGSEGV || sig == SIGBUS) && + !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) { + // Determination of interpreter/vtable stub/compiled code null exception + stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL); + } + } else if ((thread->thread_state() == _thread_in_vm || + thread->thread_state() == _thread_in_native) && + sig == SIGBUS && /* info->si_code == BUS_OBJERR && */ + thread->doing_unsafe_access()) { + address next_pc = pc + NativeCall::instruction_size; + stub = SharedRuntime::handle_unsafe_access(thread, next_pc); + } + + // jni_fast_GetField can trap at certain pc's if a GC kicks in + // and the heap gets shrunk before the field access. + if ((sig == SIGSEGV) || (sig == SIGBUS)) { + address addr = JNI_FastGetField::find_slowcase_pc(pc); + if (addr != (address)-1) { + stub = addr; + } + } + + // Check to see if we caught the safepoint code in the + // process of write protecting the memory serialization page. + // It write enables the page immediately after protecting it + // so we can just return to retry the write. + if ((sig == SIGSEGV) && + os::is_memory_serialize_page(thread, (address) info->si_addr)) { + // Block current thread until the memory serialize page permission restored. + os::block_on_serialize_page_trap(); + return true; + } + } + + if (stub != NULL) { + // save all thread context in case we need to restore it + if (thread != NULL) thread->set_saved_exception_pc(pc); + + os::Bsd::ucontext_set_pc(uc, stub); + return true; + } + + // signal-chaining + if (os::Bsd::chained_handler(sig, info, ucVoid)) { + return true; + } + + if (!abort_if_unrecognized) { + // caller wants another chance, so give it to him + return false; + } + + if (pc == NULL && uc != NULL) { + pc = os::Bsd::ucontext_get_pc(uc); + } + + // unmask current signal + sigset_t newset; + sigemptyset(&newset); + sigaddset(&newset, sig); + sigprocmask(SIG_UNBLOCK, &newset, NULL); + + VMError::report_and_die(t, sig, pc, info, ucVoid); + + ShouldNotReachHere(); + return true; // Mute compiler +} + +void os::Bsd::init_thread_fpu_state(void) { +} + +bool os::is_allocatable(size_t bytes) { + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +// thread stack + +// Minimum usable stack sizes required to get to user code. Space for +// HotSpot guard pages is added later. +size_t os::Posix::_compiler_thread_min_stack_allowed = 72 * K; +size_t os::Posix::_java_thread_min_stack_allowed = 72 * K; +size_t os::Posix::_vm_internal_thread_min_stack_allowed = 72 * K; + +// return default stack size for thr_type +size_t os::Posix::default_stack_size(os::ThreadType thr_type) { + // default stack size (compiler thread needs larger stack) + size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M); + return s; +} + +static void current_stack_region(address * bottom, size_t * size) { +#ifdef __APPLE__ + pthread_t self = pthread_self(); + void *stacktop = pthread_get_stackaddr_np(self); + *size = pthread_get_stacksize_np(self); + *bottom = (address) stacktop - *size; +#elif defined(__OpenBSD__) + stack_t ss; + int rslt = pthread_stackseg_np(pthread_self(), &ss); + + if (rslt != 0) + fatal("pthread_stackseg_np failed with error = %d", rslt); + + *bottom = (address)((char *)ss.ss_sp - ss.ss_size); + *size = ss.ss_size; +#else + pthread_attr_t attr; + + int rslt = pthread_attr_init(&attr); + + // JVM needs to know exact stack location, abort if it fails + if (rslt != 0) + fatal("pthread_attr_init failed with error = %d", rslt); + + rslt = pthread_attr_get_np(pthread_self(), &attr); + + if (rslt != 0) + fatal("pthread_attr_get_np failed with error = %d", rslt); + + if (pthread_attr_getstackaddr(&attr, (void **)bottom) != 0 || + pthread_attr_getstacksize(&attr, size) != 0) { + fatal("Can not locate current stack attributes!"); + } + + pthread_attr_destroy(&attr); +#endif + assert(os::current_stack_pointer() >= *bottom && + os::current_stack_pointer() < *bottom + *size, "just checking"); +} + +address os::current_stack_base() { + address bottom; + size_t size; + current_stack_region(&bottom, &size); + return (bottom + size); +} + +size_t os::current_stack_size() { + // stack size includes normal stack and HotSpot guard pages + address bottom; + size_t size; + current_stack_region(&bottom, &size); + return size; +} + +///////////////////////////////////////////////////////////////////////////// +// helper functions for fatal error handler + +void os::print_context(outputStream *st, const void *context) { + if (context == NULL) return; + + const ucontext_t *uc = (const ucontext_t*)context; + st->print_cr("Registers:"); + st->print( " x0=" INTPTR_FORMAT, (intptr_t)uc->context_x[ 0]); + st->print(" x1=" INTPTR_FORMAT, (intptr_t)uc->context_x[ 1]); + st->print(" x2=" INTPTR_FORMAT, (intptr_t)uc->context_x[ 2]); + st->print(" x3=" INTPTR_FORMAT, (intptr_t)uc->context_x[ 3]); + st->cr(); + st->print( " x4=" INTPTR_FORMAT, (intptr_t)uc->context_x[ 4]); + st->print(" x5=" INTPTR_FORMAT, (intptr_t)uc->context_x[ 5]); + st->print(" x6=" INTPTR_FORMAT, (intptr_t)uc->context_x[ 6]); + st->print(" x7=" INTPTR_FORMAT, (intptr_t)uc->context_x[ 7]); + st->cr(); + st->print( " x8=" INTPTR_FORMAT, (intptr_t)uc->context_x[ 8]); + st->print(" x9=" INTPTR_FORMAT, (intptr_t)uc->context_x[ 9]); + st->print(" x10=" INTPTR_FORMAT, (intptr_t)uc->context_x[10]); + st->print(" x11=" INTPTR_FORMAT, (intptr_t)uc->context_x[11]); + st->cr(); + st->print( "x12=" INTPTR_FORMAT, (intptr_t)uc->context_x[12]); + st->print(" x13=" INTPTR_FORMAT, (intptr_t)uc->context_x[13]); + st->print(" x14=" INTPTR_FORMAT, (intptr_t)uc->context_x[14]); + st->print(" x15=" INTPTR_FORMAT, (intptr_t)uc->context_x[15]); + st->cr(); + st->print( "x16=" INTPTR_FORMAT, (intptr_t)uc->context_x[16]); + st->print(" x17=" INTPTR_FORMAT, (intptr_t)uc->context_x[17]); + st->print(" x18=" INTPTR_FORMAT, (intptr_t)uc->context_x[18]); + st->print(" x19=" INTPTR_FORMAT, (intptr_t)uc->context_x[19]); + st->cr(); + st->print( "x20=" INTPTR_FORMAT, (intptr_t)uc->context_x[20]); + st->print(" x21=" INTPTR_FORMAT, (intptr_t)uc->context_x[21]); + st->print(" x22=" INTPTR_FORMAT, (intptr_t)uc->context_x[22]); + st->print(" x23=" INTPTR_FORMAT, (intptr_t)uc->context_x[23]); + st->cr(); + st->print( "x24=" INTPTR_FORMAT, (intptr_t)uc->context_x[24]); + st->print(" x25=" INTPTR_FORMAT, (intptr_t)uc->context_x[25]); + st->print(" x26=" INTPTR_FORMAT, (intptr_t)uc->context_x[26]); + st->print(" x27=" INTPTR_FORMAT, (intptr_t)uc->context_x[27]); + st->cr(); + st->print( "x28=" INTPTR_FORMAT, (intptr_t)uc->context_x[28]); + st->print(" fp=" INTPTR_FORMAT, (intptr_t)uc->context_fp); + st->print(" lr=" INTPTR_FORMAT, (intptr_t)uc->context_lr); + st->print(" sp=" INTPTR_FORMAT, (intptr_t)uc->context_sp); + st->cr(); + st->print( "pc=" INTPTR_FORMAT, (intptr_t)uc->context_pc); + st->print(" cpsr=" INTPTR_FORMAT, (intptr_t)uc->context_cpsr); + st->cr(); + + intptr_t *sp = (intptr_t *)os::Bsd::ucontext_get_sp(uc); + st->print_cr("Top of Stack: (sp=" INTPTR_FORMAT ")", (intptr_t)sp); + print_hex_dump(st, (address)sp, (address)(sp + 8*sizeof(intptr_t)), sizeof(intptr_t)); + st->cr(); + + // Note: it may be unsafe to inspect memory near pc. For example, pc may + // point to garbage if entry point in an nmethod is corrupted. Leave + // this at the end, and hope for the best. + address pc = os::Bsd::ucontext_get_pc(uc); + print_instructions(st, pc, sizeof(char)); + st->cr(); +} + +void os::print_register_info(outputStream *st, const void *context) { + if (context == NULL) return; + + const ucontext_t *uc = (const ucontext_t*)context; + + st->print_cr("Register to memory mapping:"); + st->cr(); + + // this is horrendously verbose but the layout of the registers in the + // context does not match how we defined our abstract Register set, so + // we can't just iterate through the gregs area + + // this is only for the "general purpose" registers + + st->print(" x0="); print_location(st, uc->context_x[ 0]); + st->print(" x1="); print_location(st, uc->context_x[ 1]); + st->print(" x2="); print_location(st, uc->context_x[ 2]); + st->print(" x3="); print_location(st, uc->context_x[ 3]); + st->print(" x4="); print_location(st, uc->context_x[ 4]); + st->print(" x5="); print_location(st, uc->context_x[ 5]); + st->print(" x6="); print_location(st, uc->context_x[ 6]); + st->print(" x7="); print_location(st, uc->context_x[ 7]); + st->print(" x8="); print_location(st, uc->context_x[ 8]); + st->print(" x9="); print_location(st, uc->context_x[ 9]); + st->print("x10="); print_location(st, uc->context_x[10]); + st->print("x11="); print_location(st, uc->context_x[11]); + st->print("x12="); print_location(st, uc->context_x[12]); + st->print("x13="); print_location(st, uc->context_x[13]); + st->print("x14="); print_location(st, uc->context_x[14]); + st->print("x15="); print_location(st, uc->context_x[15]); + st->print("x16="); print_location(st, uc->context_x[16]); + st->print("x17="); print_location(st, uc->context_x[17]); + st->print("x18="); print_location(st, uc->context_x[18]); + st->print("x19="); print_location(st, uc->context_x[19]); + st->print("x20="); print_location(st, uc->context_x[20]); + st->print("x21="); print_location(st, uc->context_x[21]); + st->print("x22="); print_location(st, uc->context_x[22]); + st->print("x23="); print_location(st, uc->context_x[23]); + st->print("x24="); print_location(st, uc->context_x[24]); + st->print("x25="); print_location(st, uc->context_x[25]); + st->print("x26="); print_location(st, uc->context_x[26]); + st->print("x27="); print_location(st, uc->context_x[27]); + st->print("x28="); print_location(st, uc->context_x[28]); + + st->cr(); +} + +void os::setup_fpu() { +} + +#ifndef PRODUCT +void os::verify_stack_alignment() { + assert(((intptr_t)os::current_stack_pointer() & (StackAlignmentInBytes-1)) == 0, "incorrect stack alignment"); +} +#endif + +int os::extra_bang_size_in_bytes() { + // AArch64 does not require the additional stack bang. + return 0; +} + +void os::current_thread_enable_wx(WXMode mode) { + pthread_jit_write_protect_np(mode == WXExec); +} + +extern "C" { + int SpinPause() { + return 0; + } + + void _Copy_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) { + if (from > to) { + const jshort *end = from + count; + while (from < end) + *(to++) = *(from++); + } + else if (from < to) { + const jshort *end = from; + from += count - 1; + to += count - 1; + while (from >= end) + *(to--) = *(from--); + } + } + void _Copy_conjoint_jints_atomic(const jint* from, jint* to, size_t count) { + if (from > to) { + const jint *end = from + count; + while (from < end) + *(to++) = *(from++); + } + else if (from < to) { + const jint *end = from; + from += count - 1; + to += count - 1; + while (from >= end) + *(to--) = *(from--); + } + } + void _Copy_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) { + if (from > to) { + const jlong *end = from + count; + while (from < end) + os::atomic_copy64(from++, to++); + } + else if (from < to) { + const jlong *end = from; + from += count - 1; + to += count - 1; + while (from >= end) + os::atomic_copy64(from--, to--); + } + } + + void _Copy_arrayof_conjoint_bytes(const HeapWord* from, + HeapWord* to, + size_t count) { + memmove(to, from, count); + } + void _Copy_arrayof_conjoint_jshorts(const HeapWord* from, + HeapWord* to, + size_t count) { + memmove(to, from, count * 2); + } + void _Copy_arrayof_conjoint_jints(const HeapWord* from, + HeapWord* to, + size_t count) { + memmove(to, from, count * 4); + } + void _Copy_arrayof_conjoint_jlongs(const HeapWord* from, + HeapWord* to, + size_t count) { + memmove(to, from, count * 8); + } +}; diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_BSD_AARCH64_VM_OS_BSD_AARCH64_HPP +#define OS_CPU_BSD_AARCH64_VM_OS_BSD_AARCH64_HPP + + static void setup_fpu(); + + static bool is_allocatable(size_t bytes); + + // Used to register dynamic code cache area with the OS + // Note: Currently only used in 64 bit Windows implementations + static bool register_code_area(char *low, char *high) { return true; } + + // Atomically copy 64 bits of data + static void atomic_copy64(const volatile void *src, volatile void *dst) { + *(jlong *) dst = *(const jlong *) src; + } + +#endif // OS_CPU_BSD_AARCH64_VM_OS_BSD_AARCH64_HPP diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/pauth_bsd_aarch64.inline.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/pauth_bsd_aarch64.inline.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/pauth_bsd_aarch64.inline.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/pauth_bsd_aarch64.inline.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021, Arm Limited. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_BSD_AARCH64_VM_PAUTH_BSD_AARCH64_INLINE_HPP +#define OS_CPU_BSD_AARCH64_VM_PAUTH_BSD_AARCH64_INLINE_HPP + +#ifdef __APPLE__ +#include +#endif + +// Only the PAC instructions in the NOP space can be used. This ensures the +// binaries work on systems without PAC. Write these instructions using their +// alternate "hint" instructions to ensure older compilers can still be used. +// For Apple, use the provided interface as this may provide additional +// optimization. + +#define XPACLRI "hint #0x7;" + +inline address pauth_strip_pointer(address ptr) { +#ifdef __APPLE__ + return ptrauth_strip(ptr, ptrauth_key_asib); +#else + register address result __asm__("x30") = ptr; + asm (XPACLRI : "+r"(result)); + return result; +#endif +} + +#undef XPACLRI + +#endif // OS_CPU_BSD_AARCH64_VM_PAUTH_BSD_AARCH64_INLINE_HPP + diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/prefetch_bsd_aarch64.inline.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/prefetch_bsd_aarch64.inline.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/prefetch_bsd_aarch64.inline.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/prefetch_bsd_aarch64.inline.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_BSD_AARCH64_VM_PREFETCH_BSD_AARCH64_INLINE_HPP +#define OS_CPU_BSD_AARCH64_VM_PREFETCH_BSD_AARCH64_INLINE_HPP + +#include "runtime/prefetch.hpp" + + +inline void Prefetch::read (void *loc, intx interval) { + if (interval >= 0) + asm("prfm PLDL1KEEP, [%0, %1]" : : "r"(loc), "r"(interval)); +} + +inline void Prefetch::write(void *loc, intx interval) { + if (interval >= 0) + asm("prfm PSTL1KEEP, [%0, %1]" : : "r"(loc), "r"(interval)); +} + +#endif // OS_CPU_BSD_AARCH64_VM_PREFETCH_BSD_AARCH64_INLINE_HPP diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/thread_bsd_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/thread_bsd_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/thread_bsd_aarch64.cpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/thread_bsd_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "memory/metaspaceShared.hpp" +#include "runtime/frame.inline.hpp" +#include "runtime/thread.inline.hpp" + +frame JavaThread::pd_last_frame() { + assert(has_last_Java_frame(), "must have last_Java_sp() when suspended"); + vmassert(_anchor.last_Java_pc() != NULL, "not walkable"); + return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc()); +} + +// For Forte Analyzer AsyncGetCallTrace profiling support - thread is +// currently interrupted by SIGPROF +bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, + void* ucontext, bool isInJava) { + + assert(Thread::current() == this, "caller must be current thread"); + return pd_get_top_frame(fr_addr, ucontext, isInJava); +} + +bool JavaThread::pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava) { + return pd_get_top_frame(fr_addr, ucontext, isInJava); +} + +bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava) { + assert(this->is_Java_thread(), "must be JavaThread"); + JavaThread* jt = (JavaThread *)this; + + // If we have a last_Java_frame, then we should use it even if + // isInJava == true. It should be more reliable than ucontext info. + if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) { + *fr_addr = jt->pd_last_frame(); + return true; + } + + // At this point, we don't have a last_Java_frame, so + // we try to glean some information out of the ucontext + // if we were running Java code when SIGPROF came in. + if (isInJava) { + ucontext_t* uc = (ucontext_t*) ucontext; + + intptr_t* ret_fp; + intptr_t* ret_sp; + ExtendedPC addr = os::fetch_frame_from_context(uc, &ret_sp, &ret_fp); + if (addr.pc() == NULL || ret_sp == NULL ) { + // ucontext wasn't useful + return false; + } + + if (MetaspaceShared::is_in_trampoline_frame(addr.pc())) { + // In the middle of a trampoline call. Bail out for safety. + // This happens rarely so shouldn't affect profiling. + return false; + } + + frame ret_frame(ret_sp, ret_fp, addr.pc()); + if (!ret_frame.safe_for_sender(jt)) { +#ifdef COMPILER2 + frame ret_frame2(ret_sp, NULL, addr.pc()); + if (!ret_frame2.safe_for_sender(jt)) { + // nothing else to try if the frame isn't good + return false; + } + ret_frame = ret_frame2; +#else + // nothing else to try if the frame isn't good + return false; +#endif /* COMPILER2 */ + } + *fr_addr = ret_frame; + return true; + } + + // nothing else to try + return false; +} + +void JavaThread::cache_global_variables() { } + diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/thread_bsd_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/thread_bsd_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/thread_bsd_aarch64.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/thread_bsd_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_BSD_AARCH64_VM_THREAD_BSD_AARCH64_HPP +#define OS_CPU_BSD_AARCH64_VM_THREAD_BSD_AARCH64_HPP + + private: + + void pd_initialize() { + _anchor.clear(); + } + + frame pd_last_frame(); + + public: + // Mutators are highly dangerous.... + intptr_t* last_Java_fp() { return _anchor.last_Java_fp(); } + void set_last_Java_fp(intptr_t* fp) { _anchor.set_last_Java_fp(fp); } + + void set_base_of_stack_pointer(intptr_t* base_sp) { + } + + static ByteSize last_Java_fp_offset() { + return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset(); + } + + intptr_t* base_of_stack_pointer() { + return NULL; + } + void record_base_of_stack_pointer() { + } + + bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, + bool isInJava); + + bool pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava); +private: + bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava); +public: + + static Thread *aarch64_get_thread_helper() { + return Thread::current(); + } + + // These routines are only used on cpu architectures that + // have separate register stacks (Itanium). + static bool register_stack_overflow() { return false; } + static void enable_register_stack_guard() {} + static void disable_register_stack_guard() {} + +#endif // OS_CPU_BSD_AARCH64_VM_THREAD_BSD_AARCH64_HPP diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/vmStructs_bsd_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/vmStructs_bsd_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/vmStructs_bsd_aarch64.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/vmStructs_bsd_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_BSD_AARCH64_VM_VMSTRUCTS_BSD_AARCH64_HPP +#define OS_CPU_BSD_AARCH64_VM_VMSTRUCTS_BSD_AARCH64_HPP + +// These are the OS and CPU-specific fields, types and integer +// constants required by the Serviceability Agent. This file is +// referenced by vmStructs.cpp. + +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ + \ + /******************************/ \ + /* Threads (NOTE: incomplete) */ \ + /******************************/ \ + nonstatic_field(OSThread, _thread_id, OSThread::thread_id_t) \ + nonstatic_field(OSThread, _unique_thread_id, uint64_t) + + +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \ + \ + /**********************/ \ + /* Thread IDs */ \ + /**********************/ \ + \ + declare_unsigned_integer_type(OSThread::thread_id_t) + +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) + +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) + +#endif // OS_CPU_BSD_AARCH64_VM_VMSTRUCTS_BSD_AARCH64_HPP diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/vm_version_bsd_aarch64.cpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/vm_version_bsd_aarch64.cpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_aarch64/vm_version_bsd_aarch64.cpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_aarch64/vm_version_bsd_aarch64.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "runtime/java.hpp" +#include "runtime/os.hpp" +#include "runtime/vm_version.hpp" +#include + +static bool cpu_has(const char* optional) { + uint32_t val; + size_t len = sizeof(val); + if (sysctlbyname(optional, &val, &len, NULL, 0)) { + return false; + } + return val; +} + +void VM_Version::get_os_cpu_info() { + size_t sysctllen; + + // hw.optional.floatingpoint always returns 1, see + // https://github.com/apple/darwin-xnu/blob/master/bsd/kern/kern_mib.c#L416. + // ID_AA64PFR0_EL1 describes AdvSIMD always equals to FP field. + assert(cpu_has("hw.optional.floatingpoint"), "should be"); + assert(cpu_has("hw.optional.neon"), "should be"); + _features = CPU_FP | CPU_ASIMD; + + // Only few features are available via sysctl, see line 614 + // https://opensource.apple.com/source/xnu/xnu-6153.141.1/bsd/kern/kern_mib.c.auto.html + if (cpu_has("hw.optional.armv8_crc32")) _features |= CPU_CRC32; + if (cpu_has("hw.optional.armv8_1_atomics")) _features |= CPU_LSE; + + int cache_line_size; + int hw_conf_cache_line[] = { CTL_HW, HW_CACHELINE }; + sysctllen = sizeof(cache_line_size); + if (sysctl(hw_conf_cache_line, 2, &cache_line_size, &sysctllen, NULL, 0)) { + cache_line_size = 16; + } + _icache_line_size = 16; // minimal line lenght CCSIDR_EL1 can hold + _dcache_line_size = cache_line_size; + + uint64_t dczid_el0; + __asm__ ( + "mrs %0, DCZID_EL0\n" + : "=r"(dczid_el0) + ); + if (!(dczid_el0 & 0x10)) { + _zva_length = 4 << (dczid_el0 & 0xf); + } + int family; + sysctllen = sizeof(family); + if (sysctlbyname("hw.cpufamily", &family, &sysctllen, NULL, 0)) { + family = 0; + } + _model = family; + _cpu = CPU_APPLE; +} + +#ifdef __APPLE__ + +bool VM_Version::is_cpu_emulated() { + return false; +} + +#endif \ No newline at end of file diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -278,11 +278,11 @@ address os::current_stack_pointer() { #if defined(__clang__) || defined(__llvm__) - register void *esp; + void *esp; __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp)); return (address) esp; #elif defined(SPARC_WORKS) - register void *esp; + void *esp; __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp)); return (address) ((char*)esp + sizeof(long)*2); #else @@ -410,7 +410,7 @@ intptr_t* _get_previous_fp() { #if defined(SPARC_WORKS) || defined(__clang__) || defined(__llvm__) - register intptr_t **ebp; + intptr_t **ebp; __asm__("mov %%" SPELL_REG_FP ", %0":"=r"(ebp)); #else register intptr_t **ebp __asm__ (SPELL_REG_FP); diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -27,15 +27,6 @@ #define OS_CPU_LINUX_AARCH64_VM_THREAD_LINUX_AARCH64_HPP private: -#ifdef ASSERT - // spill stack holds N callee-save registers at each Java call and - // grows downwards towards limit - // we need limit to check we have space for a spill and base so we - // can identify all live spill frames at GC (eventually) - address _spill_stack; - address _spill_stack_base; - address _spill_stack_limit; -#endif // ASSERT void pd_initialize() { _anchor.clear(); diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -259,9 +259,11 @@ #ifndef AARCH64 extern "C" address check_vfp_fault_instr; extern "C" address check_vfp3_32_fault_instr; +extern "C" address check_mp_ext_fault_instr; address check_vfp_fault_instr = NULL; address check_vfp3_32_fault_instr = NULL; +address check_mp_ext_fault_instr = NULL; #endif // !AARCH64 extern "C" address check_simd_fault_instr; address check_simd_fault_instr = NULL; @@ -283,7 +285,8 @@ if (sig == SIGILL && ((info->si_addr == (caddr_t)check_simd_fault_instr) NOT_AARCH64(|| info->si_addr == (caddr_t)check_vfp_fault_instr) - NOT_AARCH64(|| info->si_addr == (caddr_t)check_vfp3_32_fault_instr))) { + NOT_AARCH64(|| info->si_addr == (caddr_t)check_vfp3_32_fault_instr) + NOT_AARCH64(|| info->si_addr == (caddr_t)check_mp_ext_fault_instr))) { // skip faulty instruction + instruction that sets return value to // success and set return value to failure. os::Linux::ucontext_set_pc(uc, (address)info->si_addr + 8); diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_ppc/orderAccess_linux_ppc.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_ppc/orderAccess_linux_ppc.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_ppc/orderAccess_linux_ppc.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_ppc/orderAccess_linux_ppc.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -85,7 +85,7 @@ struct OrderAccess::PlatformOrderedLoad { template - T operator()(const volatile T* p) const { register T t = Atomic::load(p); inlasm_acquire_reg(t); return t; } + T operator()(const volatile T* p) const { T t = Atomic::load(p); inlasm_acquire_reg(t); return t; } }; #undef inlasm_sync diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -172,7 +172,9 @@ // method returns the Java sender of the current frame. *fr = os::fetch_frame_from_context(uc); if (!fr->is_first_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. *fr = fr->java_sender(); } } else { @@ -189,7 +191,7 @@ address lr = ucontext_get_lr(uc); *fr = frame(sp, lr); if (!fr->is_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // See java_sender() comment above. assert(!fr->is_first_frame(), "Safety check"); *fr = fr->java_sender(); } @@ -229,6 +231,10 @@ Thread* t = Thread::current_or_null_safe(); + // Must do this before SignalHandlerMark, if crash protection installed we will longjmp away + // (no destructors can be run) + os::ThreadCrashProtection::check_crash_protection(sig, t); + SignalHandlerMark shm(t); // Note: it's not uncommon that JNI code uses signal/sigset to install diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2019 SAP SE. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,14 +58,15 @@ // if we were running Java code when SIGPROF came in. if (isInJava) { ucontext_t* uc = (ucontext_t*) ucontext; - frame ret_frame((intptr_t*)uc->uc_mcontext.regs->gpr[1/*REG_SP*/], - (address)uc->uc_mcontext.regs->nip); + address pc = (address)uc->uc_mcontext.regs->nip; - if (ret_frame.pc() == NULL) { + if (pc == NULL) { // ucontext wasn't useful return false; } + frame ret_frame((intptr_t*)uc->uc_mcontext.regs->gpr[1/*REG_SP*/], pc); + if (ret_frame.fp() == NULL) { // The found frame does not have a valid frame pointer. // Bail out because this will create big trouble later on, either diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_s390/orderAccess_linux_s390.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_s390/orderAccess_linux_s390.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_s390/orderAccess_linux_s390.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_s390/orderAccess_linux_s390.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -79,7 +79,7 @@ struct OrderAccess::PlatformOrderedLoad { template - T operator()(const volatile T* p) const { register T t = *p; inlasm_zarch_acquire(); return t; } + T operator()(const volatile T* p) const { T t = *p; inlasm_zarch_acquire(); return t; } }; #undef inlasm_compiler_barrier diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -154,7 +154,9 @@ // method returns the Java sender of the current frame. *fr = os::fetch_frame_from_context(uc); if (!fr->is_first_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. *fr = fr->java_sender(); } } else { @@ -171,7 +173,7 @@ address lr = ucontext_get_lr(uc); *fr = frame(sp, lr); if (!fr->is_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // See java_sender() comment above. assert(!fr->is_first_frame(), "Safety check"); *fr = fr->java_sender(); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016, 2019 SAP SE. All rights reserved. + * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2022 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,14 +58,15 @@ // if we were running Java code when SIGPROF came in. if (isInJava) { ucontext_t* uc = (ucontext_t*) ucontext; - frame ret_frame((intptr_t*)uc->uc_mcontext.gregs[15/*Z_SP*/], - (address)uc->uc_mcontext.psw.addr); + address pc = (address)uc->uc_mcontext.psw.addr; - if (ret_frame.pc() == NULL) { + if (pc == NULL) { // ucontext wasn't useful return false; } + frame ret_frame((intptr_t*)uc->uc_mcontext.gregs[15/*Z_SP*/], pc); + if (ret_frame.fp() == NULL) { // The found frame does not have a valid frame pointer. // Bail out because this will create big trouble later on, either @@ -100,7 +101,7 @@ if (ret_frame.is_interpreted_frame()) { frame::z_ijava_state* istate = ret_frame.ijava_state_unchecked(); - if (stack_base() >= (address)istate && (address)istate > stack_end()) { + if (!(stack_base() >= (address)istate && (address)istate > stack_end())) { return false; } const Method *m = (const Method*)(istate->method); diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -95,16 +95,11 @@ address os::current_stack_pointer() { #ifdef SPARC_WORKS - register void *esp; + void *esp; __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp)); return (address) ((char*)esp + sizeof(long)*2); -#elif defined(__clang__) - intptr_t* esp; - __asm__ __volatile__ ("mov %%" SPELL_REG_SP ", %0":"=r"(esp):); - return (address) esp; #else - register void *esp __asm__ (SPELL_REG_SP); - return (address) esp; + return (address)__builtin_frame_address(0); #endif } @@ -229,7 +224,7 @@ intptr_t* _get_previous_fp() { #ifdef SPARC_WORKS - register intptr_t **ebp; + intptr_t **ebp; __asm__("mov %%" SPELL_REG_FP ", %0":"=r"(ebp)); #elif defined(__clang__) intptr_t **ebp; diff -Nru openjdk-11-11.0.14+9/src/hotspot/os_cpu/windows_aarch64/thread_windows_aarch64.hpp openjdk-11-11.0.15+10/src/hotspot/os_cpu/windows_aarch64/thread_windows_aarch64.hpp --- openjdk-11-11.0.14+9/src/hotspot/os_cpu/windows_aarch64/thread_windows_aarch64.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/os_cpu/windows_aarch64/thread_windows_aarch64.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -27,16 +27,6 @@ private: -#ifdef ASSERT - // spill stack holds N callee-save registers at each Java call and - // grows downwards towards limit - // we need limit to check we have space for a spill and base so we - // can identify all live spill frames at GC (eventually) - address _spill_stack; - address _spill_stack_base; - address _spill_stack_limit; -#endif // ASSERT - void pd_initialize() { _anchor.clear(); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/adlc/adlparse.cpp openjdk-11-11.0.15+10/src/hotspot/share/adlc/adlparse.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/adlc/adlparse.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/adlc/adlparse.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -4566,7 +4566,7 @@ // string(still inside the file buffer). Returns a pointer to the string or // NULL if some other token is found instead. char *ADLParser::get_ident_common(bool do_preproc) { - register char c; + char c; char *start; // Pointer to start of token char *end; // Pointer to end of token @@ -4764,7 +4764,7 @@ // invokes a parse_err if the next token is not an integer. // This routine does not leave the integer null-terminated. int ADLParser::get_int(void) { - register char c; + char c; char *start; // Pointer to start of token char *end; // Pointer to end of token int result; // Storage for integer result diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/adlc/arena.cpp openjdk-11-11.0.15+10/src/hotspot/share/adlc/arena.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/adlc/arena.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/adlc/arena.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -79,7 +79,7 @@ // Total of all Chunks in arena size_t Arena::used() const { size_t sum = _chunk->_len - (_max-_hwm); // Size leftover in this Chunk - register Chunk *k = _first; + Chunk *k = _first; while( k != _chunk) { // Whilst have Chunks in a row sum += k->_len; // Total size of this Chunk k = k->_next; // Bump along to next Chunk @@ -93,7 +93,7 @@ // Get minimal required size. Either real big, or even bigger for giant objs size_t len = max(x, Chunk::size); - register Chunk *k = _chunk; // Get filled-up chunk address + Chunk *k = _chunk; // Get filled-up chunk address _chunk = new (len) Chunk(len); if( k ) k->_next = _chunk; // Append new chunk to end of linked list diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/adlc/dict2.cpp openjdk-11-11.0.15+10/src/hotspot/share/adlc/dict2.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/adlc/dict2.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/adlc/dict2.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -283,9 +283,9 @@ // limited to MAXID characters in length. Experimental evidence on 150K of // C text shows excellent spreading of values for any size hash table. int hashstr(const void *t) { - register char c, k = 0; - register int sum = 0; - register const char *s = (const char *)t; + char c, k = 0; + int sum = 0; + const char *s = (const char *)t; while (((c = s[k]) != '\0') && (k < MAXID-1)) { // Get characters till nul c = (char) ((c << 1) + 1); // Characters are always odd! diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/adlc/main.cpp openjdk-11-11.0.15+10/src/hotspot/share/adlc/main.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/adlc/main.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/adlc/main.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -58,7 +58,7 @@ // Read command line arguments and file names for( int i = 1; i < argc; i++ ) { // For all arguments - register char *s = argv[i]; // Get option/filename + char *s = argv[i]; // Get option/filename if( *s++ == '-' ) { // It's a flag? (not a filename) if( !*s ) { // Stand-alone `-' means stdin diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_IR.cpp openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_IR.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_IR.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_IR.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -190,7 +190,8 @@ , _stack(stack) , _exception_handlers(exception_handlers) , _is_method_handle_invoke(false) - , _deoptimize_on_exception(deoptimize_on_exception) { + , _deoptimize_on_exception(deoptimize_on_exception) + , _force_reexecute(false) { assert(_stack != NULL, "must be non null"); } @@ -202,7 +203,8 @@ , _oop_map(NULL) , _stack(stack == NULL ? info->_stack : stack) , _is_method_handle_invoke(info->_is_method_handle_invoke) - , _deoptimize_on_exception(info->_deoptimize_on_exception) { + , _deoptimize_on_exception(info->_deoptimize_on_exception) + , _force_reexecute(info->_force_reexecute) { // deep copy of exception handlers if (info->_exception_handlers != NULL) { @@ -214,7 +216,8 @@ void CodeEmitInfo::record_debug_info(DebugInformationRecorder* recorder, int pc_offset) { // record the safepoint before recording the debug info for enclosing scopes recorder->add_safepoint(pc_offset, _oop_map->deep_copy()); - _scope_debug_info->record_debug_info(recorder, pc_offset, true/*topmost*/, _is_method_handle_invoke); + bool reexecute = _force_reexecute || _scope_debug_info->should_reexecute(); + _scope_debug_info->record_debug_info(recorder, pc_offset, reexecute, _is_method_handle_invoke); recorder->end_safepoint(pc_offset); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_IR.hpp openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_IR.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_IR.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_IR.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -232,16 +232,15 @@ //Whether we should reexecute this bytecode for deopt bool should_reexecute(); - void record_debug_info(DebugInformationRecorder* recorder, int pc_offset, bool topmost, bool is_method_handle_invoke = false) { + void record_debug_info(DebugInformationRecorder* recorder, int pc_offset, bool reexecute, bool is_method_handle_invoke = false) { if (caller() != NULL) { // Order is significant: Must record caller first. - caller()->record_debug_info(recorder, pc_offset, false/*topmost*/); + caller()->record_debug_info(recorder, pc_offset, false/*reexecute*/); } DebugToken* locvals = recorder->create_scope_values(locals()); DebugToken* expvals = recorder->create_scope_values(expressions()); DebugToken* monvals = recorder->create_monitor_values(monitors()); // reexecute allowed only for the topmost frame - bool reexecute = topmost ? should_reexecute() : false; bool return_oop = false; // This flag will be ignored since it used only for C2 with escape analysis. bool rethrow_exception = false; recorder->describe_scope(pc_offset, methodHandle(), scope()->method(), bci(), reexecute, rethrow_exception, is_method_handle_invoke, return_oop, locvals, expvals, monvals); @@ -259,6 +258,7 @@ ValueStack* _stack; // used by deoptimization (contains also monitors bool _is_method_handle_invoke; // true if the associated call site is a MethodHandle call site. bool _deoptimize_on_exception; + bool _force_reexecute; // force the reexecute flag on, used for patching stub FrameMap* frame_map() const { return scope()->compilation()->frame_map(); } Compilation* compilation() const { return scope()->compilation(); } @@ -285,7 +285,11 @@ bool is_method_handle_invoke() const { return _is_method_handle_invoke; } void set_is_method_handle_invoke(bool x) { _is_method_handle_invoke = x; } + bool force_reexecute() const { return _force_reexecute; } + void set_force_reexecute() { _force_reexecute = true; } + int interpreter_frame_size() const; + }; diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_Instruction.cpp openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_Instruction.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_Instruction.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_Instruction.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -838,6 +838,11 @@ existing_state->invalidate_local(index); TRACE_PHI(tty->print_cr("invalidating local %d because of type mismatch", index)); } + + if (existing_value != new_state->local_at(index) && existing_value->as_Phi() == NULL) { + TRACE_PHI(tty->print_cr("required phi for local %d is missing, irreducible loop?", index)); + return false; // BAILOUT in caller + } } #ifdef ASSERT diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_LIRAssembler.cpp openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_LIRAssembler.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_LIRAssembler.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_LIRAssembler.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -41,6 +41,7 @@ while ((intx) _masm->pc() - (intx) patch->pc_start() < NativeGeneralJump::instruction_size) { _masm->nop(); } + info->set_force_reexecute(); patch->install(_masm, patch_code, obj, info); append_code_stub(patch); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_LIRGenerator.cpp openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_LIRGenerator.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_LIRGenerator.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_LIRGenerator.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -993,6 +993,14 @@ Phi* phi = sux_val->as_Phi(); // cur_val can be null without phi being null in conjunction with inlining if (phi != NULL && cur_val != NULL && cur_val != phi && !phi->is_illegal()) { + if (phi->is_local()) { + for (int i = 0; i < phi->operand_count(); i++) { + Value op = phi->operand_at(i); + if (op != NULL && op->type()->is_illegal()) { + bailout("illegal phi operand"); + } + } + } Phi* cur_phi = cur_val->as_Phi(); if (cur_phi != NULL && cur_phi->is_illegal()) { // Phi and local would need to get invalidated diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_Runtime1.cpp openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_Runtime1.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/c1/c1_Runtime1.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/c1/c1_Runtime1.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -834,6 +834,10 @@ JRT_ENTRY(void, Runtime1::patch_code(JavaThread* thread, Runtime1::StubID stub_id )) NOT_PRODUCT(_patch_code_slowcase_cnt++;) + // Enable WXWrite: the function is called by c1 stub as a runtime function + // (see another implementation above). + MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, thread)); + ResourceMark rm(thread); RegisterMap reg_map(thread, false); frame runtime_frame = thread->last_frame(); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/ci/ciMethodData.cpp openjdk-11-11.0.15+10/src/hotspot/share/ci/ciMethodData.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/ci/ciMethodData.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/ci/ciMethodData.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -266,8 +266,13 @@ for (uint row = 0; row < row_limit(); row++) { Klass* k = data->as_ReceiverTypeData()->receiver(row); if (k != NULL) { - ciKlass* klass = CURRENT_ENV->get_klass(k); - set_receiver(row, klass); + if (k->is_loader_alive()) { + ciKlass* klass = CURRENT_ENV->get_klass(k); + set_receiver(row, klass); + } else { + // With concurrent class unloading, the MDO could have stale metadata; override it + clear_row(row); + } } else { set_receiver(row, NULL); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/classfile/altHashing.cpp openjdk-11-11.0.15+10/src/hotspot/share/classfile/altHashing.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/classfile/altHashing.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/classfile/altHashing.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -26,18 +26,23 @@ * halfsiphash code adapted from reference implementation * (https://github.com/veorq/SipHash/blob/master/halfsiphash.c) * which is distributed with the following copyright: - * - * SipHash reference C implementation - * - * Copyright (c) 2016 Jean-Philippe Aumasson - * - * To the extent possible under law, the author(s) have dedicated all copyright - * and related and neighboring rights to this software to the public domain - * worldwide. This software is distributed without any warranty. - * - * You should have received a copy of the CC0 Public Domain Dedication along - * with this software. If not, see - * . + */ + +/* + SipHash reference C implementation + + Copyright (c) 2012-2021 Jean-Philippe Aumasson + + Copyright (c) 2012-2014 Daniel J. Bernstein + + To the extent possible under law, the author(s) have dedicated all copyright + and related and neighboring rights to this software to the public domain + worldwide. This software is distributed without any warranty. + + You should have received a copy of the CC0 Public Domain Dedication along + with + this software. If not, see + . */ #include "precompiled.hpp" @@ -134,7 +139,9 @@ } // HalfSipHash-2-4 (32-bit output) for Symbols -uint32_t AltHashing::halfsiphash_32(uint64_t seed, const uint8_t* data, int len) { +uint32_t AltHashing::halfsiphash_32(uint64_t seed, const void* in, int len) { + + const unsigned char* data = (const unsigned char*)in; uint32_t v[4]; uint32_t newdata; int off = 0; diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/classfile/altHashing.hpp openjdk-11-11.0.15+10/src/hotspot/share/classfile/altHashing.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/classfile/altHashing.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/classfile/altHashing.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,7 +43,7 @@ static uint64_t compute_seed(); // For Symbols - static uint32_t halfsiphash_32(uint64_t seed, const uint8_t* data, int len); + static uint32_t halfsiphash_32(uint64_t seed, const void* in, int len); // For Strings static uint32_t halfsiphash_32(uint64_t seed, const uint16_t* data, int len); }; diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/classfile/dictionary.cpp openjdk-11-11.0.15+10/src/hotspot/share/classfile/dictionary.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/classfile/dictionary.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/classfile/dictionary.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -613,9 +613,9 @@ ClassLoaderData* cld = loader_data(); // class loader must be present; a null class loader is the // boostrap loader - guarantee(cld != NULL || DumpSharedSpaces || - cld->class_loader() == NULL || - cld->class_loader()->is_instance(), + guarantee(DumpSharedSpaces || + (cld != NULL && + (cld->the_null_class_loader_data() || cld->class_loader()->is_instance())), "checking type of class_loader"); ResourceMark rm; diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/classfile/verifier.cpp openjdk-11-11.0.15+10/src/hotspot/share/classfile/verifier.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/classfile/verifier.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/classfile/verifier.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1734,7 +1734,7 @@ no_control_flow = true; break; default: // We only need to check the valid bytecodes in class file. - // And jsr and ret are not in the new class file format in JDK1.5. + // And jsr and ret are not in the new class file format in JDK1.6. verify_error(ErrorContext::bad_code(bci), "Bad instruction: %02x", opcode); no_control_flow = false; @@ -2356,7 +2356,8 @@ verify_error(ErrorContext::bad_type(bci, current_frame->stack_top_ctx(), TypeOrigin::implicit(current_type())), - "Bad access to protected data in getfield"); + "Bad access to protected data in %s", + is_getfield ? "getfield" : "putfield"); return; } } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/compiler/compileBroker.cpp openjdk-11-11.0.15+10/src/hotspot/share/compiler/compileBroker.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/compiler/compileBroker.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/compiler/compileBroker.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -411,6 +411,7 @@ CompileTask::free(current); } _first = NULL; + _last = NULL; // Wake up all threads that block on the queue. MethodCompileQueue_lock->notify_all(); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp openjdk-11-11.0.15+10/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -263,7 +263,7 @@ if (pretouch_gang != NULL) { size_t num_chunks = MAX2((size_t)1, size_in_pages * _page_size / MAX2(G1PretouchTask::chunk_size(), _page_size)); - uint num_workers = MIN2((uint)num_chunks, pretouch_gang->active_workers()); + uint num_workers = MIN2((uint)num_chunks, pretouch_gang->total_workers()); log_debug(gc, heap)("Running %s with %u workers for " SIZE_FORMAT " work units pre-touching " SIZE_FORMAT "B.", cl.name(), num_workers, num_chunks, size_in_pages * _page_size); pretouch_gang->run_task(&cl, num_workers); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/include/jvm.h openjdk-11-11.0.15+10/src/hotspot/share/include/jvm.h --- openjdk-11-11.0.14+9/src/hotspot/share/include/jvm.h 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/include/jvm.h 2022-04-19 19:38:30.000000000 +0000 @@ -160,7 +160,7 @@ JVM_IsUseContainerSupport(void); JNIEXPORT void * JNICALL -JVM_LoadLibrary(const char *name); +JVM_LoadLibrary(const char *name, jboolean throwException); JNIEXPORT void JNICALL JVM_UnloadLibrary(void * handle); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/interpreter/bytecodeInterpreter.cpp openjdk-11-11.0.15+10/src/hotspot/share/interpreter/bytecodeInterpreter.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/interpreter/bytecodeInterpreter.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/interpreter/bytecodeInterpreter.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -494,13 +494,13 @@ interpreterState orig = istate; #endif - register intptr_t* topOfStack = (intptr_t *)istate->stack(); /* access with STACK macros */ - register address pc = istate->bcp(); - register jubyte opcode; - register intptr_t* locals = istate->locals(); - register ConstantPoolCache* cp = istate->constants(); // method()->constants()->cache() + intptr_t* topOfStack = (intptr_t *)istate->stack(); /* access with STACK macros */ + address pc = istate->bcp(); + jubyte opcode; + intptr_t* locals = istate->locals(); + ConstantPoolCache* cp = istate->constants(); // method()->constants()->cache() #ifdef LOTS_OF_REGS - register JavaThread* THREAD = istate->thread(); + JavaThread* THREAD = istate->thread(); #else #undef THREAD #define THREAD istate->thread() @@ -589,7 +589,7 @@ /* 0xF8 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, /* 0xFC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default }; - register uintptr_t *dispatch_table = (uintptr_t*)&opclabels_data[0]; + uintptr_t *dispatch_table = (uintptr_t*)&opclabels_data[0]; #endif /* USELABELS */ #ifdef ASSERT diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/interpreter/bytecodes.cpp openjdk-11-11.0.15+10/src/hotspot/share/interpreter/bytecodes.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/interpreter/bytecodes.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/interpreter/bytecodes.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -471,7 +471,7 @@ def(_new , "new" , "bkk" , NULL , T_OBJECT , 1, true ); def(_newarray , "newarray" , "bc" , NULL , T_OBJECT , 0, true ); def(_anewarray , "anewarray" , "bkk" , NULL , T_OBJECT , 0, true ); - def(_arraylength , "arraylength" , "b" , NULL , T_VOID , 0, true ); + def(_arraylength , "arraylength" , "b" , NULL , T_INT , 0, true ); def(_athrow , "athrow" , "b" , NULL , T_VOID , -1, true ); def(_checkcast , "checkcast" , "bkk" , NULL , T_OBJECT , 0, true ); def(_instanceof , "instanceof" , "bkk" , NULL , T_INT , 0, true ); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/interpreter/interpreterRuntime.cpp openjdk-11-11.0.15+10/src/hotspot/share/interpreter/interpreterRuntime.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/interpreter/interpreterRuntime.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/interpreter/interpreterRuntime.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1015,6 +1015,9 @@ nmethod* InterpreterRuntime::frequency_counter_overflow(JavaThread* thread, address branch_bcp) { + // Enable WXWrite: the function is called directly by interpreter. + MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, thread)); + nmethod* nm = frequency_counter_overflow_inner(thread, branch_bcp); assert(branch_bcp != NULL || nm == NULL, "always returns null for non OSR requests"); if (branch_bcp != NULL && nm != NULL) { diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/interpreter/oopMapCache.cpp openjdk-11-11.0.15+10/src/hotspot/share/interpreter/oopMapCache.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/interpreter/oopMapCache.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/interpreter/oopMapCache.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -241,6 +241,8 @@ } public: + void pass_byte() { /* ignore */ } + void pass_short() { /* ignore */ } void pass_int() { /* ignore */ } void pass_long() { /* ignore */ } void pass_float() { /* ignore */ } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp openjdk-11-11.0.15+10/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -385,7 +385,7 @@ _subsystem_callback = &callback; do_klasses(); } else { - LeakKlassWriter lkw(_leakp_writer, _artifacts, _class_unload); + LeakKlassWriter lkw(_leakp_writer, _class_unload); CompositeKlassWriter ckw(&lkw, &kw); CompositeKlassWriterRegistration ckwr(&ckw, ®); CompositeKlassCallback callback(&ckwr); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/jvmci/jvmciEnv.hpp openjdk-11-11.0.15+10/src/hotspot/share/jvmci/jvmciEnv.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/jvmci/jvmciEnv.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/jvmci/jvmciEnv.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -37,6 +37,7 @@ // Bring the JVMCI compiler thread into the VM state. #define JVMCI_VM_ENTRY_MARK \ JavaThread* thread = JavaThread::current(); \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \ ThreadInVMfromNative __tiv(thread); \ ResetNoHandleMark rnhm; \ HandleMarkCleaner __hm(thread); \ diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/jvmci/vmStructs_jvmci.cpp openjdk-11-11.0.15+10/src/hotspot/share/jvmci/vmStructs_jvmci.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/jvmci/vmStructs_jvmci.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/jvmci/vmStructs_jvmci.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -521,7 +521,7 @@ declare_constant(Deoptimization::Reason_not_compiled_exception_handler) \ declare_constant(Deoptimization::Reason_unresolved) \ declare_constant(Deoptimization::Reason_jsr_mismatch) \ - declare_constant(Deoptimization::Reason_LIMIT) \ + declare_constant(Deoptimization::Reason_TRAP_HISTORY_LENGTH) \ \ declare_constant(FieldInfo::access_flags_offset) \ declare_constant(FieldInfo::name_index_offset) \ diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/libadt/dict.cpp openjdk-11-11.0.15+10/src/hotspot/share/libadt/dict.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/libadt/dict.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/libadt/dict.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -305,9 +305,9 @@ // limited to MAXID characters in length. Experimental evidence on 150K of // C text shows excellent spreading of values for any size hash table. int hashstr(const void *t) { - register char c, k = 0; - register int32_t sum = 0; - register const char *s = (const char *)t; + char c, k = 0; + int32_t sum = 0; + const char *s = (const char *)t; while( ((c = *s++) != '\0') && (k < MAXID-1) ) { // Get characters till null or MAXID-1 c = (c<<1)+1; // Characters are always odd! diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/libadt/set.cpp openjdk-11-11.0.15+10/src/hotspot/share/libadt/set.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/libadt/set.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/libadt/set.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -64,7 +64,7 @@ uint len = 128; // Total string space char *buf = NEW_C_HEAP_ARRAY(char,len, mtCompiler);// Some initial string space - register char *s = buf; // Current working string pointer + char *s = buf; // Current working string pointer *s++ = '{'; *s = '\0'; @@ -116,8 +116,8 @@ // Set. Return the amount of text parsed in "len", or zero in "len". int Set::parse(const char *s) { - register char c; // Parse character - register const char *t = s; // Save the starting position of s. + char c; // Parse character + const char *t = s; // Save the starting position of s. do c = *s++; // Skip characters while( c && (c <= ' ') ); // Till no more whitespace or EOS if( c != '{' ) return 0; // Oops, not a Set openner diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/libadt/vectset.cpp openjdk-11-11.0.15+10/src/hotspot/share/libadt/vectset.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/libadt/vectset.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/libadt/vectset.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -101,8 +101,8 @@ // Insert a member into an existing Set. Set &VectorSet::operator <<= (uint elem) { - register uint word = elem >> 5; // Get the longword offset - register uint32_t mask = 1L << (elem & 31); // Get bit mask + uint word = elem >> 5; // Get the longword offset + uint32_t mask = 1L << (elem & 31); // Get bit mask if( word >= size ) // Need to grow set? grow(elem+1); // Then grow it @@ -114,10 +114,10 @@ // Delete a member from an existing Set. Set &VectorSet::operator >>= (uint elem) { - register uint word = elem >> 5; // Get the longword offset + uint word = elem >> 5; // Get the longword offset if( word >= size ) // Beyond the last? return *this; // Then it's clear & return clear - register uint32_t mask = 1L << (elem & 31); // Get bit mask + uint32_t mask = 1L << (elem & 31); // Get bit mask data[word] &= ~mask; // Clear bit return *this; } @@ -128,8 +128,8 @@ { // NOTE: The intersection is never any larger than the smallest set. if( s.size < size ) size = s.size; // Get smaller size - register uint32_t *u1 = data; // Pointer to the destination data - register uint32_t *u2 = s.data; // Pointer to the source data + uint32_t *u1 = data; // Pointer to the destination data + uint32_t *u2 = s.data; // Pointer to the source data for( uint i=0; i> 5; // Get the longword offset - if( word >= size ) // Beyond the last? - return 0; // Then it's clear - register uint32_t mask = 1L << (elem & 31); // Get bit mask - return ((data[word] & mask))!=0; // Return the sense of the bit + uint word = elem >> 5; // Get the longword offset + if( word >= size ) // Beyond the last? + return 0; // Then it's clear + uint32_t mask = 1L << (elem & 31); // Get bit mask + return ((data[word] & mask))!=0; // Return the sense of the bit } //------------------------------getelem---------------------------------------- diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/memory/arena.cpp openjdk-11-11.0.15+10/src/hotspot/share/memory/arena.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/memory/arena.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/memory/arena.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -337,7 +337,7 @@ // Total of all Chunks in arena size_t Arena::used() const { size_t sum = _chunk->length() - (_max-_hwm); // Size leftover in this Chunk - register Chunk *k = _first; + Chunk *k = _first; while( k != _chunk) { // Whilst have Chunks in a row sum += k->length(); // Total size of this Chunk k = k->next(); // Bump along to next Chunk diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/memory/virtualspace.cpp openjdk-11-11.0.15+10/src/hotspot/share/memory/virtualspace.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/memory/virtualspace.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/memory/virtualspace.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -196,7 +196,8 @@ base = NULL; } } else { - base = os::reserve_memory(size, NULL, alignment, _fd_for_heap); + base = MACOS_ONLY(os::reserve_memory(size, NULL, alignment, _fd_for_heap, _executable)) + NOT_MACOS(os::reserve_memory(size, NULL, alignment, _fd_for_heap)); } if (base == NULL) return; @@ -990,7 +991,8 @@ assert(middle_high_boundary() <= aligned_upper_new_high && aligned_upper_new_high + upper_needs <= upper_high_boundary(), "must not shrink beyond region"); - if (!os::uncommit_memory(aligned_upper_new_high, upper_needs)) { + if (MACOS_ONLY(!os::uncommit_memory(aligned_upper_new_high, upper_needs, _executable)) + NOT_MACOS(!os::uncommit_memory(aligned_upper_new_high, upper_needs))) { debug_only(warning("os::uncommit_memory failed")); return; } else { @@ -1001,7 +1003,8 @@ assert(lower_high_boundary() <= aligned_middle_new_high && aligned_middle_new_high + middle_needs <= middle_high_boundary(), "must not shrink beyond region"); - if (!os::uncommit_memory(aligned_middle_new_high, middle_needs)) { + if (MACOS_ONLY(!os::uncommit_memory(aligned_middle_new_high, middle_needs, _executable)) + NOT_MACOS(!os::uncommit_memory(aligned_middle_new_high, middle_needs))) { debug_only(warning("os::uncommit_memory failed")); return; } else { @@ -1012,7 +1015,8 @@ assert(low_boundary() <= aligned_lower_new_high && aligned_lower_new_high + lower_needs <= lower_high_boundary(), "must not shrink beyond region"); - if (!os::uncommit_memory(aligned_lower_new_high, lower_needs)) { + if (MACOS_ONLY(!os::uncommit_memory(aligned_lower_new_high, lower_needs, _executable)) + NOT_MACOS(!os::uncommit_memory(aligned_lower_new_high, lower_needs))) { debug_only(warning("os::uncommit_memory failed")); return; } else { diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/oops/instanceKlass.cpp openjdk-11-11.0.15+10/src/hotspot/share/oops/instanceKlass.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/oops/instanceKlass.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/oops/instanceKlass.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1839,29 +1839,18 @@ return NULL; } -/* jni_id_for_impl for jfieldIds only */ -JNIid* InstanceKlass::jni_id_for_impl(int offset) { +/* jni_id_for for jfieldIds only */ +JNIid* InstanceKlass::jni_id_for(int offset) { MutexLocker ml(JfieldIdCreation_lock); - // Retry lookup after we got the lock JNIid* probe = jni_ids() == NULL ? NULL : jni_ids()->find(offset); if (probe == NULL) { - // Slow case, allocate new static field identifier + // Allocate new static field identifier probe = new JNIid(this, offset, jni_ids()); set_jni_ids(probe); } return probe; } - -/* jni_id_for for jfieldIds only */ -JNIid* InstanceKlass::jni_id_for(int offset) { - JNIid* probe = jni_ids() == NULL ? NULL : jni_ids()->find(offset); - if (probe == NULL) { - probe = jni_id_for_impl(offset); - } - return probe; -} - u2 InstanceKlass::enclosing_method_data(int offset) const { const Array* const inner_class_list = inner_classes(); if (inner_class_list == NULL) { @@ -2380,6 +2369,9 @@ constants()->restore_unshareable_info(CHECK); if (array_klasses() != NULL) { + // To get a consistent list of classes we need MultiArray_lock to ensure + // array classes aren't observed while they are being restored. + MutexLocker ml(MultiArray_lock); // Array classes have null protection domain. // --> see ArrayKlass::complete_create_array_klass() array_klasses()->restore_unshareable_info(ClassLoaderData::the_null_class_loader_data(), Handle(), CHECK); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/oops/instanceKlass.hpp openjdk-11-11.0.15+10/src/hotspot/share/oops/instanceKlass.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/oops/instanceKlass.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/oops/instanceKlass.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -738,9 +738,18 @@ } #if INCLUDE_JVMTI - // Redefinition locking. Class can only be redefined by one thread at a time. - bool is_being_redefined() const { return _is_being_redefined; } - void set_is_being_redefined(bool value) { _is_being_redefined = value; } + // The flag is in access_flags so that it can be set and reset using atomic + // operations, and not be reset by other misc_flag settings. + bool is_being_redefined() const { + return _access_flags.is_being_redefined(); + } + void set_is_being_redefined(bool value) { + if (value) { + _access_flags.set_is_being_redefined(); + } else { + _access_flags.clear_is_being_redefined(); + } + } // RedefineClasses() support for previous versions: void add_previous_version(InstanceKlass* ik, int emcp_method_count); @@ -1291,8 +1300,6 @@ void initialize_impl (TRAPS); void initialize_super_interfaces (TRAPS); void eager_initialize_impl (); - /* jni_id_for_impl for jfieldID only */ - JNIid* jni_id_for_impl (int offset); // Returns the array class for the n'th dimension Klass* array_klass_impl(bool or_null, int n, TRAPS); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/oops/method.cpp openjdk-11-11.0.15+10/src/hotspot/share/oops/method.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/oops/method.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/oops/method.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -251,14 +251,11 @@ if (is_native() && bcp == 0) { return 0; } -#ifdef ASSERT - { - ResourceMark rm; - assert(is_native() && bcp == code_base() || contains(bcp) || VMError::is_error_reported(), - "bcp doesn't belong to this method: bcp: " INTPTR_FORMAT ", method: %s", - p2i(bcp), name_and_sig_as_C_string()); - } -#endif + // Do not have a ResourceMark here because AsyncGetCallTrace stack walking code + // may call this after interrupting a nested ResourceMark. + assert(is_native() && bcp == code_base() || contains(bcp) || VMError::is_error_reported(), + "bcp doesn't belong to this method. bcp: " INTPTR_FORMAT, p2i(bcp)); + return bcp - code_base(); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/oops/methodData.hpp openjdk-11-11.0.15+10/src/hotspot/share/oops/methodData.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/oops/methodData.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/oops/methodData.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -31,6 +31,7 @@ #include "oops/method.hpp" #include "oops/oop.hpp" #include "runtime/atomic.hpp" +#include "runtime/deoptimization.hpp" #include "utilities/align.hpp" #include "utilities/copy.hpp" #if INCLUDE_JVMCI @@ -1983,7 +1984,7 @@ // Whole-method sticky bits and flags enum { - _trap_hist_limit = 24 JVMCI_ONLY(+5), // decoupled from Deoptimization::Reason_LIMIT + _trap_hist_limit = Deoptimization::Reason_TRAP_HISTORY_LENGTH, _trap_hist_mask = max_jubyte, _extra_data_count = 4 // extra DataLayout headers, for trap history }; // Public flag values @@ -1999,6 +2000,7 @@ uint _nof_overflow_traps; // trap count, excluding _trap_hist union { intptr_t _align; + // JVMCI separates trap history for OSR compilations from normal compilations u1 _array[JVMCI_ONLY(2 *) MethodData::_trap_hist_limit]; } _trap_hist; @@ -2021,14 +2023,14 @@ // Return (uint)-1 for overflow. uint trap_count(int reason) const { - assert((uint)reason < JVMCI_ONLY(2*) _trap_hist_limit, "oob"); + assert((uint)reason < ARRAY_SIZE(_trap_hist._array), "oob"); return (int)((_trap_hist._array[reason]+1) & _trap_hist_mask) - 1; } uint inc_trap_count(int reason) { // Count another trap, anywhere in this method. assert(reason >= 0, "must be single trap"); - assert((uint)reason < JVMCI_ONLY(2*) _trap_hist_limit, "oob"); + assert((uint)reason < ARRAY_SIZE(_trap_hist._array), "oob"); uint cnt1 = 1 + _trap_hist._array[reason]; if ((cnt1 & _trap_hist_mask) != 0) { // if no counter overflow... _trap_hist._array[reason] = cnt1; diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/opto/cfgnode.cpp openjdk-11-11.0.15+10/src/hotspot/share/opto/cfgnode.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/opto/cfgnode.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/opto/cfgnode.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -2006,13 +2006,13 @@ // Phi(...MergeMem(m0, m1:AT1, m2:AT2)...) into // MergeMem(Phi(...m0...), Phi:AT1(...m1...), Phi:AT2(...m2...)) PhaseIterGVN* igvn = phase->is_IterGVN(); + assert(igvn != NULL, "sanity check"); Node* hook = new Node(1); PhiNode* new_base = (PhiNode*) clone(); // Must eagerly register phis, since they participate in loops. - if (igvn) { - igvn->register_new_node_with_optimizer(new_base); - hook->add_req(new_base); - } + igvn->register_new_node_with_optimizer(new_base); + hook->add_req(new_base); + MergeMemNode* result = MergeMemNode::make(new_base); for (uint i = 1; i < req(); ++i) { Node *ii = in(i); @@ -2024,10 +2024,8 @@ if (mms.is_empty()) { Node* new_phi = new_base->slice_memory(mms.adr_type(phase->C)); made_new_phi = true; - if (igvn) { - igvn->register_new_node_with_optimizer(new_phi); - hook->add_req(new_phi); - } + igvn->register_new_node_with_optimizer(new_phi); + hook->add_req(new_phi); mms.set_memory(new_phi); } Node* phi = mms.memory(); @@ -2045,6 +2043,13 @@ } } } + // Already replace this phi node to cut it off from the graph to not interfere in dead loop checks during the + // transformations of the new phi nodes below. Otherwise, we could wrongly conclude that there is no dead loop + // because we are finding this phi node again. Also set the type of the new MergeMem node in case we are also + // visiting it in the transformations below. + igvn->replace_node(this, result); + igvn->set_type(result, result->bottom_type()); + // now transform the new nodes, and return the mergemem for (MergeMemStream mms(result); mms.next_non_empty(); ) { Node* phi = mms.memory(); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/opto/convertnode.cpp openjdk-11-11.0.15+10/src/hotspot/share/opto/convertnode.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/opto/convertnode.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/opto/convertnode.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -108,8 +108,10 @@ //------------------------------Ideal------------------------------------------ // If converting to an int type, skip any rounding nodes Node *ConvD2INode::Ideal(PhaseGVN *phase, bool can_reshape) { - if( in(1)->Opcode() == Op_RoundDouble ) - set_req(1,in(1)->in(1)); + if (in(1)->Opcode() == Op_RoundDouble) { + set_req(1, in(1)->in(1)); + return this; + } return NULL; } @@ -142,8 +144,10 @@ //------------------------------Ideal------------------------------------------ // If converting to an int type, skip any rounding nodes Node *ConvD2LNode::Ideal(PhaseGVN *phase, bool can_reshape) { - if( in(1)->Opcode() == Op_RoundDouble ) - set_req(1,in(1)->in(1)); + if (in(1)->Opcode() == Op_RoundDouble) { + set_req(1, in(1)->in(1)); + return this; + } return NULL; } @@ -179,8 +183,10 @@ //------------------------------Ideal------------------------------------------ // If converting to an int type, skip any rounding nodes Node *ConvF2INode::Ideal(PhaseGVN *phase, bool can_reshape) { - if( in(1)->Opcode() == Op_RoundFloat ) - set_req(1,in(1)->in(1)); + if (in(1)->Opcode() == Op_RoundFloat) { + set_req(1, in(1)->in(1)); + return this; + } return NULL; } @@ -206,8 +212,10 @@ //------------------------------Ideal------------------------------------------ // If converting to an int type, skip any rounding nodes Node *ConvF2LNode::Ideal(PhaseGVN *phase, bool can_reshape) { - if( in(1)->Opcode() == Op_RoundFloat ) - set_req(1,in(1)->in(1)); + if (in(1)->Opcode() == Op_RoundFloat) { + set_req(1, in(1)->in(1)); + return this; + } return NULL; } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/opto/library_call.cpp openjdk-11-11.0.15+10/src/hotspot/share/opto/library_call.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/opto/library_call.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/opto/library_call.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1775,7 +1775,7 @@ false, false, true /* mismatched */); } else { ch = make_load(control(), adr, TypeInt::CHAR, T_CHAR, TypeAryPtr::BYTES, MemNode::unordered, - LoadNode::DependsOnlyOnTest, false, false, true /* mismatched */); + LoadNode::Pinned, false, false, true /* mismatched */); set_result(ch); } return true; diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/opto/loopPredicate.cpp openjdk-11-11.0.15+10/src/hotspot/share/opto/loopPredicate.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/opto/loopPredicate.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/opto/loopPredicate.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -698,7 +698,7 @@ BoolNode* PhaseIdealLoop::rc_predicate(IdealLoopTree *loop, Node* ctrl, int scale, Node* offset, Node* init, Node* limit, jint stride, - Node* range, bool upper, bool &overflow) { + Node* range, bool upper, bool &overflow, bool negate) { jint con_limit = (limit != NULL && limit->is_Con()) ? limit->get_int() : 0; jint con_init = init->is_Con() ? init->get_int() : 0; jint con_offset = offset->is_Con() ? offset->get_int() : 0; @@ -824,7 +824,7 @@ cmp = new CmpUNode(max_idx_expr, range); } register_new_node(cmp, ctrl); - BoolNode* bol = new BoolNode(cmp, BoolTest::lt); + BoolNode* bol = new BoolNode(cmp, negate ? BoolTest::ge : BoolTest::lt); register_new_node(bol, ctrl); if (TraceLoopPredicate) { @@ -1191,36 +1191,26 @@ } // If predicate expressions may overflow in the integer range, longs are used. bool overflow = false; + bool negate = (proj->_con != predicate_proj->_con); // Test the lower bound - BoolNode* lower_bound_bol = rc_predicate(loop, ctrl, scale, offset, init, limit, stride, rng, false, overflow); - // Negate test if necessary - bool negated = false; - if (proj->_con != predicate_proj->_con) { - lower_bound_bol = new BoolNode(lower_bound_bol->in(1), lower_bound_bol->_test.negate()); - register_new_node(lower_bound_bol, ctrl); - negated = true; - } + BoolNode* lower_bound_bol = rc_predicate(loop, ctrl, scale, offset, init, limit, stride, rng, false, overflow, negate); + ProjNode* lower_bound_proj = create_new_if_for_predicate(predicate_proj, NULL, reason, overflow ? Op_If : iff->Opcode()); IfNode* lower_bound_iff = lower_bound_proj->in(0)->as_If(); _igvn.hash_delete(lower_bound_iff); lower_bound_iff->set_req(1, lower_bound_bol); - if (TraceLoopPredicate) tty->print_cr("lower bound check if: %s %d ", negated ? " negated" : "", lower_bound_iff->_idx); + if (TraceLoopPredicate) tty->print_cr("lower bound check if: %s %d ", negate ? " negated" : "", lower_bound_iff->_idx); // Test the upper bound - BoolNode* upper_bound_bol = rc_predicate(loop, lower_bound_proj, scale, offset, init, limit, stride, rng, true, overflow); - negated = false; - if (proj->_con != predicate_proj->_con) { - upper_bound_bol = new BoolNode(upper_bound_bol->in(1), upper_bound_bol->_test.negate()); - register_new_node(upper_bound_bol, ctrl); - negated = true; - } + BoolNode* upper_bound_bol = rc_predicate(loop, lower_bound_proj, scale, offset, init, limit, stride, rng, true, overflow, negate); + ProjNode* upper_bound_proj = create_new_if_for_predicate(predicate_proj, NULL, reason, overflow ? Op_If : iff->Opcode()); assert(upper_bound_proj->in(0)->as_If()->in(0) == lower_bound_proj, "should dominate"); IfNode* upper_bound_iff = upper_bound_proj->in(0)->as_If(); _igvn.hash_delete(upper_bound_iff); upper_bound_iff->set_req(1, upper_bound_bol); - if (TraceLoopPredicate) tty->print_cr("upper bound check if: %s %d ", negated ? " negated" : "", lower_bound_iff->_idx); + if (TraceLoopPredicate) tty->print_cr("upper bound check if: %s %d ", negate ? " negated" : "", lower_bound_iff->_idx); // Fall through into rest of the clean up code which will move // any dependent nodes onto the upper bound test. @@ -1266,10 +1256,10 @@ Node* rng, bool &overflow, Deoptimization::DeoptReason reason) { // First predicate for the initial value on first loop iteration - assert(proj->_con && predicate_proj->_con, "not a range check?"); Node* opaque_init = new OpaqueLoopInitNode(C, init); register_new_node(opaque_init, upper_bound_proj); - BoolNode* bol = rc_predicate(loop, upper_bound_proj, scale, offset, opaque_init, limit, stride, rng, (stride > 0) != (scale > 0), overflow); + bool negate = (proj->_con != predicate_proj->_con); + BoolNode* bol = rc_predicate(loop, upper_bound_proj, scale, offset, opaque_init, limit, stride, rng, (stride > 0) != (scale > 0), overflow, negate); Node* opaque_bol = new Opaque4Node(C, bol, _igvn.intcon(1)); // This will go away once loop opts are over register_new_node(opaque_bol, upper_bound_proj); ProjNode* new_proj = create_new_if_for_predicate(predicate_proj, NULL, reason, overflow ? Op_If : iff->Opcode()); @@ -1286,7 +1276,7 @@ register_new_node(max_value, new_proj); max_value = new AddINode(opaque_init, max_value); register_new_node(max_value, new_proj); - bol = rc_predicate(loop, new_proj, scale, offset, max_value, limit, stride, rng, (stride > 0) != (scale > 0), overflow); + bol = rc_predicate(loop, new_proj, scale, offset, max_value, limit, stride, rng, (stride > 0) != (scale > 0), overflow, negate); opaque_bol = new Opaque4Node(C, bol, _igvn.intcon(1)); register_new_node(opaque_bol, new_proj); new_proj = create_new_if_for_predicate(predicate_proj, NULL, reason, overflow ? Op_If : iff->Opcode()); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/opto/loopTransform.cpp openjdk-11-11.0.15+10/src/hotspot/share/opto/loopTransform.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/opto/loopTransform.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/opto/loopTransform.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -45,13 +45,13 @@ // Given an IfNode, return the loop-exiting projection or NULL if both // arms remain in the loop. Node *IdealLoopTree::is_loop_exit(Node *iff) const { - if( iff->outcnt() != 2 ) return NULL; // Ignore partially dead tests + if (iff->outcnt() != 2) return NULL; // Ignore partially dead tests PhaseIdealLoop *phase = _phase; // Test is an IfNode, has 2 projections. If BOTH are in the loop // we need loop unswitching instead of peeling. - if( !is_member(phase->get_loop( iff->raw_out(0) )) ) + if (!is_member(phase->get_loop(iff->raw_out(0)))) return iff->raw_out(0); - if( !is_member(phase->get_loop( iff->raw_out(1) )) ) + if (!is_member(phase->get_loop(iff->raw_out(1)))) return iff->raw_out(1); return NULL; } @@ -63,7 +63,7 @@ //------------------------------record_for_igvn---------------------------- // Put loop body on igvn work list void IdealLoopTree::record_for_igvn() { - for( uint i = 0; i < _body.size(); i++ ) { + for (uint i = 0; i < _body.size(); i++) { Node *n = _body.at(i); _phase->_igvn._worklist.push(n); } @@ -145,7 +145,9 @@ Node *exit = is_loop_exit(iff); if (exit) { float exit_prob = iff->_prob; - if (exit->Opcode() == Op_IfFalse) exit_prob = 1.0 - exit_prob; + if (exit->Opcode() == Op_IfFalse) { + exit_prob = 1.0 - exit_prob; + } if (exit_prob > PROB_MIN) { float exit_cnt = iff->_fcnt * exit_prob; return exit_cnt; @@ -202,7 +204,7 @@ // Now compute a loop exit count float loop_exit_cnt = 0.0f; if (_child == NULL) { - for( uint i = 0; i < _body.size(); i++ ) { + for (uint i = 0; i < _body.size(); i++) { Node *n = _body[i]; loop_exit_cnt += compute_profile_trip_cnt_helper(n); } @@ -342,12 +344,13 @@ //------------------------------policy_peeling--------------------------------- // Return TRUE or FALSE if the loop should be peeled or not. Peel if we can // make some loop-invariant test (usually a null-check) happen before the loop. -bool IdealLoopTree::policy_peeling( PhaseIdealLoop *phase ) const { - Node *test = ((IdealLoopTree*)this)->tail(); - int body_size = ((IdealLoopTree*)this)->_body.size(); +bool IdealLoopTree::policy_peeling(PhaseIdealLoop *phase) const { + IdealLoopTree *loop = (IdealLoopTree*)this; + Node *test = loop->tail(); + int body_size = loop->_body.size(); // Peeling does loop cloning which can result in O(N^2) node construction - if( body_size > 255 /* Prevent overflow for large body_size */ - || (body_size * body_size + phase->C->live_nodes()) > phase->C->max_node_limit() ) { + if (body_size > 255 /* Prevent overflow for large body_size */ + || (body_size * body_size + phase->C->live_nodes()) > phase->C->max_node_limit()) { return false; // too large to safely clone } @@ -359,17 +362,21 @@ } } - while( test != _head ) { // Scan till run off top of loop - if( test->is_If() ) { // Test? + while (test != _head) { // Scan till run off top of loop + if (test->is_If()) { // Test? Node *ctrl = phase->get_ctrl(test->in(1)); - if (ctrl->is_top()) + if (ctrl->is_top()) { return false; // Found dead test on live IF? No peeling! + } // Standard IF only has one input value to check for loop invariance - assert(test->Opcode() == Op_If || test->Opcode() == Op_CountedLoopEnd || test->Opcode() == Op_RangeCheck, "Check this code when new subtype is added"); + assert(test->Opcode() == Op_If || + test->Opcode() == Op_CountedLoopEnd || + test->Opcode() == Op_RangeCheck, + "Check this code when new subtype is added"); // Condition is not a member of this loop? - if( !is_member(phase->get_loop(ctrl)) && - is_loop_exit(test) ) + if (!is_member(phase->get_loop(ctrl)) && is_loop_exit(test)) { return true; // Found reason to peel! + } } // Walk up dominators to loop _head looking for test which is // executed on every path thru loop. @@ -555,7 +562,7 @@ // v // exit // -void PhaseIdealLoop::do_peeling( IdealLoopTree *loop, Node_List &old_new ) { +void PhaseIdealLoop::do_peeling(IdealLoopTree *loop, Node_List &old_new) { C->set_major_progress(); // Peeling a 'main' loop in a pre/main/post situation obfuscates the @@ -604,7 +611,7 @@ Node* old = head->fast_out(j); if (old->in(0) == loop->_head && old->req() == 3 && old->is_Phi()) { Node* new_exit_value = old_new[old->in(LoopNode::LoopBackControl)->_idx]; - if (!new_exit_value ) // Backedge value is ALSO loop invariant? + if (!new_exit_value) // Backedge value is ALSO loop invariant? // Then loop body backedge value remains the same. new_exit_value = old->in(LoopNode::LoopBackControl); _igvn.hash_delete(old); @@ -633,8 +640,9 @@ for (uint j3 = 0; j3 < loop->_body.size(); j3++) { Node *old = loop->_body.at(j3); Node *nnn = old_new[old->_idx]; - if (!has_ctrl(nnn)) + if (!has_ctrl(nnn)) { set_idom(nnn, idom(nnn), dd-1); + } } // Now force out all loop-invariant dominating tests. The optimizer @@ -649,12 +657,12 @@ //------------------------------policy_maximally_unroll------------------------ // Calculate exact loop trip count and return true if loop can be maximally // unrolled. -bool IdealLoopTree::policy_maximally_unroll( PhaseIdealLoop *phase ) const { +bool IdealLoopTree::policy_maximally_unroll(PhaseIdealLoop *phase) const { CountedLoopNode *cl = _head->as_CountedLoop(); assert(cl->is_normal_loop(), ""); - if (!cl->is_valid_counted_loop()) + if (!cl->is_valid_counted_loop()) { return false; // Malformed counted loop - + } if (!cl->has_exact_trip_count()) { // Trip count is not exact. return false; @@ -670,7 +678,7 @@ // size. After all, it will no longer be a loop. uint body_size = _body.size(); uint unroll_limit = (uint)LoopUnrollLimit * 4; - assert( (intx)unroll_limit == LoopUnrollLimit * 4, "LoopUnrollLimit must fit in 32bits"); + assert((intx)unroll_limit == LoopUnrollLimit * 4, "LoopUnrollLimit must fit in 32bits"); if (trip_count > unroll_limit || body_size > unroll_limit) { return false; } @@ -922,14 +930,14 @@ // aligned in a loop (unless the VM guarantees mutual alignment). Note that // if we vectorize short memory ops into longer memory ops, we may want to // increase alignment. -bool IdealLoopTree::policy_align( PhaseIdealLoop *phase ) const { +bool IdealLoopTree::policy_align(PhaseIdealLoop *phase) const { return false; } //------------------------------policy_range_check----------------------------- // Return TRUE or FALSE if the loop should be range-check-eliminated. // Actually we do iteration-splitting, a more powerful form of RCE. -bool IdealLoopTree::policy_range_check( PhaseIdealLoop *phase ) const { +bool IdealLoopTree::policy_range_check(PhaseIdealLoop *phase) const { if (!RangeCheckElimination) return false; CountedLoopNode *cl = _head->as_CountedLoop(); @@ -951,28 +959,32 @@ // Comparing trip+off vs limit Node *bol = iff->in(1); - if (bol->req() != 2) continue; // dead constant test + if (bol->req() != 2) { + continue; // dead constant test + } if (!bol->is_Bool()) { assert(bol->Opcode() == Op_Conv2B, "predicate check only"); continue; } - if (bol->as_Bool()->_test._test == BoolTest::ne) + if (bol->as_Bool()->_test._test == BoolTest::ne) { continue; // not RC - + } Node *cmp = bol->in(1); Node *rc_exp = cmp->in(1); Node *limit = cmp->in(2); Node *limit_c = phase->get_ctrl(limit); - if( limit_c == phase->C->top() ) + if (limit_c == phase->C->top()) { return false; // Found dead test on live IF? No RCE! - if( is_member(phase->get_loop(limit_c) ) ) { + } + if (is_member(phase->get_loop(limit_c))) { // Compare might have operands swapped; commute them rc_exp = cmp->in(2); limit = cmp->in(1); limit_c = phase->get_ctrl(limit); - if( is_member(phase->get_loop(limit_c) ) ) + if (is_member(phase->get_loop(limit_c))) { continue; // Both inputs are loop varying; cannot RCE + } } if (!phase->is_scaled_iv_plus_offset(rc_exp, trip_counter, NULL, NULL)) { @@ -981,8 +993,9 @@ // Yeah! Found a test like 'trip+off vs limit' // Test is an IfNode, has 2 projections. If BOTH are in the loop // we need loop unswitching instead of iteration splitting. - if( is_loop_exit(iff) ) + if (is_loop_exit(iff)) { return true; // Found reason to split iterations + } } // End of is IF } @@ -992,16 +1005,17 @@ //------------------------------policy_peel_only------------------------------- // Return TRUE or FALSE if the loop should NEVER be RCE'd or aligned. Useful // for unrolling loops with NO array accesses. -bool IdealLoopTree::policy_peel_only( PhaseIdealLoop *phase ) const { +bool IdealLoopTree::policy_peel_only(PhaseIdealLoop *phase) const { // check for vectorized loops, any peeling done was already applied if (_head->is_CountedLoop() && _head->as_CountedLoop()->is_unroll_only()) { return false; } - for( uint i = 0; i < _body.size(); i++ ) - if( _body[i]->is_Mem() ) + for (uint i = 0; i < _body.size(); i++) { + if (_body[i]->is_Mem()) { return false; - + } + } // No memory accesses at all! return true; } @@ -1009,33 +1023,31 @@ //------------------------------clone_up_backedge_goo-------------------------- // If Node n lives in the back_ctrl block and cannot float, we clone a private // version of n in preheader_ctrl block and return that, otherwise return n. -Node *PhaseIdealLoop::clone_up_backedge_goo( Node *back_ctrl, Node *preheader_ctrl, Node *n, VectorSet &visited, Node_Stack &clones ) { - if( get_ctrl(n) != back_ctrl ) return n; +Node *PhaseIdealLoop::clone_up_backedge_goo(Node *back_ctrl, Node *preheader_ctrl, Node *n, VectorSet &visited, Node_Stack &clones) { + if (get_ctrl(n) != back_ctrl) return n; // Only visit once if (visited.test_set(n->_idx)) { Node *x = clones.find(n->_idx); - if (x != NULL) - return x; - return n; + return (x != NULL) ? x : n; } Node *x = NULL; // If required, a clone of 'n' // Check for 'n' being pinned in the backedge. - if( n->in(0) && n->in(0) == back_ctrl ) { + if (n->in(0) && n->in(0) == back_ctrl) { assert(clones.find(n->_idx) == NULL, "dead loop"); x = n->clone(); // Clone a copy of 'n' to preheader clones.push(x, n->_idx); - x->set_req( 0, preheader_ctrl ); // Fix x's control input to preheader + x->set_req(0, preheader_ctrl); // Fix x's control input to preheader } // Recursive fixup any other input edges into x. // If there are no changes we can just return 'n', otherwise // we need to clone a private copy and change it. - for( uint i = 1; i < n->req(); i++ ) { - Node *g = clone_up_backedge_goo( back_ctrl, preheader_ctrl, n->in(i), visited, clones ); - if( g != n->in(i) ) { - if( !x ) { + for (uint i = 1; i < n->req(); i++) { + Node *g = clone_up_backedge_goo(back_ctrl, preheader_ctrl, n->in(i), visited, clones); + if (g != n->in(i)) { + if (!x) { assert(clones.find(n->_idx) == NULL, "dead loop"); x = n->clone(); clones.push(x, n->_idx); @@ -1043,11 +1055,11 @@ x->set_req(i, g); } } - if( x ) { // x can legally float to pre-header location - register_new_node( x, preheader_ctrl ); + if (x) { // x can legally float to pre-header location + register_new_node(x, preheader_ctrl); return x; } else { // raise n to cover LCA of uses - set_ctrl( n, find_non_split_ctrl(back_ctrl->in(0)) ); + set_ctrl(n, find_non_split_ctrl(back_ctrl->in(0))); } return n; } @@ -1333,7 +1345,7 @@ // Insert pre and post loops. If peel_only is set, the pre-loop can not have // more iterations added. It acts as a 'peel' only, no lower-bound RCE, no // alignment. Useful to unroll loops that do no array accesses. -void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_new, bool peel_only ) { +void PhaseIdealLoop::insert_pre_post_loops(IdealLoopTree *loop, Node_List &old_new, bool peel_only) { #ifndef PRODUCT if (TraceLoopOpts) { @@ -1348,9 +1360,9 @@ // Find common pieces of the loop being guarded with pre & post loops CountedLoopNode *main_head = loop->_head->as_CountedLoop(); - assert( main_head->is_normal_loop(), "" ); + assert(main_head->is_normal_loop(), ""); CountedLoopEndNode *main_end = main_head->loopexit(); - assert( main_end->outcnt() == 2, "1 true, 1 false path only" ); + assert(main_end->outcnt() == 2, "1 true, 1 false path only"); Node *pre_header= main_head->in(LoopNode::EntryControl); Node *init = main_head->init_trip(); @@ -1362,13 +1374,13 @@ // Need only 1 user of 'bol' because I will be hacking the loop bounds. Node *bol = main_end->in(CountedLoopEndNode::TestValue); - if( bol->outcnt() != 1 ) { + if (bol->outcnt() != 1) { bol = bol->clone(); register_new_node(bol,main_end->in(CountedLoopEndNode::TestControl)); _igvn.replace_input_of(main_end, CountedLoopEndNode::TestValue, bol); } // Need only 1 user of 'cmp' because I will be hacking the loop bounds. - if( cmp->outcnt() != 1 ) { + if (cmp->outcnt() != 1) { cmp = cmp->clone(); register_new_node(cmp,main_end->in(CountedLoopEndNode::TestControl)); _igvn.replace_input_of(bol, 1, cmp); @@ -1405,9 +1417,9 @@ // Find the pre-loop normal exit. Node* pre_exit = pre_end->proj_out(false); - assert( pre_exit->Opcode() == Op_IfFalse, "" ); + assert(pre_exit->Opcode() == Op_IfFalse, ""); IfFalseNode *new_pre_exit = new IfFalseNode(pre_end); - _igvn.register_new_node_with_optimizer( new_pre_exit ); + _igvn.register_new_node_with_optimizer(new_pre_exit); set_idom(new_pre_exit, pre_end, dd_main_head); set_loop(new_pre_exit, outer_loop->_parent); @@ -1416,26 +1428,26 @@ // zero-trip guard will become the minimum-trip guard when we unroll // the main-loop. Node *min_opaq = new Opaque1Node(C, limit); - Node *min_cmp = new CmpINode( pre_incr, min_opaq ); - Node *min_bol = new BoolNode( min_cmp, b_test ); - register_new_node( min_opaq, new_pre_exit ); - register_new_node( min_cmp , new_pre_exit ); - register_new_node( min_bol , new_pre_exit ); + Node *min_cmp = new CmpINode(pre_incr, min_opaq); + Node *min_bol = new BoolNode(min_cmp, b_test); + register_new_node(min_opaq, new_pre_exit); + register_new_node(min_cmp , new_pre_exit); + register_new_node(min_bol , new_pre_exit); // Build the IfNode (assume the main-loop is executed always). - IfNode *min_iff = new IfNode( new_pre_exit, min_bol, PROB_ALWAYS, COUNT_UNKNOWN ); - _igvn.register_new_node_with_optimizer( min_iff ); + IfNode *min_iff = new IfNode(new_pre_exit, min_bol, PROB_ALWAYS, COUNT_UNKNOWN); + _igvn.register_new_node_with_optimizer(min_iff); set_idom(min_iff, new_pre_exit, dd_main_head); set_loop(min_iff, outer_loop->_parent); // Plug in the false-path, taken if we need to skip main-loop - _igvn.hash_delete( pre_exit ); + _igvn.hash_delete(pre_exit); pre_exit->set_req(0, min_iff); set_idom(pre_exit, min_iff, dd_main_head); set_idom(pre_exit->unique_ctrl_out(), min_iff, dd_main_head); // Make the true-path, must enter the main loop - Node *min_taken = new IfTrueNode( min_iff ); - _igvn.register_new_node_with_optimizer( min_taken ); + Node *min_taken = new IfTrueNode(min_iff); + _igvn.register_new_node_with_optimizer(min_taken); set_idom(min_taken, min_iff, dd_main_head); set_loop(min_taken, outer_loop->_parent); // Plug in the true path @@ -1450,14 +1462,14 @@ // fall-out values of the pre-loop. for (DUIterator i2 = main_head->outs(); main_head->has_out(i2); i2++) { Node* main_phi = main_head->out(i2); - if( main_phi->is_Phi() && main_phi->in(0) == main_head && main_phi->outcnt() > 0 ) { + if (main_phi->is_Phi() && main_phi->in(0) == main_head && main_phi->outcnt() > 0) { Node* pre_phi = old_new[main_phi->_idx]; Node* fallpre = clone_up_backedge_goo(pre_head->back_control(), main_head->skip_strip_mined()->in(LoopNode::EntryControl), pre_phi->in(LoopNode::LoopBackControl), visited, clones); _igvn.hash_delete(main_phi); - main_phi->set_req( LoopNode::EntryControl, fallpre ); + main_phi->set_req(LoopNode::EntryControl, fallpre); } } @@ -1472,7 +1484,7 @@ // dependencies. // CastII for the main loop: - Node* castii = cast_incr_before_loop( pre_incr, min_taken, main_head ); + Node* castii = cast_incr_before_loop(pre_incr, min_taken, main_head); assert(castii != NULL, "no castII inserted"); assert(post_head->in(1)->is_IfProj(), "must be zero-trip guard If node projection of the post loop"); copy_skeleton_predicates_to_main_loop(pre_head, castii, stride, outer_loop, outer_main_head, dd_main_head, @@ -1481,18 +1493,18 @@ // Step B4: Shorten the pre-loop to run only 1 iteration (for now). // RCE and alignment may change this later. Node *cmp_end = pre_end->cmp_node(); - assert( cmp_end->in(2) == limit, "" ); - Node *pre_limit = new AddINode( init, stride ); + assert(cmp_end->in(2) == limit, ""); + Node *pre_limit = new AddINode(init, stride); // Save the original loop limit in this Opaque1 node for // use by range check elimination. Node *pre_opaq = new Opaque1Node(C, pre_limit, limit); - register_new_node( pre_limit, pre_head->in(0) ); - register_new_node( pre_opaq , pre_head->in(0) ); + register_new_node(pre_limit, pre_head->in(0)); + register_new_node(pre_opaq , pre_head->in(0)); // Since no other users of pre-loop compare, I can hack limit directly - assert( cmp_end->outcnt() == 1, "no other users" ); + assert(cmp_end->outcnt() == 1, "no other users"); _igvn.hash_delete(cmp_end); cmp_end->set_req(2, peel_only ? pre_limit : pre_opaq); @@ -1512,24 +1524,26 @@ // Modify pre loop end condition Node* pre_bol = pre_end->in(CountedLoopEndNode::TestValue)->as_Bool(); BoolNode* new_bol0 = new BoolNode(pre_bol->in(1), new_test); - register_new_node( new_bol0, pre_head->in(0) ); + register_new_node(new_bol0, pre_head->in(0)); _igvn.replace_input_of(pre_end, CountedLoopEndNode::TestValue, new_bol0); // Modify main loop guard condition assert(min_iff->in(CountedLoopEndNode::TestValue) == min_bol, "guard okay"); BoolNode* new_bol1 = new BoolNode(min_bol->in(1), new_test); - register_new_node( new_bol1, new_pre_exit ); + register_new_node(new_bol1, new_pre_exit); _igvn.hash_delete(min_iff); min_iff->set_req(CountedLoopEndNode::TestValue, new_bol1); // Modify main loop end condition BoolNode* main_bol = main_end->in(CountedLoopEndNode::TestValue)->as_Bool(); BoolNode* new_bol2 = new BoolNode(main_bol->in(1), new_test); - register_new_node( new_bol2, main_end->in(CountedLoopEndNode::TestControl) ); + register_new_node(new_bol2, main_end->in(CountedLoopEndNode::TestControl)); _igvn.replace_input_of(main_end, CountedLoopEndNode::TestValue, new_bol2); } // Flag main loop main_head->set_main_loop(); - if( peel_only ) main_head->set_main_no_pre_loop(); + if (peel_only) { + main_head->set_main_no_pre_loop(); + } // Subtract a trip count for the pre-loop. main_head->set_trip_count(main_head->trip_count() - 1); @@ -1548,8 +1562,9 @@ //------------------------------insert_vector_post_loop------------------------ // Insert a copy of the atomic unrolled vectorized main loop as a post loop, -// unroll_policy has already informed us that more unrolling is about to happen to -// the main loop. The resultant post loop will serve as a vectorized drain loop. +// unroll_policy has already informed us that more unrolling is about to +// happen to the main loop. The resultant post loop will serve as a +// vectorized drain loop. void PhaseIdealLoop::insert_vector_post_loop(IdealLoopTree *loop, Node_List &old_new) { if (!loop->_head->is_CountedLoop()) return; @@ -1798,7 +1813,7 @@ //------------------------------do_unroll-------------------------------------- // Unroll the loop body one step - make each trip do 2 iterations. -void PhaseIdealLoop::do_unroll( IdealLoopTree *loop, Node_List &old_new, bool adjust_min_trip ) { +void PhaseIdealLoop::do_unroll(IdealLoopTree *loop, Node_List &old_new, bool adjust_min_trip) { assert(LoopUnrollLimit, ""); CountedLoopNode *loop_head = loop->_head->as_CountedLoop(); CountedLoopEndNode *loop_end = loop_head->loopexit(); @@ -1821,8 +1836,8 @@ Node_List rpo_list; VectorSet visited(arena); visited.set(loop_head->_idx); - rpo( loop_head, stack, visited, rpo_list ); - dump(loop, rpo_list.size(), rpo_list ); + rpo(loop_head, stack, visited, rpo_list); + dump(loop, rpo_list.size(), rpo_list); } #endif @@ -1917,8 +1932,8 @@ // zero trip guard limit will be different from loop limit. assert(has_ctrl(opaq), "should have it"); Node* opaq_ctrl = get_ctrl(opaq); - limit = new Opaque2Node( C, limit ); - register_new_node( limit, opaq_ctrl ); + limit = new Opaque2Node(C, limit); + register_new_node(limit, opaq_ctrl); } if ((stride_con > 0 && (java_subtract(limit_type->_lo, stride_con) < limit_type->_lo)) || (stride_con < 0 && (java_subtract(limit_type->_hi, stride_con) > limit_type->_hi))) { @@ -1959,11 +1974,11 @@ adj_limit = new SubINode(limit, stride); } assert(old_limit != NULL && adj_limit != NULL, ""); - register_new_node( adj_limit, ctrl ); // adjust amount + register_new_node(adj_limit, ctrl); // adjust amount Node* adj_cmp = new CmpINode(old_limit, adj_limit); - register_new_node( adj_cmp, ctrl ); + register_new_node(adj_cmp, ctrl); Node* adj_bool = new BoolNode(adj_cmp, bt); - register_new_node( adj_bool, ctrl ); + register_new_node(adj_bool, ctrl); new_limit = new CMoveINode(adj_bool, adj_limit, adj_max, TypeInt::INT); } register_new_node(new_limit, ctrl); @@ -2017,10 +2032,10 @@ // Make the fall-in from the original come from the fall-out of the clone. for (DUIterator_Fast jmax, j = loop_head->fast_outs(jmax); j < jmax; j++) { Node* phi = loop_head->fast_out(j); - if( phi->is_Phi() && phi->in(0) == loop_head && phi->outcnt() > 0 ) { + if (phi->is_Phi() && phi->in(0) == loop_head && phi->outcnt() > 0) { Node *newphi = old_new[phi->_idx]; - _igvn.hash_delete( phi ); - _igvn.hash_delete( newphi ); + _igvn.hash_delete(phi); + _igvn.hash_delete(newphi); phi ->set_req(LoopNode:: EntryControl, newphi->in(LoopNode::LoopBackControl)); newphi->set_req(LoopNode::LoopBackControl, phi ->in(LoopNode::LoopBackControl)); @@ -2028,7 +2043,7 @@ } } Node *clone_head = old_new[loop_head->_idx]; - _igvn.hash_delete( clone_head ); + _igvn.hash_delete(clone_head); loop_head ->set_req(LoopNode:: EntryControl, clone_head->in(LoopNode::LoopBackControl)); clone_head->set_req(LoopNode::LoopBackControl, loop_head ->in(LoopNode::LoopBackControl)); loop_head ->set_req(LoopNode::LoopBackControl, C->top()); @@ -2039,18 +2054,19 @@ // Kill the clone's backedge Node *newcle = old_new[loop_end->_idx]; - _igvn.hash_delete( newcle ); + _igvn.hash_delete(newcle); Node *one = _igvn.intcon(1); set_ctrl(one, C->root()); newcle->set_req(1, one); // Force clone into same loop body uint max = loop->_body.size(); - for( uint k = 0; k < max; k++ ) { + for (uint k = 0; k < max; k++) { Node *old = loop->_body.at(k); Node *nnn = old_new[old->_idx]; loop->_body.push(nnn); - if (!has_ctrl(old)) + if (!has_ctrl(old)) { set_loop(nnn, loop); + } } loop->record_for_igvn(); @@ -2062,7 +2078,7 @@ for (uint i = 0; i < loop->_body.size(); i++) { loop->_body.at(i)->dump(); } - if(C->clone_map().is_debug()) { + if (C->clone_map().is_debug()) { tty->print("\nCloneMap\n"); Dict* dict = C->clone_map().dict(); DictI i(dict); @@ -2083,7 +2099,7 @@ //------------------------------do_maximally_unroll---------------------------- -void PhaseIdealLoop::do_maximally_unroll( IdealLoopTree *loop, Node_List &old_new ) { +void PhaseIdealLoop::do_maximally_unroll(IdealLoopTree *loop, Node_List &old_new) { CountedLoopNode *cl = loop->_head->as_CountedLoop(); assert(cl->has_exact_trip_count(), "trip count is not exact"); assert(cl->trip_count() > 0, ""); @@ -2286,7 +2302,7 @@ Node* one = _igvn.longcon(1); set_ctrl(one, C->root()); Node* plus_one = new AddLNode(offset, one); - register_new_node( plus_one, pre_ctrl ); + register_new_node(plus_one, pre_ctrl); *pre_limit = adjust_limit(!is_positive_stride, scale, plus_one, upper_limit, *pre_limit, pre_ctrl, round); // The underflow limit: low_limit <= scale*I+offset @@ -2403,7 +2419,7 @@ Node* predicate_proj, int scale_con, Node* offset, Node* limit, jint stride_con, Node* value) { bool overflow = false; - BoolNode* bol = rc_predicate(loop, predicate_proj, scale_con, offset, value, NULL, stride_con, limit, (stride_con > 0) != (scale_con > 0), overflow); + BoolNode* bol = rc_predicate(loop, predicate_proj, scale_con, offset, value, NULL, stride_con, limit, (stride_con > 0) != (scale_con > 0), overflow, false); Node* opaque_bol = new Opaque4Node(C, bol, _igvn.intcon(1)); register_new_node(opaque_bol, predicate_proj); IfNode* new_iff = NULL; @@ -2427,7 +2443,7 @@ //------------------------------do_range_check--------------------------------- // Eliminate range-checks and other trip-counter vs loop-invariant tests. -int PhaseIdealLoop::do_range_check( IdealLoopTree *loop, Node_List &old_new ) { +int PhaseIdealLoop::do_range_check(IdealLoopTree *loop, Node_List &old_new) { #ifndef PRODUCT if (PrintOpto && VerifyLoopOptimizations) { tty->print("Range Check Elimination "); @@ -2437,15 +2453,16 @@ loop->dump_head(); } #endif + assert(RangeCheckElimination, ""); CountedLoopNode *cl = loop->_head->as_CountedLoop(); // If we fail before trying to eliminate range checks, set multiversion state int closed_range_checks = 1; // protect against stride not being a constant - if (!cl->stride_is_con()) + if (!cl->stride_is_con()) { return closed_range_checks; - + } // Find the trip counter; we are iteration splitting based on it Node *trip_counter = cl->phi(); // Find the main loop limit; we will trim it's iterations @@ -2460,7 +2477,7 @@ } // Need to find the main-loop zero-trip guard - Node *ctrl = cl->skip_predicates(); + Node *ctrl = cl->skip_predicates(); Node *iffm = ctrl->in(0); Node *opqzm = iffm->in(1)->in(1)->in(2); assert(opqzm->in(1) == main_limit, "do not understand situation"); @@ -2478,8 +2495,9 @@ // Occasionally it's possible for a pre-loop Opaque1 node to be // optimized away and then another round of loop opts attempted. // We can not optimize this particular loop in that case. - if (pre_opaq1->Opcode() != Op_Opaque1) + if (pre_opaq1->Opcode() != Op_Opaque1) { return closed_range_checks; + } Opaque1Node *pre_opaq = (Opaque1Node*)pre_opaq1; Node *pre_limit = pre_opaq->in(1); @@ -2489,9 +2507,9 @@ // Ensure the original loop limit is available from the // pre-loop Opaque1 node. Node *orig_limit = pre_opaq->original_loop_limit(); - if (orig_limit == NULL || _igvn.type(orig_limit) == Type::TOP) + if (orig_limit == NULL || _igvn.type(orig_limit) == Type::TOP) { return closed_range_checks; - + } // Must know if its a count-up or count-down loop int stride_con = cl->stride_con(); @@ -2509,8 +2527,9 @@ Node* predicate_proj = cl->skip_strip_mined()->in(LoopNode::EntryControl); assert(predicate_proj->is_Proj() && predicate_proj->in(0)->is_If(), "if projection only"); + // Check loop body for tests of trip-counter plus loop-invariant vs loop-variant. - for( uint i = 0; i < loop->_body.size(); i++ ) { + for (uint i = 0; i < loop->_body.size(); i++) { Node *iff = loop->_body[i]; if (iff->Opcode() == Op_If || iff->Opcode() == Op_RangeCheck) { // Test? @@ -2518,18 +2537,18 @@ // we need loop unswitching instead of iteration splitting. closed_range_checks++; Node *exit = loop->is_loop_exit(iff); - if( !exit ) continue; + if (!exit) continue; int flip = (exit->Opcode() == Op_IfTrue) ? 1 : 0; // Get boolean condition to test Node *i1 = iff->in(1); - if( !i1->is_Bool() ) continue; + if (!i1->is_Bool()) continue; BoolNode *bol = i1->as_Bool(); BoolTest b_test = bol->_test; // Flip sense of test if exit condition is flipped - if( flip ) + if (flip) { b_test = b_test.negate(); - + } // Get compare Node *cmp = bol->in(1); @@ -2539,14 +2558,15 @@ int scale_con= 1; // Assume trip counter not scaled Node *limit_c = get_ctrl(limit); - if( loop->is_member(get_loop(limit_c) ) ) { + if (loop->is_member(get_loop(limit_c))) { // Compare might have operands swapped; commute them b_test = b_test.commute(); rc_exp = cmp->in(2); limit = cmp->in(1); limit_c = get_ctrl(limit); - if( loop->is_member(get_loop(limit_c) ) ) + if (loop->is_member(get_loop(limit_c))) { continue; // Both inputs are loop varying; cannot RCE + } } // Here we know 'limit' is loop invariant @@ -2565,8 +2585,9 @@ } Node *offset_c = get_ctrl(offset); - if( loop->is_member( get_loop(offset_c) ) ) + if (loop->is_member(get_loop(offset_c))) { continue; // Offset is not really loop invariant + } // Here we know 'offset' is loop invariant. // As above for the 'limit', the 'offset' maybe pinned below the @@ -2597,8 +2618,8 @@ register_new_node(limit, pre_ctrl); // Adjust pre and main loop limits to guard the correct iteration set - if( cmp->Opcode() == Op_CmpU ) {// Unsigned compare is really 2 tests - if( b_test._test == BoolTest::lt ) { // Range checks always use lt + if (cmp->Opcode() == Op_CmpU) {// Unsigned compare is really 2 tests + if (b_test._test == BoolTest::lt) { // Range checks always use lt // The underflow and overflow limits: 0 <= scale*I+offset < limit add_constraint(stride_con, lscale_con, offset, zero, limit, pre_ctrl, &pre_limit, &main_limit); Node* init = cl->init_trip(); @@ -2629,22 +2650,22 @@ continue; // In release mode, ignore it } } else { // Otherwise work on normal compares - switch( b_test._test ) { + switch (b_test._test) { case BoolTest::gt: // Fall into GE case case BoolTest::ge: // Convert (I*scale+offset) >= Limit to (I*(-scale)+(-offset)) <= -Limit lscale_con = -lscale_con; offset = new SubLNode(zero, offset); - register_new_node( offset, pre_ctrl ); + register_new_node(offset, pre_ctrl); limit = new SubLNode(zero, limit); - register_new_node( limit, pre_ctrl ); + register_new_node(limit, pre_ctrl); // Fall into LE case case BoolTest::le: if (b_test._test != BoolTest::gt) { // Convert X <= Y to X < Y+1 limit = new AddLNode(limit, one); - register_new_node( limit, pre_ctrl ); + register_new_node(limit, pre_ctrl); } // Fall into LT case case BoolTest::lt: @@ -2663,7 +2684,7 @@ // Kill the eliminated test C->set_major_progress(); - Node *kill_con = _igvn.intcon( 1-flip ); + Node *kill_con = _igvn.intcon(1-flip); set_ctrl(kill_con, C->root()); _igvn.replace_input_of(iff, 1, kill_con); // Find surviving projection @@ -2683,9 +2704,7 @@ if (int_limit->Opcode() == Op_LoadRange) { closed_range_checks--; } - } // End of is IF - } if (predicate_proj != cl->skip_strip_mined()->in(LoopNode::EntryControl)) { _igvn.replace_input_of(cl->skip_strip_mined(), LoopNode::EntryControl, predicate_proj); @@ -2707,15 +2726,15 @@ Node *main_cle = cl->loopexit(); Node *main_bol = main_cle->in(1); // Hacking loop bounds; need private copies of exit test - if( main_bol->outcnt() > 1 ) {// BoolNode shared? - main_bol = main_bol->clone();// Clone a private BoolNode - register_new_node( main_bol, main_cle->in(0) ); + if (main_bol->outcnt() > 1) { // BoolNode shared? + main_bol = main_bol->clone(); // Clone a private BoolNode + register_new_node(main_bol, main_cle->in(0)); _igvn.replace_input_of(main_cle, 1, main_bol); } Node *main_cmp = main_bol->in(1); - if( main_cmp->outcnt() > 1 ) { // CmpNode shared? - main_cmp = main_cmp->clone();// Clone a private CmpNode - register_new_node( main_cmp, main_cle->in(0) ); + if (main_cmp->outcnt() > 1) { // CmpNode shared? + main_cmp = main_cmp->clone(); // Clone a private CmpNode + register_new_node(main_cmp, main_cle->in(0)); _igvn.replace_input_of(main_bol, 1, main_cmp); } assert(main_limit == cl->limit() || get_ctrl(main_limit) == pre_ctrl, "wrong control for added limit"); @@ -2731,7 +2750,7 @@ // Hack the now-private loop bounds _igvn.replace_input_of(main_cmp, 2, main_limit); // The OpaqueNode is unshared by design - assert( opqzm->outcnt() == 1, "cannot hack shared node" ); + assert(opqzm->outcnt() == 1, "cannot hack shared node"); _igvn.replace_input_of(opqzm, 1, main_limit); return closed_range_checks; @@ -2900,66 +2919,68 @@ //------------------------------DCE_loop_body---------------------------------- // Remove simplistic dead code from loop body void IdealLoopTree::DCE_loop_body() { - for( uint i = 0; i < _body.size(); i++ ) - if( _body.at(i)->outcnt() == 0 ) - _body.map( i--, _body.pop() ); + for (uint i = 0; i < _body.size(); i++) { + if (_body.at(i)->outcnt() == 0) { + _body.map(i--, _body.pop()); + } + } } //------------------------------adjust_loop_exit_prob-------------------------- // Look for loop-exit tests with the 50/50 (or worse) guesses from the parsing stage. // Replace with a 1-in-10 exit guess. -void IdealLoopTree::adjust_loop_exit_prob( PhaseIdealLoop *phase ) { +void IdealLoopTree::adjust_loop_exit_prob(PhaseIdealLoop *phase) { Node *test = tail(); - while( test != _head ) { + while (test != _head) { uint top = test->Opcode(); - if( top == Op_IfTrue || top == Op_IfFalse ) { + if (top == Op_IfTrue || top == Op_IfFalse) { int test_con = ((ProjNode*)test)->_con; assert(top == (uint)(test_con? Op_IfTrue: Op_IfFalse), "sanity"); IfNode *iff = test->in(0)->as_If(); - if( iff->outcnt() == 2 ) { // Ignore dead tests + if (iff->outcnt() == 2) { // Ignore dead tests Node *bol = iff->in(1); - if( bol && bol->req() > 1 && bol->in(1) && - ((bol->in(1)->Opcode() == Op_StorePConditional ) || - (bol->in(1)->Opcode() == Op_StoreIConditional ) || - (bol->in(1)->Opcode() == Op_StoreLConditional ) || + if (bol && bol->req() > 1 && bol->in(1) && + ((bol->in(1)->Opcode() == Op_StorePConditional) || + (bol->in(1)->Opcode() == Op_StoreIConditional) || + (bol->in(1)->Opcode() == Op_StoreLConditional) || #if INCLUDE_SHENANDOAHGC - (bol->in(1)->Opcode() == Op_ShenandoahCompareAndExchangeP ) || - (bol->in(1)->Opcode() == Op_ShenandoahCompareAndExchangeN ) || - (bol->in(1)->Opcode() == Op_ShenandoahWeakCompareAndSwapP ) || - (bol->in(1)->Opcode() == Op_ShenandoahWeakCompareAndSwapN ) || - (bol->in(1)->Opcode() == Op_ShenandoahCompareAndSwapP ) || - (bol->in(1)->Opcode() == Op_ShenandoahCompareAndSwapN ) || -#endif - (bol->in(1)->Opcode() == Op_CompareAndExchangeB ) || - (bol->in(1)->Opcode() == Op_CompareAndExchangeS ) || - (bol->in(1)->Opcode() == Op_CompareAndExchangeI ) || - (bol->in(1)->Opcode() == Op_CompareAndExchangeL ) || - (bol->in(1)->Opcode() == Op_CompareAndExchangeP ) || - (bol->in(1)->Opcode() == Op_CompareAndExchangeN ) || - (bol->in(1)->Opcode() == Op_WeakCompareAndSwapB ) || - (bol->in(1)->Opcode() == Op_WeakCompareAndSwapS ) || - (bol->in(1)->Opcode() == Op_WeakCompareAndSwapI ) || - (bol->in(1)->Opcode() == Op_WeakCompareAndSwapL ) || - (bol->in(1)->Opcode() == Op_WeakCompareAndSwapP ) || - (bol->in(1)->Opcode() == Op_WeakCompareAndSwapN ) || - (bol->in(1)->Opcode() == Op_CompareAndSwapB ) || - (bol->in(1)->Opcode() == Op_CompareAndSwapS ) || - (bol->in(1)->Opcode() == Op_CompareAndSwapI ) || - (bol->in(1)->Opcode() == Op_CompareAndSwapL ) || - (bol->in(1)->Opcode() == Op_CompareAndSwapP ) || - (bol->in(1)->Opcode() == Op_CompareAndSwapN ))) + (bol->in(1)->Opcode() == Op_ShenandoahCompareAndExchangeP) || + (bol->in(1)->Opcode() == Op_ShenandoahCompareAndExchangeN) || + (bol->in(1)->Opcode() == Op_ShenandoahWeakCompareAndSwapP) || + (bol->in(1)->Opcode() == Op_ShenandoahWeakCompareAndSwapN) || + (bol->in(1)->Opcode() == Op_ShenandoahCompareAndSwapP) || + (bol->in(1)->Opcode() == Op_ShenandoahCompareAndSwapN) || +#endif + (bol->in(1)->Opcode() == Op_CompareAndExchangeB) || + (bol->in(1)->Opcode() == Op_CompareAndExchangeS) || + (bol->in(1)->Opcode() == Op_CompareAndExchangeI) || + (bol->in(1)->Opcode() == Op_CompareAndExchangeL) || + (bol->in(1)->Opcode() == Op_CompareAndExchangeP) || + (bol->in(1)->Opcode() == Op_CompareAndExchangeN) || + (bol->in(1)->Opcode() == Op_WeakCompareAndSwapB) || + (bol->in(1)->Opcode() == Op_WeakCompareAndSwapS) || + (bol->in(1)->Opcode() == Op_WeakCompareAndSwapI) || + (bol->in(1)->Opcode() == Op_WeakCompareAndSwapL) || + (bol->in(1)->Opcode() == Op_WeakCompareAndSwapP) || + (bol->in(1)->Opcode() == Op_WeakCompareAndSwapN) || + (bol->in(1)->Opcode() == Op_CompareAndSwapB) || + (bol->in(1)->Opcode() == Op_CompareAndSwapS) || + (bol->in(1)->Opcode() == Op_CompareAndSwapI) || + (bol->in(1)->Opcode() == Op_CompareAndSwapL) || + (bol->in(1)->Opcode() == Op_CompareAndSwapP) || + (bol->in(1)->Opcode() == Op_CompareAndSwapN))) return; // Allocation loops RARELY take backedge // Find the OTHER exit path from the IF Node* ex = iff->proj_out(1-test_con); float p = iff->_prob; - if( !phase->is_member( this, ex ) && iff->_fcnt == COUNT_UNKNOWN ) { - if( top == Op_IfTrue ) { - if( p < (PROB_FAIR + PROB_UNLIKELY_MAG(3))) { + if (!phase->is_member(this, ex) && iff->_fcnt == COUNT_UNKNOWN) { + if (top == Op_IfTrue) { + if (p < (PROB_FAIR + PROB_UNLIKELY_MAG(3))) { iff->_prob = PROB_STATIC_FREQUENT; } } else { - if( p > (PROB_FAIR - PROB_UNLIKELY_MAG(3))) { + if (p > (PROB_FAIR - PROB_UNLIKELY_MAG(3))) { iff->_prob = PROB_STATIC_INFREQUENT; } } @@ -3028,20 +3049,22 @@ // the loop. bool IdealLoopTree::do_remove_empty_loop(PhaseIdealLoop *phase) { // Minimum size must be empty loop - if (_body.size() > EMPTY_LOOP_SIZE) + if (_body.size() > EMPTY_LOOP_SIZE) { return false; - - if (!_head->is_CountedLoop()) - return false; // Dead loop + } + if (!_head->is_CountedLoop()) { + return false; // Dead loop + } CountedLoopNode *cl = _head->as_CountedLoop(); - if (!cl->is_valid_counted_loop()) - return false; // Malformed loop - if (!phase->is_member(this, phase->get_ctrl(cl->loopexit()->in(CountedLoopEndNode::TestValue)))) - return false; // Infinite loop - + if (!cl->is_valid_counted_loop()) { + return false; // Malformed loop + } + if (!phase->is_member(this, phase->get_ctrl(cl->loopexit()->in(CountedLoopEndNode::TestValue)))) { + return false; // Infinite loop + } if (cl->is_pre_loop()) { - // If the loop we are removing is a pre-loop then the main and - // post loop can be removed as well + // If the loop we are removing is a pre-loop then the main and post loop + // can be removed as well. remove_main_post_loops(cl, phase); } @@ -3051,11 +3074,11 @@ for (DUIterator_Fast imax, i = cl->fast_outs(imax); i < imax; i++) { Node* n = cl->fast_out(i); if (n->Opcode() == Op_Phi) { - assert(iv == NULL, "Too many phis" ); + assert(iv == NULL, "Too many phis"); iv = n; } } - assert(iv == cl->phi(), "Wrong phi" ); + assert(iv == cl->phi(), "Wrong phi"); #endif // main and post loops have explicitly created zero trip guard @@ -3136,7 +3159,7 @@ } // Note: the final value after increment should not overflow since // counted loop has limit check predicate. - Node *final = new SubINode( exact_limit, cl->stride() ); + Node *final = new SubINode(exact_limit, cl->stride()); phase->register_new_node(final,cl->in(LoopNode::EntryControl)); phase->_igvn.replace_node(phi,final); phase->C->set_major_progress(); @@ -3155,7 +3178,7 @@ } #ifndef PRODUCT - if(TraceLoopOpts) { + if (TraceLoopOpts) { tty->print("OneIteration "); this->dump_head(); } @@ -3176,7 +3199,7 @@ //============================================================================= //------------------------------iteration_split_impl--------------------------- -bool IdealLoopTree::iteration_split_impl( PhaseIdealLoop *phase, Node_List &old_new ) { +bool IdealLoopTree::iteration_split_impl(PhaseIdealLoop *phase, Node_List &old_new) { // Compute loop trip count if possible. compute_trip_count(phase); @@ -3304,14 +3327,14 @@ phase->do_unroll(this, old_new, true); } - // Adjust the pre-loop limits to align the main body - // iterations. - if (should_align) + // Adjust the pre-loop limits to align the main body iterations. + if (should_align) { Unimplemented(); - + } } else { // Else we have an unchanged counted loop - if (should_peel) // Might want to peel but do nothing else + if (should_peel) { // Might want to peel but do nothing else phase->do_peeling(this,old_new); + } } return true; } @@ -3319,10 +3342,11 @@ //============================================================================= //------------------------------iteration_split-------------------------------- -bool IdealLoopTree::iteration_split( PhaseIdealLoop *phase, Node_List &old_new ) { +bool IdealLoopTree::iteration_split(PhaseIdealLoop* phase, Node_List &old_new) { // Recursively iteration split nested loops - if (_child && !_child->iteration_split(phase, old_new)) + if (_child && !_child->iteration_split(phase, old_new)) { return false; + } // Clean out prior deadwood DCE_loop_body(); @@ -3349,8 +3373,9 @@ // trip counter when there was no major reshaping. phase->reorg_offsets(this); - if (_next && !_next->iteration_split(phase, old_new)) + if (_next && !_next->iteration_split(phase, old_new)) { return false; + } return true; } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/opto/loopnode.hpp openjdk-11-11.0.15+10/src/hotspot/share/opto/loopnode.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/opto/loopnode.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/opto/loopnode.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -1105,7 +1105,8 @@ BoolNode* rc_predicate(IdealLoopTree *loop, Node* ctrl, int scale, Node* offset, Node* init, Node* limit, jint stride, - Node* range, bool upper, bool &overflow); + Node* range, bool upper, bool &overflow, + bool negate); // Implementation of the loop predication to promote checks outside the loop bool loop_predication_impl(IdealLoopTree *loop); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/opto/loopopts.cpp openjdk-11-11.0.15+10/src/hotspot/share/opto/loopopts.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/opto/loopopts.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/opto/loopopts.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1095,6 +1095,16 @@ if (!n->in(0)->is_Region()) { return false; } + + IfNode* n_if = n->as_If(); + if (n_if->proj_out(0)->outcnt() > 1 || n_if->proj_out(1)->outcnt() > 1) { + // Removing the dominated If node by using the split-if optimization does not work if there are data dependencies. + // Some data dependencies depend on its immediate dominator If node and should not be separated from it (e.g. null + // checks, division by zero checks etc.). Bail out for now until data dependencies are correctly handled when + // optimizing back-to-back ifs. + return false; + } + Node* region = n->in(0); Node* dom = idom(region); if (!dom->is_If() || dom->in(1) != n->in(1)) { diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/opto/mulnode.cpp openjdk-11-11.0.15+10/src/hotspot/share/opto/mulnode.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/opto/mulnode.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/opto/mulnode.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -51,7 +51,7 @@ //------------------------------Identity--------------------------------------- // Multiplying a one preserves the other argument Node* MulNode::Identity(PhaseGVN* phase) { - register const Type *one = mul_id(); // The multiplicative identity + const Type *one = mul_id(); // The multiplicative identity if( phase->type( in(1) )->higher_equal( one ) ) return in(2); if( phase->type( in(2) )->higher_equal( one ) ) return in(1); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/opto/postaloc.cpp openjdk-11-11.0.15+10/src/hotspot/share/opto/postaloc.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/opto/postaloc.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/opto/postaloc.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -600,7 +600,7 @@ if( phi != x && u != x ) // Found a different input u = u ? NodeSentinel : x; // Capture unique input, or NodeSentinel for 2nd input } - if (u != NodeSentinel) { // Junk Phi. Remove + if (u != NodeSentinel || phi->outcnt() == 0) { // Junk Phi. Remove phi->replace_by(u); j -= yank_if_dead(phi, block, &value, ®nd); phi_dex--; diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/opto/runtime.cpp openjdk-11-11.0.15+10/src/hotspot/share/opto/runtime.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/opto/runtime.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/opto/runtime.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -68,6 +68,7 @@ #include "runtime/sharedRuntime.hpp" #include "runtime/signature.hpp" #include "runtime/threadCritical.hpp" +#include "runtime/threadWXSetters.inline.hpp" #include "runtime/vframe.hpp" #include "runtime/vframeArray.hpp" #include "runtime/vframe_hp.hpp" @@ -1444,6 +1445,10 @@ // *THIS IS NOT RECOMMENDED PROGRAMMING STYLE* // address OptoRuntime::rethrow_C(oopDesc* exception, JavaThread* thread, address ret_pc) { + + // Enable WXWrite: the function called directly by compiled code. + MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, thread)); + #ifndef PRODUCT SharedRuntime::_rethrow_ctr++; // count rethrows #endif diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/prims/jni.cpp openjdk-11-11.0.15+10/src/hotspot/share/prims/jni.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/prims/jni.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/prims/jni.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,6 +1,7 @@ /* * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Red Hat, Inc. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -4055,6 +4056,7 @@ // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving. ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native); + MACOS_AARCH64_ONLY(thread->enable_wx(WXExec)); } else { // If create_vm exits because of a pending exception, exit with that // exception. In the future when we figure out how to reclaim memory, @@ -4149,6 +4151,10 @@ // Since this is not a JVM_ENTRY we have to set the thread state manually before entering. JavaThread* thread = JavaThread::current(); + + // We are going to VM, change W^X state to the expected one. + MACOS_AARCH64_ONLY(WXMode oldmode = thread->enable_wx(WXWrite)); + ThreadStateTransition::transition_from_native(thread, _thread_in_vm); if (Threads::destroy_vm()) { // Should not change thread state, VM is gone @@ -4157,6 +4163,7 @@ return res; } else { ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native); + MACOS_AARCH64_ONLY(thread->enable_wx(oldmode)); res = JNI_ERR; return res; } @@ -4210,6 +4217,7 @@ thread->record_stack_base_and_size(); thread->register_thread_stack_with_NMT(); thread->initialize_thread_current(); + MACOS_AARCH64_ONLY(thread->init_wx()); if (!os::create_attached_thread(thread)) { thread->smr_delete(); @@ -4284,6 +4292,7 @@ // needed. ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native); + MACOS_AARCH64_ONLY(thread->enable_wx(WXExec)); // Perform any platform dependent FPU setup os::setup_fpu(); @@ -4338,6 +4347,9 @@ return JNI_ERR; } + // We are going to VM, change W^X state to the expected one. + MACOS_AARCH64_ONLY(thread->enable_wx(WXWrite)); + // Safepoint support. Have to do call-back to safepoint code, if in the // middle of a safepoint operation ThreadStateTransition::transition_from_native(thread, _thread_in_vm); @@ -4354,6 +4366,10 @@ thread->exit(false, JavaThread::jni_detach); thread->smr_delete(); + // Go to the execute mode, the initial state of the thread on creation. + // Use os interface as the thread is not a JavaThread anymore. + MACOS_AARCH64_ONLY(os::current_thread_enable_wx(WXExec)); + HOTSPOT_JNI_DETACHCURRENTTHREAD_RETURN(JNI_OK); return JNI_OK; } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/prims/jniCheck.cpp openjdk-11-11.0.15+10/src/hotspot/share/prims/jniCheck.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/prims/jniCheck.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/prims/jniCheck.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -100,6 +100,7 @@ if (env != xenv) { \ NativeReportJNIFatalError(thr, warn_wrong_jnienv); \ } \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thr)); \ VM_ENTRY_BASE(result_type, header, thr) diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/prims/jniFastGetField.hpp openjdk-11-11.0.15+10/src/hotspot/share/prims/jniFastGetField.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/prims/jniFastGetField.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/prims/jniFastGetField.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -65,6 +65,11 @@ static address generate_fast_get_int_field0(BasicType type); static address generate_fast_get_float_field0(BasicType type); +#ifdef AARCH64 + template + static address generate_fast_get_int_field1(); +#endif // AARCH64 + public: #if defined(_WINDOWS) && !defined(_WIN64) static GetBooleanField_t jni_fast_GetBooleanField_fp; diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/prims/jvm.cpp openjdk-11-11.0.15+10/src/hotspot/share/prims/jvm.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/prims/jvm.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/prims/jvm.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -3442,7 +3442,7 @@ // Library support /////////////////////////////////////////////////////////////////////////// -JVM_ENTRY_NO_ENV(void*, JVM_LoadLibrary(const char* name)) +JVM_ENTRY_NO_ENV(void*, JVM_LoadLibrary(const char* name, jboolean throwException)) //%note jvm_ct JVMWrapper("JVM_LoadLibrary"); char ebuf[1024]; @@ -3452,18 +3452,22 @@ load_result = os::dll_load(name, ebuf, sizeof ebuf); } if (load_result == NULL) { - char msg[1024]; - jio_snprintf(msg, sizeof msg, "%s: %s", name, ebuf); - // Since 'ebuf' may contain a string encoded using - // platform encoding scheme, we need to pass - // Exceptions::unsafe_to_utf8 to the new_exception method - // as the last argument. See bug 6367357. - Handle h_exception = - Exceptions::new_exception(thread, - vmSymbols::java_lang_UnsatisfiedLinkError(), - msg, Exceptions::unsafe_to_utf8); + if (throwException) { + char msg[1024]; + jio_snprintf(msg, sizeof msg, "%s: %s", name, ebuf); + // Since 'ebuf' may contain a string encoded using + // platform encoding scheme, we need to pass + // Exceptions::unsafe_to_utf8 to the new_exception method + // as the last argument. See bug 6367357. + Handle h_exception = + Exceptions::new_exception(thread, + vmSymbols::java_lang_UnsatisfiedLinkError(), + msg, Exceptions::unsafe_to_utf8); - THROW_HANDLE_0(h_exception); + THROW_HANDLE_0(h_exception); + } else { + return load_result; + } } return load_result; JVM_END diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/prims/jvmtiEnter.xsl openjdk-11-11.0.15+10/src/hotspot/share/prims/jvmtiEnter.xsl --- openjdk-11-11.0.14+9/src/hotspot/share/prims/jvmtiEnter.xsl 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/prims/jvmtiEnter.xsl 2022-04-19 19:38:30.000000000 +0000 @@ -432,6 +432,8 @@ JavaThread* current_thread = (JavaThread*)this_thread; + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, current_thread)); + ThreadInVMfromNative __tiv(current_thread); VM_ENTRY_BASE(jvmtiError, diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/prims/jvmtiEnv.cpp openjdk-11-11.0.15+10/src/hotspot/share/prims/jvmtiEnv.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/prims/jvmtiEnv.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/prims/jvmtiEnv.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -172,6 +172,7 @@ // other than the current thread is required we need to transition // from native so as to resolve the jthread. + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, current_thread)); ThreadInVMfromNative __tiv(current_thread); VM_ENTRY_BASE(jvmtiError, JvmtiEnv::GetThreadLocalStorage , current_thread) debug_only(VMNativeEntryWrapper __vew;) @@ -3286,6 +3287,8 @@ } else { int r = 0; Thread* thread = Thread::current(); + // 8266889: raw_enter changes Java thread state, needs WXWrite + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); if (thread->is_Java_thread()) { JavaThread* current_thread = (JavaThread*)thread; @@ -3383,6 +3386,8 @@ JvmtiEnv::RawMonitorWait(JvmtiRawMonitor * rmonitor, jlong millis) { int r = 0; Thread* thread = Thread::current(); + // 8266889: raw_wait changes Java thread state, needs WXWrite + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); if (thread->is_Java_thread()) { JavaThread* current_thread = (JavaThread*)thread; diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/prims/jvmtiEnvBase.cpp openjdk-11-11.0.15+10/src/hotspot/share/prims/jvmtiEnvBase.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/prims/jvmtiEnvBase.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/prims/jvmtiEnvBase.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -814,7 +814,7 @@ "at safepoint or target thread is suspended"); int count = 0; if (java_thread->has_last_Java_frame()) { - RegisterMap reg_map(java_thread); + RegisterMap reg_map(java_thread, false /* update_map */); Thread* current_thread = Thread::current(); ResourceMark rm(current_thread); javaVFrame *jvf = java_thread->last_java_vframe(®_map); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/prims/whitebox.inline.hpp openjdk-11-11.0.15+10/src/hotspot/share/prims/whitebox.inline.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/prims/whitebox.inline.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/prims/whitebox.inline.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,8 @@ // Entry macro to transition from JNI to VM state. #define WB_ENTRY(result_type, header) JNI_ENTRY(result_type, header) \ - ClearPendingJniExcCheck _clearCheck(env); + ClearPendingJniExcCheck _clearCheck(env); \ + MACOS_AARCH64_ONLY(ThreadWXEnable _wx(WXWrite, thread)); #define WB_END JNI_END diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/deoptimization.cpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/deoptimization.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/deoptimization.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/deoptimization.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -54,6 +54,7 @@ #include "runtime/stubRoutines.hpp" #include "runtime/thread.hpp" #include "runtime/threadSMR.hpp" +#include "runtime/threadWXSetters.inline.hpp" #include "runtime/vframe.hpp" #include "runtime/vframeArray.hpp" #include "runtime/vframe_hp.hpp" @@ -687,6 +688,7 @@ // at an uncommon trap for an invoke (where the compiler // generates debug info before the invoke has executed) Bytecodes::Code cur_code = str.next(); + Bytecodes::Code next_code = Bytecodes::_shouldnotreachhere; if (Bytecodes::is_invoke(cur_code)) { Bytecode_invoke invoke(mh, iframe->interpreter_frame_bci()); cur_invoke_parameter_size = invoke.size_of_parameters(); @@ -695,7 +697,7 @@ } } if (str.bci() < max_bci) { - Bytecodes::Code next_code = str.next(); + next_code = str.next(); if (next_code >= 0) { // The interpreter oop map generator reports results before // the current bytecode has executed except in the case of @@ -745,6 +747,10 @@ // Print out some information that will help us debug the problem tty->print_cr("Wrong number of expression stack elements during deoptimization"); tty->print_cr(" Error occurred while verifying frame %d (0..%d, 0 is topmost)", i, cur_array->frames() - 1); + tty->print_cr(" Current code %s", Bytecodes::name(cur_code)); + if (try_next_mask) { + tty->print_cr(" Next code %s", Bytecodes::name(next_code)); + } tty->print_cr(" Fabricated interpreter frame had %d expression stack elements", iframe->interpreter_frame_expression_stack_size()); tty->print_cr(" Interpreter oop map had %d expression stack elements", mask.expression_stack_size()); @@ -1986,7 +1992,8 @@ uint idx = reason; #if INCLUDE_JVMCI if (is_osr) { - idx += Reason_LIMIT; + // Upper half of history array used for traps in OSR compilations + idx += Reason_TRAP_HISTORY_LENGTH; } #endif uint prior_trap_count = trap_mdo->trap_count(idx); @@ -2073,6 +2080,9 @@ } Deoptimization::UnrollBlock* Deoptimization::uncommon_trap(JavaThread* thread, jint trap_request, jint exec_mode) { + // Enable WXWrite: current function is called from methods compiled by C2 directly + MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, thread)); + if (TraceDeoptimization) { tty->print("Uncommon trap "); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/deoptimization.hpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/deoptimization.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/deoptimization.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/deoptimization.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -38,6 +38,7 @@ public: // What condition caused the deoptimization? + // Note: Keep this enum in sync. with Deoptimization::_trap_reason_name. enum DeoptReason { Reason_many = -1, // indicates presence of several reasons Reason_none = 0, // indicates absence of a relevant deopt. @@ -88,20 +89,22 @@ Reason_jsr_mismatch, #endif + // Used to define MethodData::_trap_hist_limit where Reason_tenured isn't included + Reason_TRAP_HISTORY_LENGTH, + // Reason_tenured is counted separately, add normal counted Reasons above. - // Related to MethodData::_trap_hist_limit where Reason_tenured isn't included - Reason_tenured, // age of the code has reached the limit + Reason_tenured = Reason_TRAP_HISTORY_LENGTH, // age of the code has reached the limit Reason_LIMIT, - // Note: Keep this enum in sync. with _trap_reason_name. - Reason_RECORDED_LIMIT = Reason_profile_predicate // some are not recorded per bc // Note: Reason_RECORDED_LIMIT should fit into 31 bits of // DataLayout::trap_bits. This dependency is enforced indirectly // via asserts, to avoid excessive direct header-to-header dependencies. // See Deoptimization::trap_state_reason and class DataLayout. + Reason_RECORDED_LIMIT = Reason_profile_predicate, // some are not recorded per bc }; // What action must be taken by the runtime? + // Note: Keep this enum in sync. with Deoptimization::_trap_action_name. enum DeoptAction { Action_none, // just interpret, do not invalidate nmethod Action_maybe_recompile, // recompile the nmethod; need not invalidate @@ -109,7 +112,6 @@ Action_make_not_entrant, // invalidate the nmethod, recompile (probably) Action_make_not_compilable, // invalidate the nmethod and do not compile Action_LIMIT - // Note: Keep this enum in sync. with _trap_action_name. }; enum { diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/interfaceSupport.inline.hpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/interfaceSupport.inline.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/interfaceSupport.inline.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/interfaceSupport.inline.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +33,7 @@ #include "runtime/safepointMechanism.inline.hpp" #include "runtime/safepointVerifiers.hpp" #include "runtime/thread.hpp" +#include "runtime/threadWXSetters.inline.hpp" #include "runtime/vmOperations.hpp" #include "utilities/globalDefinitions.hpp" #include "utilities/macros.hpp" @@ -403,6 +405,8 @@ #define VM_LEAF_BASE(result_type, header) \ TRACE_CALL(result_type, header) \ debug_only(NoHandleMark __hm;) \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, \ + Thread::current())); \ os::verify_stack_alignment(); \ /* begin of body */ @@ -440,6 +444,7 @@ #define IRT_ENTRY(result_type, header) \ result_type header { \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \ ThreadInVMfromJava __tiv(thread); \ VM_ENTRY_BASE(result_type, header, thread) \ debug_only(VMEntryWrapper __vew;) @@ -453,6 +458,7 @@ #define IRT_ENTRY_NO_ASYNC(result_type, header) \ result_type header { \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \ ThreadInVMfromJavaNoAsyncException __tiv(thread); \ VM_ENTRY_BASE(result_type, header, thread) \ debug_only(VMEntryWrapper __vew;) @@ -461,6 +467,7 @@ #define JRT_ENTRY(result_type, header) \ result_type header { \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \ ThreadInVMfromJava __tiv(thread); \ VM_ENTRY_BASE(result_type, header, thread) \ debug_only(VMEntryWrapper __vew;) @@ -474,6 +481,7 @@ #define JRT_ENTRY_NO_ASYNC(result_type, header) \ result_type header { \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \ ThreadInVMfromJavaNoAsyncException __tiv(thread); \ VM_ENTRY_BASE(result_type, header, thread) \ debug_only(VMEntryWrapper __vew;) @@ -482,6 +490,7 @@ // to get back into Java from the VM #define JRT_BLOCK_ENTRY(result_type, header) \ result_type header { \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \ TRACE_CALL(result_type, header) \ HandleMarkCleaner __hm(thread); @@ -512,6 +521,7 @@ result_type JNICALL header { \ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \ ThreadInVMfromNative __tiv(thread); \ debug_only(VMNativeEntryWrapper __vew;) \ VM_ENTRY_BASE(result_type, header, thread) @@ -524,6 +534,7 @@ result_type JNICALL header { \ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \ ThreadInVMfromNative __tiv(thread); \ debug_only(VMNativeEntryWrapper __vew;) \ VM_QUICK_ENTRY_BASE(result_type, header, thread) @@ -548,6 +559,7 @@ extern "C" { \ result_type JNICALL header { \ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \ ThreadInVMfromNative __tiv(thread); \ debug_only(VMNativeEntryWrapper __vew;) \ VM_ENTRY_BASE(result_type, header, thread) @@ -557,6 +569,7 @@ extern "C" { \ result_type JNICALL header { \ JavaThread* thread = JavaThread::current(); \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \ ThreadInVMfromNative __tiv(thread); \ debug_only(VMNativeEntryWrapper __vew;) \ VM_ENTRY_BASE(result_type, header, thread) @@ -566,6 +579,7 @@ extern "C" { \ result_type JNICALL header { \ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \ ThreadInVMfromNative __tiv(thread); \ debug_only(VMNativeEntryWrapper __vew;) \ VM_QUICK_ENTRY_BASE(result_type, header, thread) diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/javaCalls.cpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/javaCalls.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/javaCalls.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/javaCalls.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -79,7 +80,6 @@ } } - // Make sure to set the oop's after the thread transition - since we can block there. No one is GC'ing // the JavaCallWrapper before the entry frame is on the stack. _callee_method = callee_method(); @@ -113,12 +113,16 @@ if (_anchor.last_Java_sp() == NULL) { _thread->record_base_of_stack_pointer(); } + + MACOS_AARCH64_ONLY(_thread->enable_wx(WXExec)); } JavaCallWrapper::~JavaCallWrapper() { assert(_thread == JavaThread::current(), "must still be the same thread"); + MACOS_AARCH64_ONLY(_thread->enable_wx(WXWrite)); + // restore previous handle block & Java frame linkage JNIHandleBlock *_old_handles = _thread->active_handles(); _thread->set_active_handles(_handles); diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/os.cpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/os.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/os.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/os.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1013,8 +1013,14 @@ struct tm tz; if (localtime_pd(&tloc, &tz) != NULL) { - ::strftime(buf, buflen, "%Z", &tz); - st->print("Time: %s %s", timestring, buf); + wchar_t w_buf[80]; + size_t n = ::wcsftime(w_buf, 80, L"%Z", &tz); + if (n > 0) { + ::wcstombs(buf, w_buf, buflen); + st->print("Time: %s %s", timestring, buf); + } else { + st->print("Time: %s", timestring); + } } else { st->print("Time: %s", timestring); } @@ -1737,7 +1743,8 @@ return os::pd_create_stack_guard_pages(addr, bytes); } -char* os::reserve_memory(size_t bytes, char* addr, size_t alignment_hint, int file_desc) { +MACOS_ONLY(char* os::reserve_memory(size_t bytes, char* addr, size_t alignment_hint, int file_desc, bool executable)) +NOT_MACOS(char* os::reserve_memory(size_t bytes, char* addr, size_t alignment_hint, int file_desc)) { char* result = NULL; if (file_desc != -1) { @@ -1748,7 +1755,8 @@ MemTracker::record_virtual_memory_reserve_and_commit((address)result, bytes, CALLER_PC); } } else { - result = pd_reserve_memory(bytes, addr, alignment_hint); + result = MACOS_ONLY(pd_reserve_memory(bytes, addr, alignment_hint, executable)) + NOT_MACOS(pd_reserve_memory(bytes, addr, alignment_hint)); if (result != NULL) { MemTracker::record_virtual_memory_reserve((address)result, bytes, CALLER_PC); } @@ -1818,16 +1826,19 @@ MemTracker::record_virtual_memory_commit((address)addr, size, CALLER_PC); } -bool os::uncommit_memory(char* addr, size_t bytes) { +MACOS_ONLY(bool os::uncommit_memory(char* addr, size_t bytes, bool executable)) +NOT_MACOS(bool os::uncommit_memory(char* addr, size_t bytes)) { bool res; if (MemTracker::tracking_level() > NMT_minimal) { Tracker tkr(Tracker::uncommit); - res = pd_uncommit_memory(addr, bytes); + res = MACOS_ONLY(pd_uncommit_memory(addr, bytes, executable)) + NOT_MACOS(pd_uncommit_memory(addr, bytes)); if (res) { tkr.record((address)addr, bytes); } } else { - res = pd_uncommit_memory(addr, bytes); + res = MACOS_ONLY(pd_uncommit_memory(addr, bytes, executable)) + NOT_MACOS(pd_uncommit_memory(addr, bytes)); } return res; } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/os.hpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/os.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/os.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/os.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -81,6 +81,11 @@ CriticalPriority = 11 // Critical thread priority }; +enum WXMode { + WXWrite, + WXExec +}; + // Executable parameter flag for os::commit_memory() and // os::commit_memory_or_exit(). const bool ExecMem = true; @@ -111,8 +116,12 @@ _page_sizes[1] = 0; // sentinel } - static char* pd_reserve_memory(size_t bytes, char* addr = 0, - size_t alignment_hint = 0); + + MACOS_ONLY(static char* pd_reserve_memory(size_t bytes, char* addr = 0, + size_t alignment_hint = 0, + bool executable = false);) + NOT_MACOS(static char* pd_reserve_memory(size_t bytes, char* addr = 0, + size_t alignment_hint = 0);) static char* pd_attempt_reserve_memory_at(size_t bytes, char* addr); static char* pd_attempt_reserve_memory_at(size_t bytes, char* addr, int file_desc); static void pd_split_reserved_memory(char *base, size_t size, @@ -127,7 +136,9 @@ static void pd_commit_memory_or_exit(char* addr, size_t size, size_t alignment_hint, bool executable, const char* mesg); - static bool pd_uncommit_memory(char* addr, size_t bytes); + MACOS_ONLY(static bool pd_uncommit_memory(char* addr, size_t bytes, + bool executable = false);) + NOT_MACOS(static bool pd_uncommit_memory(char* addr, size_t bytes);) static bool pd_release_memory(char* addr, size_t bytes); static char* pd_map_memory(int fd, const char* file_name, size_t file_offset, @@ -325,8 +336,11 @@ const size_t size); static int vm_allocation_granularity(); - static char* reserve_memory(size_t bytes, char* addr = 0, - size_t alignment_hint = 0, int file_desc = -1); + MACOS_ONLY(static char* reserve_memory(size_t bytes, char* addr = 0, + size_t alignment_hint = 0, int file_desc = -1, + bool executable = false);) + NOT_MACOS(static char* reserve_memory(size_t bytes, char* addr = 0, + size_t alignment_hint = 0, int file_desc = -1);) static char* reserve_memory(size_t bytes, char* addr, size_t alignment_hint, MEMFLAGS flags); static char* reserve_memory_aligned(size_t size, size_t alignment, int file_desc = -1); @@ -343,7 +357,8 @@ static void commit_memory_or_exit(char* addr, size_t size, size_t alignment_hint, bool executable, const char* mesg); - static bool uncommit_memory(char* addr, size_t bytes); + MACOS_ONLY(static bool uncommit_memory(char* addr, size_t bytes, bool executable = false);) + NOT_MACOS(static bool uncommit_memory(char* addr, size_t bytes);) static bool release_memory(char* addr, size_t bytes); // Touch memory pages that cover the memory range from start to end (exclusive) @@ -954,6 +969,11 @@ bool _done; }; +#if defined(__APPLE__) && defined(AARCH64) + // Enables write or execute access to writeable and executable pages. + static void current_thread_enable_wx(WXMode mode); +#endif // __APPLE__ && AARCH64 + #ifndef _WINDOWS // Suspend/resume support // Protocol: diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/safefetch.inline.hpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/safefetch.inline.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/safefetch.inline.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/safefetch.inline.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -26,16 +26,27 @@ #define SHARE_RUNTIME_SAFEFETCH_INLINE_HPP #include "runtime/stubRoutines.hpp" +#include "runtime/threadWXSetters.inline.hpp" // Safefetch allows to load a value from a location that's not known // to be valid. If the load causes a fault, the error value is returned. inline int SafeFetch32(int* adr, int errValue) { assert(StubRoutines::SafeFetch32_stub(), "stub not yet generated"); +#if defined(__APPLE__) && defined(AARCH64) + Thread* thread = Thread::current_or_null_safe(); + assert(thread != NULL, "required for W^X management"); + ThreadWXEnable wx(WXExec, thread); +#endif // __APPLE__ && AARCH64 return StubRoutines::SafeFetch32_stub()(adr, errValue); } inline intptr_t SafeFetchN(intptr_t* adr, intptr_t errValue) { assert(StubRoutines::SafeFetchN_stub(), "stub not yet generated"); +#if defined(__APPLE__) && defined(AARCH64) + Thread* thread = Thread::current_or_null_safe(); + assert(thread != NULL, "required for W^X management"); + ThreadWXEnable wx(WXExec, thread); +#endif // __APPLE__ && AARCH64 return StubRoutines::SafeFetchN_stub()(adr, errValue); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/safepoint.cpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/safepoint.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/safepoint.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/safepoint.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -61,6 +61,7 @@ #include "runtime/synchronizer.hpp" #include "runtime/thread.inline.hpp" #include "runtime/threadSMR.hpp" +#include "runtime/threadWXSetters.inline.hpp" #include "runtime/timerTrace.hpp" #include "services/runtimeService.hpp" #include "utilities/events.hpp" @@ -954,6 +955,9 @@ assert(SafepointSynchronize::is_synchronizing(), "polling encountered outside safepoint synchronization"); } + // Enable WXWrite: the function is called implicitly from java code. + MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, thread)); + if (PrintSafepointStatistics) { inc_page_trap_count(); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/signature.hpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/signature.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/signature.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/signature.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,6 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -282,16 +283,16 @@ int _prepended; // number of prepended JNI parameters (1 JNIEnv, plus 1 mirror if static) int _jni_offset; // the current parameter offset, starting with 0 - void do_bool () { pass_int(); _jni_offset++; _offset++; } - void do_char () { pass_int(); _jni_offset++; _offset++; } + void do_bool () { pass_byte(); _jni_offset++; _offset++; } + void do_char () { pass_short(); _jni_offset++; _offset++; } void do_float () { pass_float(); _jni_offset++; _offset++; } #ifdef _LP64 void do_double() { pass_double(); _jni_offset++; _offset += 2; } #else void do_double() { pass_double(); _jni_offset += 2; _offset += 2; } #endif - void do_byte () { pass_int(); _jni_offset++; _offset++; } - void do_short () { pass_int(); _jni_offset++; _offset++; } + void do_byte () { pass_byte(); _jni_offset++; _offset++; } + void do_short () { pass_short(); _jni_offset++; _offset++; } void do_int () { pass_int(); _jni_offset++; _offset++; } #ifdef _LP64 void do_long () { pass_long(); _jni_offset++; _offset += 2; } @@ -312,6 +313,8 @@ virtual void pass_long() = 0; virtual void pass_object() = 0; virtual void pass_float() = 0; + virtual void pass_byte() { pass_int(); }; + virtual void pass_short() { pass_int(); }; #ifdef _LP64 virtual void pass_double() = 0; #else diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/stubRoutines.cpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/stubRoutines.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/stubRoutines.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/stubRoutines.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -289,6 +289,8 @@ #ifdef ASSERT + MACOS_AARCH64_ONLY(os::current_thread_enable_wx(WXExec)); + #define TEST_ARRAYCOPY(type) \ test_arraycopy_func( type##_arraycopy(), sizeof(type)); \ test_arraycopy_func( type##_disjoint_arraycopy(), sizeof(type)); \ @@ -369,6 +371,8 @@ test_safefetchN(); #endif + MACOS_AARCH64_ONLY(os::current_thread_enable_wx(WXWrite)); + #endif } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/thread.cpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/thread.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/thread.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/thread.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -97,6 +98,7 @@ #include "runtime/threadCritical.hpp" #include "runtime/threadSMR.inline.hpp" #include "runtime/threadStatisticalInfo.hpp" +#include "runtime/threadWXSetters.inline.hpp" #include "runtime/timer.hpp" #include "runtime/timerTrace.hpp" #include "runtime/vframe.inline.hpp" @@ -317,6 +319,8 @@ if (barrier_set != NULL) { barrier_set->on_thread_create(this); } + + MACOS_AARCH64_ONLY(DEBUG_ONLY(_wx_init = false)); } void Thread::initialize_thread_current() { @@ -370,6 +374,8 @@ register_thread_stack_with_NMT(); + MACOS_AARCH64_ONLY(this->init_wx()); + JFR_ONLY(Jfr::on_thread_start(this);) log_debug(os, thread)("Thread " UINTX_FORMAT " stack dimensions: " @@ -2538,6 +2544,9 @@ // Note only the native==>VM/Java barriers can call this function and when // thread state is _thread_in_native_trans. void JavaThread::check_special_condition_for_native_trans(JavaThread *thread) { + // Enable WXWrite: called directly from interpreter native wrapper. + MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, thread)); + check_safepoint_and_suspend_for_native_trans(thread); if (thread->has_async_exception()) { @@ -3682,6 +3691,8 @@ // Initialize the os module os::init(); + MACOS_AARCH64_ONLY(os::current_thread_enable_wx(WXWrite)); + // Record VM creation timing statistics TraceVmCreationTime create_vm_timer; create_vm_timer.start(); @@ -3785,6 +3796,7 @@ main_thread->record_stack_base_and_size(); main_thread->register_thread_stack_with_NMT(); main_thread->set_active_handles(JNIHandleBlock::allocate_block()); + MACOS_AARCH64_ONLY(main_thread->init_wx()); if (!main_thread->set_as_starting_thread()) { vm_shutdown_during_initialization( @@ -4773,6 +4785,7 @@ CompileTask* task = ct->task(); if (task != NULL) { thread->print_name_on_error(st, buf, buflen); + st->print(" "); task->print(st, NULL, short_form, true); } } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/thread.hpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/thread.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/thread.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/thread.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -752,6 +753,15 @@ static void muxAcquire(volatile intptr_t * Lock, const char * Name); static void muxAcquireW(volatile intptr_t * Lock, ParkEvent * ev); static void muxRelease(volatile intptr_t * Lock); + +#if defined(__APPLE__) && defined(AARCH64) + private: + DEBUG_ONLY(bool _wx_init); + WXMode _wx_state; + public: + void init_wx(); + WXMode enable_wx(WXMode new_state); +#endif // __APPLE__ && AARCH64 }; // Inline implementation of Thread::current() diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/thread.inline.hpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/thread.inline.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/thread.inline.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/thread.inline.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -93,6 +94,27 @@ OrderAccess::release_store_fence(&_threads_hazard_ptr, new_list); } +#if defined(__APPLE__) && defined(AARCH64) +inline void Thread::init_wx() { + assert(this == Thread::current(), "should only be called for current thread"); + assert(!_wx_init, "second init"); + _wx_state = WXWrite; + os::current_thread_enable_wx(_wx_state); + DEBUG_ONLY(_wx_init = true); +} + +inline WXMode Thread::enable_wx(WXMode new_state) { + assert(this == Thread::current(), "should only be called for current thread"); + assert(_wx_init, "should be inited"); + WXMode old = _wx_state; + if (_wx_state != new_state) { + _wx_state = new_state; + os::current_thread_enable_wx(new_state); + } + return old; +} +#endif // __APPLE__ && AARCH64 + inline void JavaThread::set_ext_suspended() { set_suspend_flag (_ext_suspended); } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/runtime/threadWXSetters.inline.hpp openjdk-11-11.0.15+10/src/hotspot/share/runtime/threadWXSetters.inline.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/runtime/threadWXSetters.inline.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/runtime/threadWXSetters.inline.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_RUNTIME_THREADWXSETTERS_INLINE_HPP +#define SHARE_RUNTIME_THREADWXSETTERS_INLINE_HPP + +#include "runtime/thread.inline.hpp" + +#if defined(__APPLE__) && defined(AARCH64) +class ThreadWXEnable { + Thread* _thread; + WXMode _old_mode; +public: + ThreadWXEnable(WXMode new_mode, Thread* thread) : + _thread(thread), + _old_mode(_thread ? _thread->enable_wx(new_mode) : WXWrite) + { } + ~ThreadWXEnable() { + if (_thread) { + _thread->enable_wx(_old_mode); + } + } +}; +#endif // __APPLE__ && AARCH64 + +#endif // SHARE_RUNTIME_THREADWXSETTERS_INLINE_HPP + diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/services/virtualMemoryTracker.cpp openjdk-11-11.0.15+10/src/hotspot/share/services/virtualMemoryTracker.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/services/virtualMemoryTracker.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/services/virtualMemoryTracker.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -535,15 +535,21 @@ address committed_start; size_t committed_size; size_t stack_size = rgn->base() + rgn->size() - stack_bottom; + // Align the size to work with full pages (Alpine and AIX stack top is not page aligned) + size_t aligned_stack_size = align_up(stack_size, os::vm_page_size()); ReservedMemoryRegion* region = const_cast(rgn); NativeCallStack ncs; // empty stack - RegionIterator itr(stack_bottom, stack_size); + RegionIterator itr(stack_bottom, aligned_stack_size); DEBUG_ONLY(bool found_stack = false;) while (itr.next_committed(committed_start, committed_size)) { assert(committed_start != NULL, "Should not be null"); assert(committed_size > 0, "Should not be 0"); + // unaligned stack_size case: correct the region to fit the actual stack_size + if (stack_bottom + stack_size < committed_start + committed_size) { + committed_size = stack_bottom + stack_size - committed_start; + } region->add_committed_region(committed_start, committed_size, ncs); DEBUG_ONLY(found_stack = true;) } diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/utilities/accessFlags.hpp openjdk-11-11.0.15+10/src/hotspot/share/utilities/accessFlags.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/utilities/accessFlags.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/utilities/accessFlags.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -66,6 +66,7 @@ JVM_ACC_IS_CLONEABLE_FAST = (int)0x80000000,// True if klass implements the Cloneable interface and can be optimized in generated code JVM_ACC_HAS_FINAL_METHOD = 0x01000000, // True if klass has final method JVM_ACC_IS_SHARED_CLASS = 0x02000000, // True if klass is shared + JVM_ACC_IS_BEING_REDEFINED = 0x00100000, // True if the klass is being redefined. // Klass* and Method* flags JVM_ACC_HAS_LOCAL_VARIABLE_TABLE= 0x00200000, @@ -155,6 +156,10 @@ void set_has_localvariable_table() { atomic_set_bits(JVM_ACC_HAS_LOCAL_VARIABLE_TABLE); } void clear_has_localvariable_table() { atomic_clear_bits(JVM_ACC_HAS_LOCAL_VARIABLE_TABLE); } + bool is_being_redefined() const { return (_flags & JVM_ACC_IS_BEING_REDEFINED) != 0; } + void set_is_being_redefined() { atomic_set_bits(JVM_ACC_IS_BEING_REDEFINED); } + void clear_is_being_redefined() { atomic_clear_bits(JVM_ACC_IS_BEING_REDEFINED); } + // field flags bool is_field_access_watched() const { return (_flags & JVM_ACC_FIELD_ACCESS_WATCHED) != 0; } bool is_field_modification_watched() const diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/utilities/macros.hpp openjdk-11-11.0.15+10/src/hotspot/share/utilities/macros.hpp --- openjdk-11-11.0.14+9/src/hotspot/share/utilities/macros.hpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/utilities/macros.hpp 2022-04-19 19:38:30.000000000 +0000 @@ -595,6 +595,8 @@ #define NOT_AARCH64(code) code #endif +#define MACOS_AARCH64_ONLY(x) MACOS_ONLY(AARCH64_ONLY(x)) + #ifdef VM_LITTLE_ENDIAN #define LITTLE_ENDIAN_ONLY(code) code #define BIG_ENDIAN_ONLY(code) diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/utilities/nativeCallStack.cpp openjdk-11-11.0.15+10/src/hotspot/share/utilities/nativeCallStack.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/utilities/nativeCallStack.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/utilities/nativeCallStack.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -38,7 +38,7 @@ // to call os::get_native_stack. A tail call is used if _NMT_NOINLINE_ is not defined // (which means this is not a slowdebug build), and we are on 64-bit (except Windows). // This is not necessarily a rule, but what has been obvserved to date. -#if (defined(_NMT_NOINLINE_) || defined(_WINDOWS) || !defined(_LP64)) +#if (defined(_NMT_NOINLINE_) || defined(_WINDOWS) || !defined(_LP64) || (defined(BSD) && defined (__aarch64__))) // Not a tail call. toSkip++; #if (defined(_NMT_NOINLINE_) && defined(BSD) && defined(_LP64)) diff -Nru openjdk-11-11.0.14+9/src/hotspot/share/utilities/vmError.cpp openjdk-11-11.0.15+10/src/hotspot/share/utilities/vmError.cpp --- openjdk-11-11.0.14+9/src/hotspot/share/utilities/vmError.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/hotspot/share/utilities/vmError.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1754,8 +1754,8 @@ // crash with sigsegv at non-null address. static void crash_with_segfault() { - char* const crash_addr = (char*) VMError::get_segfault_address(); - *crash_addr = 'X'; + int* crash_addr = reinterpret_cast(VMError::get_segfault_address()); + *crash_addr = 1; } // end: crash_with_segfault diff -Nru openjdk-11-11.0.14+9/src/java.base/macosx/classes/apple/security/KeychainStore.java openjdk-11-11.0.15+10/src/java.base/macosx/classes/apple/security/KeychainStore.java --- openjdk-11-11.0.14+9/src/java.base/macosx/classes/apple/security/KeychainStore.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/macosx/classes/apple/security/KeychainStore.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,6 +68,25 @@ Certificate cert; long certRef; // SecCertificateRef for this key + + // Each KeyStore.TrustedCertificateEntry have 2 attributes: + // 1. "trustSettings" -> trustSettings.toString() + // 2. "2.16.840.1.113894.746875.1.1" -> trustedKeyUsageValue + // The 1st one is mainly for debugging use. The 2nd one is similar + // to the attribute with the same key in a PKCS12KeyStore. + + // The SecTrustSettingsCopyTrustSettings() output for this certificate + // inside the KeyChain in its original array of CFDictionaryRef objects + // structure with values dumped as strings. For each trust, an extra + // entry "SecPolicyOid" is added whose value is the OID for this trust. + // The extra entries are used to construct trustedKeyUsageValue. + List> trustSettings; + + // One or more OIDs defined in http://oidref.com/1.2.840.113635.100.1. + // It can also be "2.5.29.37.0" for a self-signed certificate with + // an empty trust settings. This value is never empty. When there are + // multiple OID values, it takes the form of "[1.1.1, 1.1.2]". + String trustedKeyUsageValue; }; /** @@ -310,6 +329,66 @@ } } + private final class LocalAttr + implements KeyStore.Entry.Attribute { + + private String name; + private String value; + + public LocalAttr(String name, String value) { + this.name = name; + this.value = value; + } + + @Override + public String getName() { + return name; + } + + @Override + public String getValue() { + return value; + } + + /** + * Calculates a hash code value for the object. + * Objects that are equal will also have the same hashcode. + */ + public int hashCode() { + return Objects.hash(name, value); + } + + public boolean equals(Object obj) { + if (this == obj) return true; + + if (!(obj instanceof LocalAttr)) { + return false; + } + + LocalAttr other = + (LocalAttr) obj; + return (Objects.equals(name, other.getName()) && + Objects.equals(value, other.getValue())); + } + + } + + @Override + public KeyStore.Entry engineGetEntry(String alias, KeyStore.ProtectionParameter protParam) + throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableEntryException { + if (engineIsCertificateEntry(alias)) { + Object entry = entries.get(alias.toLowerCase()); + if (entry instanceof TrustedCertEntry) { + TrustedCertEntry tEntry = (TrustedCertEntry)entry; + return new KeyStore.TrustedCertificateEntry( + tEntry.cert, Set.of( + new LocalAttr(KnownOIDs.ORACLE_TrustedKeyUsage.value(), tEntry.trustedKeyUsageValue), + new LocalAttr("trustSettings", tEntry.trustSettings.toString()))); + } + } + return super.engineGetEntry(alias, protParam); + } + /** * Returns the creation date of the entry identified by the given alias. * @@ -463,55 +542,12 @@ } /** - * Assigns the given certificate to the given alias. - * - *

If the given alias already exists in this keystore and identifies a - * trusted certificate entry, the certificate associated with it is - * overridden by the given certificate. - * - * @param alias the alias name - * @param cert the certificate - * - * @exception KeyStoreException if the given alias already exists and does - * not identify a trusted certificate entry, or this operation - * fails for some other reason. + * Adding trusted certificate entry is not supported. */ public void engineSetCertificateEntry(String alias, Certificate cert) - throws KeyStoreException - { - permissionCheck(); - - synchronized(entries) { - - Object entry = entries.get(alias.toLowerCase()); - if ((entry != null) && (entry instanceof KeyEntry)) { - throw new KeyStoreException - ("Cannot overwrite key entry with certificate"); - } - - // This will be slow, but necessary. Enumerate the values and then see if the cert matches the one in the trusted cert entry. - // Security framework doesn't support the same certificate twice in a keychain. - Collection allValues = entries.values(); - - for (Object value : allValues) { - if (value instanceof TrustedCertEntry) { - TrustedCertEntry tce = (TrustedCertEntry)value; - if (tce.cert.equals(cert)) { - throw new KeyStoreException("Keychain does not support mulitple copies of same certificate."); - } - } - } - - TrustedCertEntry trustedCertEntry = new TrustedCertEntry(); - trustedCertEntry.cert = cert; - trustedCertEntry.date = new Date(); - String lowerAlias = alias.toLowerCase(); - if (entries.get(lowerAlias) != null) { - deletedEntries.put(lowerAlias, entries.get(lowerAlias)); - } - entries.put(lowerAlias, trustedCertEntry); - addedEntries.put(lowerAlias, trustedCertEntry); - } + throws KeyStoreException { + throw new KeyStoreException("Cannot set trusted certificate entry." + + " Use the macOS \"security add-trusted-cert\" command instead."); } /** @@ -690,10 +726,7 @@ String alias = e.nextElement(); Object entry = addedEntries.get(alias); if (entry instanceof TrustedCertEntry) { - TrustedCertEntry tce = (TrustedCertEntry)entry; - Certificate certElem; - certElem = tce.cert; - tce.certRef = addCertificateToKeychain(alias, certElem); + // Cannot set trusted certificate entry } else { KeyEntry keyEntry = (KeyEntry)entry; @@ -788,9 +821,28 @@ private native void _scanKeychain(); /** - * Callback method from _scanKeychain. If a trusted certificate is found, this method will be called. + * Callback method from _scanKeychain. If a trusted certificate is found, + * this method will be called. + * + * inputTrust is a list of strings in groups. Each group contains key/value + * pairs for one trust setting and ends with a null. Thus the size of the + * whole list is (2 * s_1 + 1) + (2 * s_2 + 1) + ... + (2 * s_n + 1), + * where s_i is the size of mapping for the i'th trust setting, + * and n is the number of trust settings. Ex: + * + * key1 for trust1 + * value1 for trust1 + * .. + * null (end of trust1) + * key1 for trust2 + * value1 for trust2 + * ... + * null (end of trust2) + * ... + * null (end if trust_n) */ - private void createTrustedCertEntry(String alias, long keychainItemRef, long creationDate, byte[] derStream) { + private void createTrustedCertEntry(String alias, List inputTrust, + long keychainItemRef, long creationDate, byte[] derStream) { TrustedCertEntry tce = new TrustedCertEntry(); try { @@ -801,6 +853,69 @@ tce.cert = cert; tce.certRef = keychainItemRef; + tce.trustSettings = new ArrayList<>(); + Map tmpMap = new LinkedHashMap<>(); + for (int i = 0; i < inputTrust.size(); i++) { + if (inputTrust.get(i) == null) { + tce.trustSettings.add(tmpMap); + if (i < inputTrust.size() - 1) { + // Prepare an empty map for the next trust setting. + // Do not just clear(), must be a new object. + // Only create if not at end of list. + tmpMap = new LinkedHashMap<>(); + } + } else { + tmpMap.put(inputTrust.get(i), inputTrust.get(i+1)); + i++; + } + } + + boolean isSelfSigned; + try { + cert.verify(cert.getPublicKey()); + isSelfSigned = true; + } catch (Exception e) { + isSelfSigned = false; + } + if (tce.trustSettings.isEmpty()) { + if (isSelfSigned) { + // If a self-signed certificate has an empty trust settings, + // trust it for all purposes + tce.trustedKeyUsageValue = KnownOIDs.anyExtendedKeyUsage.value(); + } else { + // Otherwise, return immediately. The certificate is not + // added into entries. + return; + } + } else { + List values = new ArrayList<>(); + for (var oneTrust : tce.trustSettings) { + var result = oneTrust.get("kSecTrustSettingsResult"); + // https://developer.apple.com/documentation/security/sectrustsettingsresult?language=objc + // 1 = kSecTrustSettingsResultTrustRoot, 2 = kSecTrustSettingsResultTrustAsRoot + // If missing, a default value of kSecTrustSettingsResultTrustRoot is assumed + // for self-signed certificates (see doc for SecTrustSettingsCopyTrustSettings). + // Note that the same SecPolicyOid can appear in multiple trust settings + // for different kSecTrustSettingsAllowedError and/or kSecTrustSettingsPolicyString. + if ((result == null && isSelfSigned) + || "1".equals(result) || "2".equals(result)) { + // When no kSecTrustSettingsPolicy, it means everything + String oid = oneTrust.getOrDefault("SecPolicyOid", + KnownOIDs.anyExtendedKeyUsage.value()); + if (!values.contains(oid)) { + values.add(oid); + } + } + } + if (values.isEmpty()) { + return; + } + if (values.size() == 1) { + tce.trustedKeyUsageValue = values.get(0); + } else { + tce.trustedKeyUsageValue = values.toString(); + } + } // Make a creation date. if (creationDate != 0) tce.date = new Date(creationDate); diff -Nru openjdk-11-11.0.14+9/src/java.base/macosx/classes/java/lang/ClassLoaderHelper.java openjdk-11-11.0.15+10/src/java.base/macosx/classes/java/lang/ClassLoaderHelper.java --- openjdk-11-11.0.14+9/src/java.base/macosx/classes/java/lang/ClassLoaderHelper.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/macosx/classes/java/lang/ClassLoaderHelper.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,12 +26,38 @@ package java.lang; import java.io.File; +import sun.security.action.GetPropertyAction; class ClassLoaderHelper { + private static final boolean hasDynamicLoaderCache; + static { + String osVersion = GetPropertyAction.privilegedGetProperty("os.version"); + // dynamic linker cache support on os.version >= 11.x + int major = 11; + int i = osVersion.indexOf('.'); + try { + major = Integer.parseInt(i < 0 ? osVersion : osVersion.substring(0, i)); + } catch (NumberFormatException e) {} + hasDynamicLoaderCache = major >= 11; + } private ClassLoaderHelper() {} /** + * Returns true if loading a native library only if + * it's present on the file system. + * + * @implNote + * On macOS 11.x or later which supports dynamic linker cache, + * the dynamic library is not present on the filesystem. The + * library cannot determine if a dynamic library exists on a + * given path or not and so this method returns false. + */ + static boolean loadLibraryOnlyIfPresent() { + return !hasDynamicLoaderCache; + } + + /** * Indicates, whether PATH env variable is allowed to contain quoted entries. */ static final boolean allowsQuotedPathElements = false; diff -Nru openjdk-11-11.0.14+9/src/java.base/macosx/native/libjli/java_md_macosx.c openjdk-11-11.0.15+10/src/java.base/macosx/native/libjli/java_md_macosx.c --- openjdk-11-11.0.14+9/src/java.base/macosx/native/libjli/java_md_macosx.c 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/macosx/native/libjli/java_md_macosx.c 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -210,6 +210,8 @@ preferredJVM = "client"; #elif defined(__x86_64__) preferredJVM = "server"; +#elif defined(__aarch64__) + preferredJVM = "server"; #else #error "Unknown architecture - needs definition" #endif diff -Nru openjdk-11-11.0.14+9/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m openjdk-11-11.0.15+10/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m --- openjdk-11-11.0.14+9/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -368,6 +368,14 @@ } } +#define ADD(list, str) { \ + jobject localeObj = (*env)->NewStringUTF(env, [str UTF8String]); \ + (*env)->CallBooleanMethod(env, list, jm_listAdd, localeObj); \ + (*env)->DeleteLocalRef(env, localeObj); \ +} + +#define ADDNULL(list) (*env)->CallBooleanMethod(env, list, jm_listAdd, NULL) + static void addCertificatesToKeystore(JNIEnv *env, jobject keyStore) { // Search the user keychain list for all X509 certificates. @@ -379,8 +387,15 @@ jclass jc_KeychainStore = (*env)->FindClass(env, "apple/security/KeychainStore"); CHECK_NULL(jc_KeychainStore); jmethodID jm_createTrustedCertEntry = (*env)->GetMethodID( - env, jc_KeychainStore, "createTrustedCertEntry", "(Ljava/lang/String;JJ[B)V"); + env, jc_KeychainStore, "createTrustedCertEntry", "(Ljava/lang/String;Ljava/util/List;JJ[B)V"); CHECK_NULL(jm_createTrustedCertEntry); + jclass jc_arrayListClass = (*env)->FindClass(env, "java/util/ArrayList"); + CHECK_NULL(jc_arrayListClass); + jmethodID jm_arrayListCons = (*env)->GetMethodID(env, jc_arrayListClass, "", "()V"); + CHECK_NULL(jm_arrayListCons); + jmethodID jm_listAdd = (*env)->GetMethodID(env, jc_arrayListClass, "add", "(Ljava/lang/Object;)Z"); + CHECK_NULL(jm_listAdd); + do { searchResult = SecKeychainSearchCopyNext(keychainItemSearch, &theItem); @@ -401,12 +416,50 @@ goto errOut; } + // Only add certificates with trusted settings + CFArrayRef trustSettings; + if (SecTrustSettingsCopyTrustSettings(certRef, kSecTrustSettingsDomainUser, &trustSettings) + == errSecItemNotFound) { + continue; + } + + // See KeychainStore::createTrustedCertEntry for content of inputTrust + jobject inputTrust = (*env)->NewObject(env, jc_arrayListClass, jm_arrayListCons); + CHECK_NULL(inputTrust); + + // Dump everything inside trustSettings into inputTrust + CFIndex count = CFArrayGetCount(trustSettings); + for (int i = 0; i < count; i++) { + CFDictionaryRef oneTrust = (CFDictionaryRef) CFArrayGetValueAtIndex(trustSettings, i); + CFIndex size = CFDictionaryGetCount(oneTrust); + const void * keys [size]; + const void * values [size]; + CFDictionaryGetKeysAndValues(oneTrust, keys, values); + for (int j = 0; j < size; j++) { + NSString* s = [NSString stringWithFormat:@"%@", keys[j]]; + ADD(inputTrust, s); + s = [NSString stringWithFormat:@"%@", values[j]]; + ADD(inputTrust, s); + } + SecPolicyRef certPolicy; + certPolicy = (SecPolicyRef)CFDictionaryGetValue(oneTrust, kSecTrustSettingsPolicy); + if (certPolicy != NULL) { + CFDictionaryRef policyDict = SecPolicyCopyProperties(certPolicy); + ADD(inputTrust, @"SecPolicyOid"); + NSString* s = [NSString stringWithFormat:@"%@", CFDictionaryGetValue(policyDict, @"SecPolicyOid")]; + ADD(inputTrust, s); + CFRelease(policyDict); + } + ADDNULL(inputTrust); + } + CFRelease(trustSettings); + // Find the creation date. jlong creationDate = getModDateFromItem(env, theItem); // Call back to the Java object to create Java objects corresponding to this security object. jlong nativeRef = ptr_to_jlong(certRef); - (*env)->CallVoidMethod(env, keyStore, jm_createTrustedCertEntry, alias, nativeRef, creationDate, certData); + (*env)->CallVoidMethod(env, keyStore, jm_createTrustedCertEntry, alias, inputTrust, nativeRef, creationDate, certData); JNU_CHECK_EXCEPTION(env); } } while (searchResult == noErr); @@ -522,8 +575,8 @@ /* * Class: apple_security_KeychainStore * Method: _addItemToKeychain - * Signature: (Ljava/lang/String;[B)I -*/ + * Signature: (Ljava/lang/String;Z[B[C)J + */ JNIEXPORT jlong JNICALL Java_apple_security_KeychainStore__1addItemToKeychain (JNIEnv *env, jobject this, jstring alias, jboolean isCertificate, jbyteArray rawDataObj, jcharArray passwordObj) { diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/com/sun/crypto/provider/ChaCha20Cipher.java openjdk-11-11.0.15+10/src/java.base/share/classes/com/sun/crypto/provider/ChaCha20Cipher.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/com/sun/crypto/provider/ChaCha20Cipher.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/com/sun/crypto/provider/ChaCha20Cipher.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -207,7 +207,7 @@ */ @Override protected byte[] engineGetIV() { - return nonce.clone(); + return (nonce != null) ? nonce.clone() : null; } /** @@ -226,11 +226,16 @@ protected AlgorithmParameters engineGetParameters() { AlgorithmParameters params = null; if (mode == MODE_AEAD) { + // In a pre-initialized state or any state without a nonce value + // this call should cause a random nonce to be generated, but + // not attached to the object. + byte[] nonceData = (initialized || nonce != null) ? nonce : + createRandomNonce(null); try { // Place the 12-byte nonce into a DER-encoded OCTET_STRING params = AlgorithmParameters.getInstance("ChaCha20-Poly1305"); params.init((new DerValue( - DerValue.tag_OctetString, nonce).toByteArray())); + DerValue.tag_OctetString, nonceData).toByteArray())); } catch (NoSuchAlgorithmException | IOException exc) { throw new RuntimeException(exc); } @@ -504,7 +509,7 @@ * * @return a 12-byte array containing the random nonce. */ - private byte[] createRandomNonce(SecureRandom random) { + private static byte[] createRandomNonce(SecureRandom random) { byte[] newNonce = new byte[12]; SecureRandom rand = (random != null) ? random : new SecureRandom(); rand.nextBytes(newNonce); diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/java/io/File.java openjdk-11-11.0.15+10/src/java.base/share/classes/java/io/File.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/java/io/File.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/java/io/File.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -175,8 +175,9 @@ /** * Check if the file has an invalid path. Currently, the inspection of - * a file path is very limited, and it only covers Nul character check. - * Returning true means the path is definitely invalid/garbage. But + * a file path is very limited, and it only covers Nul character check + * unless further checking is explicitly enabled by a system property. + * Returning true means the path is definitely invalid/garbage, but * returning false does not guarantee that the path is valid. * * @return true if the file path is invalid. @@ -184,8 +185,7 @@ final boolean isInvalid() { PathStatus s = status; if (s == null) { - s = (this.path.indexOf('\u0000') < 0) ? PathStatus.CHECKED - : PathStatus.INVALID; + s = fs.isInvalid(this) ? PathStatus.INVALID : PathStatus.CHECKED; status = s; } return s == PathStatus.INVALID; diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/java/io/FileSystem.java openjdk-11-11.0.15+10/src/java.base/share/classes/java/io/FileSystem.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/java/io/FileSystem.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/java/io/FileSystem.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -88,6 +88,11 @@ public abstract boolean isAbsolute(File f); /** + * Tell whether the given abstract pathname is invalid. + */ + public abstract boolean isInvalid(File f); + + /** * Resolve the given abstract pathname into absolute form. Invoked by the * getAbsolutePath and getCanonicalPath methods in the File class. */ diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/java/lang/ClassLoader.java openjdk-11-11.0.15+10/src/java.base/share/classes/java/lang/ClassLoader.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/java/lang/ClassLoader.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/java/lang/ClassLoader.java 2022-04-19 19:38:30.000000000 +0000 @@ -2406,6 +2406,8 @@ * @since 1.2 */ static class NativeLibrary { + private static final boolean loadLibraryOnlyIfPresent = ClassLoaderHelper.loadLibraryOnlyIfPresent(); + // the class from which the library is loaded, also indicates // the loader this native library belongs. final Class fromClass; @@ -2420,7 +2422,8 @@ // the version of JNI environment the native library requires. int jniVersion; - native boolean load0(String name, boolean isBuiltin); + native boolean load0(String name, boolean isBuiltin, + boolean throwExceptionIfFail); native long findEntry(String name); @@ -2439,7 +2442,7 @@ throw new InternalError("Native library " + name + " has been loaded"); } - if (!load0(name, isBuiltin)) return false; + if (!load0(name, isBuiltin, loadLibraryOnlyIfPresent)) return false; // register the class loader for cleanup when unloaded // built class loaders are never unloaded @@ -2681,7 +2684,10 @@ new PrivilegedAction<>() { public String run() { try { - return file.exists() ? file.getCanonicalPath() : null; + if (NativeLibrary.loadLibraryOnlyIfPresent && !file.exists()) { + return null; + } + return file.getCanonicalPath(); } catch (IOException e) { return null; } diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/java/lang/StringCoding.java openjdk-11-11.0.15+10/src/java.base/share/classes/java/lang/StringCoding.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/java/lang/StringCoding.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/java/lang/StringCoding.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -921,14 +921,17 @@ int sp = 0; int sl = val.length >> 1; byte[] dst = new byte[sl * 3]; - char c; - while (sp < sl && (c = StringUTF16.getChar(val, sp)) < '\u0080') { + while (sp < sl) { // ascii fast loop; + char c = StringUTF16.getChar(val, sp); + if (c >= '\u0080') { + break; + } dst[dp++] = (byte)c; sp++; } while (sp < sl) { - c = StringUTF16.getChar(val, sp++); + char c = StringUTF16.getChar(val, sp++); if (c < 0x80) { dst[dp++] = (byte)c; } else if (c < 0x800) { diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/java/math/BigInteger.java openjdk-11-11.0.15+10/src/java.base/share/classes/java/math/BigInteger.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/java/math/BigInteger.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/java/math/BigInteger.java 2022-04-19 19:38:30.000000000 +0000 @@ -1650,8 +1650,8 @@ // are only considering the magnitudes as non-negative. The // Toom-Cook multiplication algorithm determines the sign // at its end from the two signum values. - if (bitLength(mag, mag.length) + - bitLength(val.mag, val.mag.length) > + if ((long)bitLength(mag, mag.length) + + (long)bitLength(val.mag, val.mag.length) > 32L*MAX_MAG_LENGTH) { reportOverflow(); } diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/java/text/SimpleDateFormat.java openjdk-11-11.0.15+10/src/java.base/share/classes/java/text/SimpleDateFormat.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/java/text/SimpleDateFormat.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/java/text/SimpleDateFormat.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1189,7 +1189,7 @@ } break; - case PATTERN_MONTH: // 'M' (context seinsive) + case PATTERN_MONTH: // 'M' (context sensitive) if (useDateFormatSymbols) { String[] months; if (count >= 4) { @@ -2033,7 +2033,7 @@ return index; } } else { - Map map = getDisplayNamesMap(field, locale); + Map map = getDisplayContextNamesMap(field, locale); if ((index = matchString(text, start, field, map, calb)) > 0) { return index; } @@ -2448,6 +2448,22 @@ } return map; } + + /** + * Obtains display names map, taking the context into account. Currently only + * the month name pattern 'M' is context dependent. + */ + private Map getDisplayContextNamesMap(int field, Locale locale) { + Map map = calendar.getDisplayNames(field, + forceStandaloneForm ? Calendar.SHORT_STANDALONE : Calendar.SHORT_FORMAT, locale); + // Get the LONG style + Map m = calendar.getDisplayNames(field, + forceStandaloneForm ? Calendar.LONG_STANDALONE : Calendar.LONG_FORMAT, locale); + if (m != null) { + map.putAll(m); + } + return map; + } /** * After reading an object from the input stream, the format diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/java/time/format/Parsed.java openjdk-11-11.0.15+10/src/java.base/share/classes/java/time/format/Parsed.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/java/time/format/Parsed.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/java/time/format/Parsed.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -349,10 +349,11 @@ } private void resolveInstantFields0(ZoneId selectedZone) { - Instant instant = Instant.ofEpochSecond(fieldValues.remove(INSTANT_SECONDS)); + Instant instant = Instant.ofEpochSecond(fieldValues.get(INSTANT_SECONDS)); ChronoZonedDateTime zdt = chrono.zonedDateTime(instant, selectedZone); updateCheckConflict(zdt.toLocalDate()); updateCheckConflict(INSTANT_SECONDS, SECOND_OF_DAY, (long) zdt.toLocalTime().toSecondOfDay()); + updateCheckConflict(INSTANT_SECONDS, OFFSET_SECONDS, (long) zdt.getOffset().getTotalSeconds()); } //----------------------------------------------------------------------- @@ -593,9 +594,9 @@ } private void resolveInstant() { - // add instant seconds if we have date, time and zone + // add instant seconds (if not present) if we have date, time and zone // Offset (if present) will be given priority over the zone. - if (date != null && time != null) { + if (!fieldValues.containsKey(INSTANT_SECONDS) && date != null && time != null) { Long offsetSecs = fieldValues.get(OFFSET_SECONDS); if (offsetSecs != null) { ZoneOffset offset = ZoneOffset.ofTotalSeconds(offsetSecs.intValue()); diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/java/util/DoubleSummaryStatistics.java openjdk-11-11.0.15+10/src/java.base/share/classes/java/util/DoubleSummaryStatistics.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/java/util/DoubleSummaryStatistics.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/java/util/DoubleSummaryStatistics.java 2022-04-19 19:38:30.000000000 +0000 @@ -154,7 +154,9 @@ count += other.count; simpleSum += other.simpleSum; sumWithCompensation(other.sum); - sumWithCompensation(other.sumCompensation); + + // Subtract compensation bits + sumWithCompensation(-other.sumCompensation); min = Math.min(min, other.min); max = Math.max(max, other.max); } @@ -239,7 +241,7 @@ */ public final double getSum() { // Better error bounds to add both terms as the final sum - double tmp = sum + sumCompensation; + double tmp = sum - sumCompensation; if (Double.isNaN(tmp) && Double.isInfinite(simpleSum)) // If the compensated sum is spuriously NaN from // accumulating one or more same-signed infinite values, diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/java/util/stream/Collectors.java openjdk-11-11.0.15+10/src/java.base/share/classes/java/util/stream/Collectors.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/java/util/stream/Collectors.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/java/util/stream/Collectors.java 2022-04-19 19:38:30.000000000 +0000 @@ -726,7 +726,8 @@ a[2] += val;}, (a, b) -> { sumWithCompensation(a, b[0]); a[2] += b[2]; - return sumWithCompensation(a, b[1]); }, + // Subtract compensation bits + return sumWithCompensation(a, -b[1]); }, a -> computeFinalSum(a), CH_NOID); } @@ -757,8 +758,8 @@ * correctly-signed infinity stored in the simple sum. */ static double computeFinalSum(double[] summands) { - // Better error bounds to add both terms as the final sum - double tmp = summands[0] + summands[1]; + // Final sum with better error bounds subtract second summand as it is negated + double tmp = summands[0] - summands[1]; double simpleSum = summands[summands.length - 1]; if (Double.isNaN(tmp) && Double.isInfinite(simpleSum)) return simpleSum; @@ -832,13 +833,19 @@ /* * In the arrays allocated for the collect operation, index 0 * holds the high-order bits of the running sum, index 1 holds - * the low-order bits of the sum computed via compensated + * the negated low-order bits of the sum computed via compensated * summation, and index 2 holds the number of values seen. */ return new CollectorImpl<>( () -> new double[4], (a, t) -> { double val = mapper.applyAsDouble(t); sumWithCompensation(a, val); a[2]++; a[3]+= val;}, - (a, b) -> { sumWithCompensation(a, b[0]); sumWithCompensation(a, b[1]); a[2] += b[2]; a[3] += b[3]; return a; }, + (a, b) -> { + sumWithCompensation(a, b[0]); + // Subtract compensation bits + sumWithCompensation(a, -b[1]); + a[2] += b[2]; a[3] += b[3]; + return a; + }, a -> (a[2] == 0) ? 0.0d : (computeFinalSum(a) / a[2]), CH_NOID); } diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/java/util/stream/DoublePipeline.java openjdk-11-11.0.15+10/src/java.base/share/classes/java/util/stream/DoublePipeline.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/java/util/stream/DoublePipeline.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/java/util/stream/DoublePipeline.java 2022-04-19 19:38:30.000000000 +0000 @@ -417,7 +417,7 @@ /* * In the arrays allocated for the collect operation, index 0 * holds the high-order bits of the running sum, index 1 holds - * the low-order bits of the sum computed via compensated + * the negated low-order bits of the sum computed via compensated * summation, and index 2 holds the simple sum used to compute * the proper result if the stream contains infinite values of * the same sign. @@ -429,7 +429,8 @@ }, (ll, rr) -> { Collectors.sumWithCompensation(ll, rr[0]); - Collectors.sumWithCompensation(ll, rr[1]); + // Subtract compensation bits + Collectors.sumWithCompensation(ll, -rr[1]); ll[2] += rr[2]; }); @@ -472,7 +473,8 @@ }, (ll, rr) -> { Collectors.sumWithCompensation(ll, rr[0]); - Collectors.sumWithCompensation(ll, rr[1]); + // Subtract compensation bits + Collectors.sumWithCompensation(ll, -rr[1]); ll[2] += rr[2]; ll[3] += rr[3]; }); diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java openjdk-11-11.0.15+10/src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -83,12 +83,12 @@ "must be non-null"); } - DerValue val = new DerValue(encoded); + this.encoded = encoded.clone(); + DerValue val = DerValue.wrap(this.encoded); if (val.tag != DerValue.tag_Sequence) { throw new IOException("DER header error: no SEQ tag"); } - this.encoded = encoded.clone(); DerValue[] seq = new DerValue[2]; seq[0] = val.data.getDerValue(); diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java openjdk-11-11.0.15+10/src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java 2022-04-19 19:38:30.000000000 +0000 @@ -603,8 +603,8 @@ if (!(memberType.isInstance(value) || value instanceof ExceptionProxy)) { value = new AnnotationTypeMismatchExceptionProxy( - value.getClass() + "[" + value + "]").setMember( - annotationType.members().get(name)); + objectToString(value)) + .setMember(annotationType.members().get(name)); } } mv.put(name, value); @@ -614,6 +614,15 @@ UnsafeAccessor.setMemberValues(this, mv); } + /* + * Create a textual representation of the argument without calling + * any overridable methods of the argument. + */ + private static String objectToString(Object value) { + return value.getClass().getName() + "@" + + Integer.toHexString(System.identityHashCode(value)); + } + private static class UnsafeAccessor { private static final jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe(); diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/InputRecord.java openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/InputRecord.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/InputRecord.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/InputRecord.java 2022-04-19 19:38:30.000000000 +0000 @@ -122,7 +122,7 @@ * Since MAC's doFinal() is called for every SSL/TLS packet, it's * not necessary to do the same with MAC's. */ - readCipher.dispose(); + this.readCipher.dispose(); this.readCipher = readCipher; } diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/OutputRecord.java openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/OutputRecord.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/OutputRecord.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/OutputRecord.java 2022-04-19 19:38:30.000000000 +0000 @@ -141,6 +141,11 @@ // SSLEngine and SSLSocket abstract void encodeChangeCipherSpec() throws IOException; + // SSLEngine and SSLSocket + void disposeWriteCipher() { + throw new UnsupportedOperationException(); + } + // apply to SSLEngine only Ciphertext encode( ByteBuffer[] srcs, int srcsOffset, int srcsLength, @@ -190,7 +195,7 @@ * Since MAC's doFinal() is called for every SSL/TLS packet, it's * not necessary to do the same with MAC's. */ - writeCipher.dispose(); + disposeWriteCipher(); this.writeCipher = writeCipher; this.isFirstAppOutputRecord = true; @@ -219,7 +224,7 @@ flush(); // Dispose of any intermediate state in the underlying cipher. - writeCipher.dispose(); + disposeWriteCipher(); this.writeCipher = writeCipher; this.isFirstAppOutputRecord = true; diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/SSLEngineOutputRecord.java openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/SSLEngineOutputRecord.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/SSLEngineOutputRecord.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/SSLEngineOutputRecord.java 2022-04-19 19:38:30.000000000 +0000 @@ -152,6 +152,15 @@ } @Override + void disposeWriteCipher() { + if (fragmenter == null) { + writeCipher.dispose(); + } else { + fragmenter.queueUpCipherDispose(); + } + } + + @Override void encodeV2NoCipher() throws IOException { isTalkingToV2 = true; } @@ -361,6 +370,7 @@ byte majorVersion; byte minorVersion; SSLWriteCipher encodeCipher; + boolean disposeCipher; byte[] fragment; } @@ -421,6 +431,15 @@ handshakeMemos.add(memo); } + void queueUpCipherDispose() { + RecordMemo lastMemo = handshakeMemos.peekLast(); + if (lastMemo != null) { + lastMemo.disposeCipher = true; + } else { + writeCipher.dispose(); + } + } + Ciphertext acquireCiphertext(ByteBuffer dstBuf) throws IOException { if (isEmpty()) { return null; @@ -520,6 +539,9 @@ dstPos, dstLim, headerSize, ProtocolVersion.valueOf(memo.majorVersion, memo.minorVersion)); + if (memo.disposeCipher) { + memo.encodeCipher.dispose(); + } if (SSLLogger.isOn && SSLLogger.isOn("packet")) { ByteBuffer temporary = dstBuf.duplicate(); diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java 2022-04-19 19:38:30.000000000 +0000 @@ -108,6 +108,11 @@ private static final boolean trustNameService = Utilities.getBooleanProperty("jdk.tls.trustNameService", false); + /* + * Default timeout to skip bytes from the open socket + */ + private static final int DEFAULT_SKIP_TIMEOUT = 1; + /** * Package-private constructor used to instantiate an unconnected * socket. @@ -1756,9 +1761,23 @@ if (conContext.inputRecord instanceof SSLSocketInputRecord && isConnected) { if (appInput.readLock.tryLock()) { + int soTimeout = getSoTimeout(); try { + // deplete could hang on the skip operation + // in case of infinite socket read timeout. + // Change read timeout to avoid deadlock. + // This workaround could be replaced later + // with the right synchronization + if (soTimeout == 0) { + setSoTimeout(DEFAULT_SKIP_TIMEOUT); + } ((SSLSocketInputRecord) (conContext.inputRecord)).deplete(false); + } catch (java.net.SocketTimeoutException stEx) { + // skip timeout exception during deplete } finally { + if (soTimeout == 0) { + setSoTimeout(soTimeout); + } appInput.readLock.unlock(); } } diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/SSLSocketOutputRecord.java openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/SSLSocketOutputRecord.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/SSLSocketOutputRecord.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/SSLSocketOutputRecord.java 2022-04-19 19:38:30.000000000 +0000 @@ -244,6 +244,11 @@ } @Override + void disposeWriteCipher() { + writeCipher.dispose(); + } + + @Override public void flush() throws IOException { recordLock.lock(); try { diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/TransportContext.java openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/TransportContext.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/ssl/TransportContext.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/ssl/TransportContext.java 2022-04-19 19:38:30.000000000 +0000 @@ -26,6 +26,7 @@ package sun.security.ssl; import java.io.IOException; +import java.net.SocketException; import java.security.AccessControlContext; import java.security.AccessController; import java.security.PrivilegedAction; @@ -365,7 +366,12 @@ // invalidate the session if (conSession != null) { - conSession.invalidate(); + // In the case of a low-layer transport error, we want to prevent + // the session from being invalidated since this is not a TLS-level + // error event. + if (!(cause instanceof SocketException)) { + conSession.invalidate(); + } } if (handshakeContext != null && diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/tools/keytool/Main.java openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/tools/keytool/Main.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/tools/keytool/Main.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/tools/keytool/Main.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2150,6 +2150,9 @@ out.println(mf); dumpCert(cert, out); } else if (debug) { + for (var attr : keyStore.getEntry(alias, null).getAttributes()) { + System.out.println("Attribute " + attr.getName() + ": " + attr.getValue()); + } out.println(cert.toString()); } else { out.println("trustedCertEntry, "); diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/util/DerIndefLenConverter.java openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/util/DerIndefLenConverter.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/util/DerIndefLenConverter.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/util/DerIndefLenConverter.java 2022-04-19 19:38:30.000000000 +0000 @@ -144,15 +144,14 @@ * then skip the tag and its 1 byte length of zero. */ private void writeTag() { - if (dataPos == dataSize) { - return; - } - assert dataPos + 1 < dataSize; - if (isEOC(data, dataPos)) { - dataPos += 2; // skip tag and length - writeTag(); - } else { - newData[newDataPos++] = data[dataPos++]; + while (dataPos < dataSize) { + assert dataPos + 1 < dataSize; + if (isEOC(data, dataPos)) { + dataPos += 2; // skip tag and length + } else { + newData[newDataPos++] = data[dataPos++]; + break; + } } } diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/util/DerValue.java openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/util/DerValue.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/util/DerValue.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/util/DerValue.java 2022-04-19 19:38:30.000000000 +0000 @@ -306,6 +306,34 @@ } /** + * Wraps a byte array as a single DerValue. + * + * Attention: no cloning is made. + * + * @param buf the byte array containing the DER-encoded datum + * @returns a new DerValue + */ + public static DerValue wrap(byte[] buf) + throws IOException { + return wrap(buf, 0, buf.length); + } + + /** + * Wraps a byte array as a single DerValue. + * + * Attention: no cloning is made. + * + * @param buf the byte array containing the DER-encoded datum + * @param offset where the encoded datum starts inside {@code buf} + * @param len length of bytes to parse inside {@code buf} + * @returns a new DerValue + */ + public static DerValue wrap(byte[] buf, int offset, int len) + throws IOException { + return new DerValue(buf, offset, len); + } + + /** * Get an ASN.1/DER encoded datum from part of a buffer. * That part of the buffer must hold exactly one datum, including * its tag and length. diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -435,7 +435,7 @@ if ((encoding[i] & 0x80) == 0) { // one section [fromPos..i] if (i - fromPos + 1 > 4) { - BigInteger big = new BigInteger(pack(encoding, fromPos, i-fromPos+1, 7, 8)); + BigInteger big = new BigInteger(1, pack(encoding, fromPos, i-fromPos+1, 7, 8)); if (fromPos == 0) { result[which++] = 2; BigInteger second = big.subtract(BigInteger.valueOf(80)); @@ -500,7 +500,7 @@ sb.append('.'); } if (i - fromPos + 1 > 4) { // maybe big integer - BigInteger big = new BigInteger(pack(encoding, fromPos, i-fromPos+1, 7, 8)); + BigInteger big = new BigInteger(1, pack(encoding, fromPos, i-fromPos+1, 7, 8)); if (fromPos == 0) { // first section encoded with more than 4 bytes, // must be 2.something @@ -732,6 +732,11 @@ } private static void checkOidSize(int oidLength) throws IOException { + if (oidLength < 0) { + throw new IOException("ObjectIdentifier encoded length was " + + "negative: " + oidLength); + } + if (oidLength > MAXIMUM_OID_SIZE) { throw new IOException( "ObjectIdentifier encoded length exceeds " + diff -Nru openjdk-11-11.0.14+9/src/java.base/share/classes/sun/util/resources/CurrencyNames.properties openjdk-11-11.0.15+10/src/java.base/share/classes/sun/util/resources/CurrencyNames.properties --- openjdk-11-11.0.14+9/src/java.base/share/classes/sun/util/resources/CurrencyNames.properties 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/classes/sun/util/resources/CurrencyNames.properties 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -251,6 +251,7 @@ UYU=UYU UZS=UZS VEB=VEB +VED=VED VEF=VEF VES=VES VND=VND @@ -474,6 +475,7 @@ uyu=Uruguayan Peso uzs=Uzbekistan Som veb=Venezuelan Bol\u00edvar (1871-2008) +ved=Venezuelan Bol\u00edvar Soberano vef=Venezuelan Bol\u00edvar ves=Venezuelan Bol\u00edvar Soberano vnd=Vietnamese Dong diff -Nru openjdk-11-11.0.14+9/src/java.base/share/native/libjava/ClassLoader.c openjdk-11-11.0.15+10/src/java.base/share/native/libjava/ClassLoader.c --- openjdk-11-11.0.14+9/src/java.base/share/native/libjava/ClassLoader.c 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/native/libjava/ClassLoader.c 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,7 +336,8 @@ */ JNIEXPORT jboolean JNICALL Java_java_lang_ClassLoader_00024NativeLibrary_load0 - (JNIEnv *env, jobject this, jstring name, jboolean isBuiltin) + (JNIEnv *env, jobject this, jstring name, + jboolean isBuiltin, jboolean throwExceptionIfFail) { const char *cname; jint jniVersion; @@ -350,7 +351,7 @@ cname = JNU_GetStringPlatformChars(env, name, 0); if (cname == 0) return JNI_FALSE; - handle = isBuiltin ? procHandle : JVM_LoadLibrary(cname); + handle = isBuiltin ? procHandle : JVM_LoadLibrary(cname, throwExceptionIfFail); if (handle) { JNI_OnLoad_t JNI_OnLoad; JNI_OnLoad = (JNI_OnLoad_t)findJniFunction(env, handle, diff -Nru openjdk-11-11.0.14+9/src/java.base/share/native/libjava/jni_util.c openjdk-11-11.0.15+10/src/java.base/share/native/libjava/jni_util.c --- openjdk-11-11.0.14+9/src/java.base/share/native/libjava/jni_util.c 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/native/libjava/jni_util.c 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -516,7 +516,7 @@ newString646_US(JNIEnv *env, const char *str) { int len = (int)strlen(str); - jchar buf[512]; + jchar buf[512] = {0}; jchar *str1; jstring result; int i; diff -Nru openjdk-11-11.0.14+9/src/java.base/share/native/libverify/check_code.c openjdk-11-11.0.15+10/src/java.base/share/native/libverify/check_code.c --- openjdk-11-11.0.14+9/src/java.base/share/native/libverify/check_code.c 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/share/native/libverify/check_code.c 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -3830,7 +3830,7 @@ } length = finish - p; if (length + 1 > (int)sizeof(buffer_space)) { - buffer = malloc(length + 1); + buffer = calloc(length + 1, sizeof(char)); check_and_push(context, buffer, VM_MALLOC_BLK); } memcpy(buffer, p, length); diff -Nru openjdk-11-11.0.14+9/src/java.base/unix/classes/java/io/UnixFileSystem.java openjdk-11-11.0.15+10/src/java.base/unix/classes/java/io/UnixFileSystem.java --- openjdk-11-11.0.14+9/src/java.base/unix/classes/java/io/UnixFileSystem.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/unix/classes/java/io/UnixFileSystem.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -130,6 +130,11 @@ return (f.getPrefixLength() != 0); } + @Override + public boolean isInvalid(File f) { + return f.getPath().indexOf('\u0000') < 0 ? false : true; + } + public String resolve(File f) { if (isAbsolute(f)) return f.getPath(); SecurityManager sm = System.getSecurityManager(); diff -Nru openjdk-11-11.0.14+9/src/java.base/unix/classes/java/lang/ClassLoaderHelper.java openjdk-11-11.0.15+10/src/java.base/unix/classes/java/lang/ClassLoaderHelper.java --- openjdk-11-11.0.14+9/src/java.base/unix/classes/java/lang/ClassLoaderHelper.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/unix/classes/java/lang/ClassLoaderHelper.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,14 @@ static final boolean allowsQuotedPathElements = false; /** + * Returns true if loading a native library only if + * it's present on the file system. + */ + static boolean loadLibraryOnlyIfPresent() { + return true; + } + + /** * Returns an alternate path name for the given file * such that if the original pathname did not exist, then the * file may be located at the alternate location. diff -Nru openjdk-11-11.0.14+9/src/java.base/windows/classes/java/io/WinNTFileSystem.java openjdk-11-11.0.15+10/src/java.base/windows/classes/java/io/WinNTFileSystem.java --- openjdk-11-11.0.14+9/src/java.base/windows/classes/java/io/WinNTFileSystem.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/windows/classes/java/io/WinNTFileSystem.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ package java.io; import java.io.File; +import java.nio.file.InvalidPathException; import java.nio.file.Path; import java.util.BitSet; import java.util.Locale; @@ -45,6 +46,21 @@ private final char semicolon; private final String userDir; + // Whether to enable alternative data streams (ADS) by suppressing + // checking the path for invalid characters, in particular ":". + // ADS support will be enabled if and only if the property is set and + // is the empty string or is equal, ignoring case, to the string "true". + // By default ADS support is disabled. + private static final boolean ENABLE_ADS; + static { + String enableADS = GetPropertyAction.privilegedGetProperty("jdk.io.File.enableADS"); + if (enableADS != null) { + ENABLE_ADS = "".equals(enableADS) || Boolean.parseBoolean(enableADS); + } else { + ENABLE_ADS = false; + } + } + public WinNTFileSystem() { Properties props = GetPropertyAction.privilegedGetProperties(); slash = props.getProperty("file.separator").charAt(0); @@ -304,6 +320,36 @@ } @Override + public boolean isInvalid(File f) { + if (f.getPath().indexOf('\u0000') >= 0) + return true; + + if (ENABLE_ADS) + return false; + + // Invalid if there is a ":" at a position greater than 1, or if there + // is a ":" at position 1 and the first character is not a letter + String pathname = f.getPath(); + int lastColon = pathname.lastIndexOf(":"); + + // Valid if there is no ":" present or if the last ":" present is + // at index 1 and the first character is a latter + if (lastColon < 0 || + (lastColon == 1 && isLetter(pathname.charAt(0)))) + return false; + + // Invalid if path creation fails + Path path = null; + try { + path = sun.nio.fs.DefaultFileSystemProvider.theFileSystem().getPath(pathname); + return false; + } catch (InvalidPathException ignored) { + } + + return true; + } + + @Override public String resolve(File f) { String path = f.getPath(); int pl = f.getPrefixLength(); diff -Nru openjdk-11-11.0.14+9/src/java.base/windows/classes/java/lang/ClassLoaderHelper.java openjdk-11-11.0.15+10/src/java.base/windows/classes/java/lang/ClassLoaderHelper.java --- openjdk-11-11.0.14+9/src/java.base/windows/classes/java/lang/ClassLoaderHelper.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/windows/classes/java/lang/ClassLoaderHelper.java 2022-04-19 19:38:30.000000000 +0000 @@ -37,6 +37,14 @@ static final boolean allowsQuotedPathElements = true; /** + * Returns true if loading a native library only if + * it's present on the file system. + */ + static boolean loadLibraryOnlyIfPresent() { + return true; + } + + /** * Returns an alternate path name for the given file * such that if the original pathname did not exist, then the * file may be located at the alternate location. diff -Nru openjdk-11-11.0.14+9/src/java.base/windows/native/libnet/DefaultProxySelector.c openjdk-11-11.0.15+10/src/java.base/windows/native/libnet/DefaultProxySelector.c --- openjdk-11-11.0.14+9/src/java.base/windows/native/libnet/DefaultProxySelector.c 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.base/windows/native/libnet/DefaultProxySelector.c 2022-04-19 19:38:30.000000000 +0000 @@ -104,7 +104,6 @@ int nr_elems = 0; wchar_t *context = NULL; wchar_t *current_proxy = NULL; - BOOL error = FALSE; /* * The proxy server list contains one or more of the following strings @@ -116,7 +115,6 @@ LPWSTR pport; LPWSTR phost; int portVal = 0; - wchar_t *next_proxy = NULL; list_item *proxy = NULL; wchar_t* pos = NULL; @@ -290,7 +288,6 @@ } if (win_proxy != NULL) { - wchar_t *context = NULL; int defport = 0; int nr_elems = 0; @@ -314,27 +311,28 @@ nr_elems = createProxyList(win_proxy, lpProto, &head); if (nr_elems != 0 && head != NULL) { int index = 0; + list_item *current = head; proxy_array = (*env)->NewObjectArray(env, nr_elems, proxy_class, NULL); if (proxy_array == NULL || (*env)->ExceptionCheck(env)) { goto noproxy; } - while (head != NULL && index < nr_elems) { + while (current != NULL && index < nr_elems) { jstring jhost; jobject isa; jobject proxy; - if (head->host != NULL && proxy_array != NULL) { + if (current->host != NULL && proxy_array != NULL) { /* Let's create the appropriate Proxy object then. */ - if (head->port == 0) { - head->port = defport; + if (current->port == 0) { + current->port = defport; } - jhost = (*env)->NewString(env, head->host, (jsize)wcslen(head->host)); + jhost = (*env)->NewString(env, current->host, (jsize)wcslen(current->host)); if (jhost == NULL || (*env)->ExceptionCheck(env)) { proxy_array = NULL; } isa = (*env)->CallStaticObjectMethod(env, isaddr_class, isaddr_createUnresolvedID, jhost, - head->port); + current->port); if (isa == NULL || (*env)->ExceptionCheck(env)) { proxy_array = NULL; } @@ -348,7 +346,7 @@ } index++; } - head = head->next; + current = current->next; } } } diff -Nru openjdk-11-11.0.14+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java openjdk-11-11.0.15+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java --- openjdk-11-11.0.14+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java 2022-04-19 19:38:30.000000000 +0000 @@ -69,8 +69,9 @@ import java.util.List; import java.util.StringTokenizer; -import com.sun.imageio.plugins.common.ImageUtil; import com.sun.imageio.plugins.common.I18N; +import com.sun.imageio.plugins.common.ImageUtil; +import com.sun.imageio.plugins.common.ReaderUtil; /** This class is the Java Image IO plugin reader for BMP images. * It may subsample the image, clip the image, select sub-bands, @@ -1536,9 +1537,8 @@ } // Read till we have the whole image - byte values[] = new byte[imSize]; - int bytesRead = 0; - iis.readFully(values, 0, imSize); + byte[] values = ReaderUtil. + staggeredReadByteStream(iis, imSize); // Since data is compressed, decompress it decodeRLE8(imSize, padding, values, bdata); @@ -1720,8 +1720,8 @@ } // Read till we have the whole image - byte[] values = new byte[imSize]; - iis.readFully(values, 0, imSize); + byte[] values = ReaderUtil. + staggeredReadByteStream(iis, imSize); // Decompress the RLE4 compressed data. decodeRLE4(imSize, padding, values, bdata); diff -Nru openjdk-11-11.0.14+9/src/java.desktop/share/classes/com/sun/media/sound/AbstractDataLine.java openjdk-11-11.0.15+10/src/java.desktop/share/classes/com/sun/media/sound/AbstractDataLine.java --- openjdk-11-11.0.14+9/src/java.desktop/share/classes/com/sun/media/sound/AbstractDataLine.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.desktop/share/classes/com/sun/media/sound/AbstractDataLine.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -315,13 +315,7 @@ //boolean sendEvents = false; //long position = getLongFramePosition(); - synchronized (this) { - - if (this.active != active) { - this.active = active; - //sendEvents = true; - } - } + this.active = active; // $$kk: 11.19.99: take ACTIVE / INACTIVE / EOM events out; // putting them in is technically an API change. @@ -347,12 +341,9 @@ boolean sendEvents = false; long position = getLongFramePosition(); - synchronized (this) { - - if (this.started != started) { - this.started = started; - sendEvents = true; - } + if (this.started != started) { + this.started = started; + sendEvents = true; } if (sendEvents) { diff -Nru openjdk-11-11.0.14+9/src/java.desktop/share/classes/com/sun/media/sound/AbstractLine.java openjdk-11-11.0.15+10/src/java.desktop/share/classes/com/sun/media/sound/AbstractLine.java --- openjdk-11-11.0.14+9/src/java.desktop/share/classes/com/sun/media/sound/AbstractLine.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.desktop/share/classes/com/sun/media/sound/AbstractLine.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -162,11 +162,9 @@ boolean sendEvents = false; long position = getLongFramePosition(); - synchronized (this) { - if (this.open != open) { - this.open = open; - sendEvents = true; - } + if (this.open != open) { + this.open = open; + sendEvents = true; } if (sendEvents) { diff -Nru openjdk-11-11.0.14+9/src/java.desktop/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java openjdk-11-11.0.15+10/src/java.desktop/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java --- openjdk-11-11.0.14+9/src/java.desktop/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.desktop/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -78,12 +78,26 @@ public Soundbank getSoundbank(AudioInputStream ais) throws InvalidMidiDataException, IOException { + int MEGABYTE = 1048576; + int DEFAULT_BUFFER_SIZE = 65536; + int MAX_FRAME_SIZE = 1024; try { byte[] buffer; - if (ais.getFrameLength() == -1) { + int frameSize = ais.getFormat().getFrameSize(); + if (frameSize <= 0 || frameSize > MAX_FRAME_SIZE) { + throw new InvalidMidiDataException("Formats with frame size " + + frameSize + " are not supported"); + } + + long totalSize = ais.getFrameLength() * frameSize; + if (totalSize >= Integer.MAX_VALUE - 2) { + throw new InvalidMidiDataException( + "Can not allocate enough memory to read audio data."); + } + + if (ais.getFrameLength() == -1 || totalSize > MEGABYTE) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); - byte[] buff = new byte[1024 - - (1024 % ais.getFormat().getFrameSize())]; + byte[] buff = new byte[DEFAULT_BUFFER_SIZE - (DEFAULT_BUFFER_SIZE % frameSize)]; int ret; while ((ret = ais.read(buff)) != -1) { baos.write(buff, 0, ret); @@ -91,8 +105,7 @@ ais.close(); buffer = baos.toByteArray(); } else { - buffer = new byte[(int) (ais.getFrameLength() - * ais.getFormat().getFrameSize())]; + buffer = new byte[(int) totalSize]; new DataInputStream(ais).readFully(buffer); } ModelByteBufferWavetable osc = new ModelByteBufferWavetable( diff -Nru openjdk-11-11.0.14+9/src/java.desktop/share/classes/com/sun/media/sound/DirectAudioDevice.java openjdk-11-11.0.15+10/src/java.desktop/share/classes/com/sun/media/sound/DirectAudioDevice.java --- openjdk-11-11.0.14+9/src/java.desktop/share/classes/com/sun/media/sound/DirectAudioDevice.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.desktop/share/classes/com/sun/media/sound/DirectAudioDevice.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1252,7 +1252,7 @@ } @Override - public synchronized void setMicrosecondPosition(long microseconds) { + public void setMicrosecondPosition(long microseconds) { if (Printer.trace) Printer.trace("> DirectClip: setMicrosecondPosition: " + microseconds); long frames = Toolkit.micros2frames(getFormat(), microseconds); diff -Nru openjdk-11-11.0.14+9/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java openjdk-11-11.0.15+10/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java --- openjdk-11-11.0.14+9/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java 2022-04-19 19:38:30.000000000 +0000 @@ -864,7 +864,7 @@ ProfileDeferralInfo pInfo = new ProfileDeferralInfo("CIEXYZ.pf", ColorSpace.TYPE_XYZ, 3, - CLASS_DISPLAY); + CLASS_ABSTRACT); XYZprofile = getDeferredInstance(pInfo); } thisProfile = XYZprofile; @@ -880,7 +880,7 @@ ProfileDeferralInfo pInfo = new ProfileDeferralInfo("PYCC.pf", ColorSpace.TYPE_3CLR, 3, - CLASS_DISPLAY); + CLASS_COLORSPACECONVERSION); PYCCprofile = getDeferredInstance(pInfo); } else { throw new IllegalArgumentException( @@ -1030,10 +1030,10 @@ static byte[] getProfileDataFromStream(InputStream s) throws IOException { BufferedInputStream bis = new BufferedInputStream(s); - bis.mark(128); + bis.mark(128); // 128 is the length of the ICC profile header byte[] header = bis.readNBytes(128); - if (header[36] != 0x61 || header[37] != 0x63 || + if (header.length < 128 || header[36] != 0x61 || header[37] != 0x63 || header[38] != 0x73 || header[39] != 0x70) { return null; /* not a valid profile */ } diff -Nru openjdk-11-11.0.14+9/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.h openjdk-11-11.0.15+10/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.h --- openjdk-11-11.0.14+9/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.h 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.h 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -215,7 +215,7 @@ SRC = MLIB_S32_MAX; \ if (SRC <= MLIB_S32_MIN) \ SRC = MLIB_S32_MIN; \ - DST = (mlib_s32) SRC + DST = (mlib_s32) SRC #endif /* MLIB_USE_FTOI_CLAMPING */ diff -Nru openjdk-11-11.0.14+9/src/java.desktop/unix/native/common/java2d/opengl/J2D_GL/glxext.h openjdk-11-11.0.15+10/src/java.desktop/unix/native/common/java2d/opengl/J2D_GL/glxext.h --- openjdk-11-11.0.14+9/src/java.desktop/unix/native/common/java2d/opengl/J2D_GL/glxext.h 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.desktop/unix/native/common/java2d/opengl/J2D_GL/glxext.h 2022-04-19 19:38:30.000000000 +0000 @@ -698,8 +698,10 @@ /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ /* (as used in the GLX_OML_sync_control extension). */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +/* JDK modification */ +#elif defined(__sun__) #include -#elif defined(__sun__) || defined(__digital__) +#elif defined(__digital__) #include #if defined(__STDC__) #if defined(__arch64__) || defined(_LP64) diff -Nru openjdk-11-11.0.14+9/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp openjdk-11-11.0.15+10/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp --- openjdk-11-11.0.14+9/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,6 +47,7 @@ #include "awt_Win32GraphicsDevice.h" #include "Hashtable.h" #include "ComCtl32Util.h" +#include "math.h" #include @@ -2234,8 +2235,8 @@ */ RECT* r = (RECT*)(buffer + rgndata->rdh.dwSize); RECT* un[2] = {0, 0}; - DWORD i; - for (i = 0; i < rgndata->rdh.nCount; i++, r++) { + DWORD i; + for (i = 0; i < rgndata->rdh.nCount; i++, r++) { int width = r->right-r->left; int height = r->bottom-r->top; if (width > 0 && height > 0) { @@ -2247,13 +2248,22 @@ } } } + // The Windows may request to update the small region of pixels that + // cannot be represented in the user's space, in this case, we will + // request to repaint the smallest non-empty bounding box in the user's + // space + int screen = GetScreenImOn(); + Devices::InstanceAccess devices; + AwtWin32GraphicsDevice* device = devices->GetDevice(screen); + float scaleX = (device == NULL) ? 1 : device->GetScaleX(); + float scaleY = (device == NULL) ? 1 : device->GetScaleY(); for(i = 0; i < 2; i++) { if (un[i] != 0) { - DoCallback("handleExpose", "(IIII)V", - ScaleDownX(un[i]->left), - ScaleDownY(un[i]->top), - ScaleDownX(un[i]->right - un[i]->left), - ScaleDownY(un[i]->bottom - un[i]->top)); + int x1 = floor(un[i]->left / scaleX); + int y1 = floor(un[i]->top / scaleY); + int x2 = ceil(un[i]->right / scaleX); + int y2 = ceil(un[i]->bottom / scaleY); + DoCallback("handleExpose", "(IIII)V", x1, y1, x2 - x1, y2 - y1); } } delete [] buffer; diff -Nru openjdk-11-11.0.14+9/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp openjdk-11-11.0.15+10/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp --- openjdk-11-11.0.14+9/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp 2022-04-19 19:38:30.000000000 +0000 @@ -651,31 +651,38 @@ // Override AwtWindow::Reshape() to handle minimized/maximized // frames (see 6525850, 4065534) -void AwtFrame::Reshape(int x, int y, int width, int height) +void AwtFrame::Reshape(int x, int y, int w, int h) { if (isIconic()) { // normal AwtComponent::Reshape will not work for iconified windows so... + POINT pt = {x + w / 2, y + h / 2}; + Devices::InstanceAccess devices; + HMONITOR monitor = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST); + int screen = AwtWin32GraphicsDevice::GetScreenFromHMONITOR(monitor); + AwtWin32GraphicsDevice *device = devices->GetDevice(screen); + // Try to set the correct size and jump to the correct location, even if + // it is on the different monitor. Note that for the "size" we use the + // current monitor, so the WM_DPICHANGED will adjust it for the "target" + // monitor. + MONITORINFO *miInfo = AwtWin32GraphicsDevice::GetMonitorInfo(screen); + x = device == NULL ? x : device->ScaleUpAbsX(x); + y = device == NULL ? y : device->ScaleUpAbsY(y); + w = ScaleUpX(w); + h = ScaleUpY(h); + // SetWindowPlacement takes workspace coordinates, but if taskbar is at + // top/left of screen, workspace coords != screen coords, so offset by + // workspace origin + x = x - (miInfo->rcWork.left - miInfo->rcMonitor.left); + y = y - (miInfo->rcWork.top - miInfo->rcMonitor.top); WINDOWPLACEMENT wp; - POINT ptMinPosition = {x,y}; - POINT ptMaxPosition = {0,0}; - RECT rcNormalPosition = {x,y,x+width,y+height}; - RECT rcWorkspace; - HWND hWndDesktop = GetDesktopWindow(); - HWND hWndSelf = GetHWnd(); - - // SetWindowPlacement takes workspace coordinates, but - // if taskbar is at top of screen, workspace coords != - // screen coords, so offset by workspace origin - VERIFY(::SystemParametersInfo(SPI_GETWORKAREA, 0, (PVOID)&rcWorkspace, 0)); - ::OffsetRect(&rcNormalPosition, -rcWorkspace.left, -rcWorkspace.top); - + ::ZeroMemory(&wp, sizeof(WINDOWPLACEMENT)); // set the window size for when it is not-iconified wp.length = sizeof(wp); wp.flags = WPF_SETMINPOSITION; wp.showCmd = IsVisible() ? SW_SHOWMINIMIZED : SW_HIDE; - wp.ptMinPosition = ptMinPosition; - wp.ptMaxPosition = ptMaxPosition; - wp.rcNormalPosition = rcNormalPosition; + wp.ptMinPosition = {x, y}; + wp.ptMaxPosition = {0, 0}; + wp.rcNormalPosition = {x, y, x + w, y + h}; // If the call is not guarded with ignoreWmSize, // a regression for bug 4851435 appears. @@ -683,7 +690,7 @@ // changing the iconified state of the frame // while calling the Frame.setBounds() method. m_ignoreWmSize = TRUE; - ::SetWindowPlacement(hWndSelf, &wp); + ::SetWindowPlacement(GetHWnd(), &wp); m_ignoreWmSize = FALSE; return; @@ -700,7 +707,7 @@ SetStyle(style); } - AwtWindow::Reshape(x, y, width, height); + AwtWindow::Reshape(x, y, w, h); } diff -Nru openjdk-11-11.0.14+9/src/java.instrument/share/native/libinstrument/InvocationAdapter.c openjdk-11-11.0.15+10/src/java.instrument/share/native/libinstrument/InvocationAdapter.c --- openjdk-11-11.0.14+9/src/java.instrument/share/native/libinstrument/InvocationAdapter.c 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.instrument/share/native/libinstrument/InvocationAdapter.c 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -956,6 +956,7 @@ resolved = resolve(parent, path); jvmtierr = (*jvmtienv)->AddToBootstrapClassLoaderSearch(jvmtienv, resolved); + free(resolved); } /* print warning if boot class path not updated */ @@ -981,4 +982,5 @@ if (haveBasePath && parent != canonicalPath) { free(parent); } + free(paths); } diff -Nru openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/ldap/LdapClientFactory.java openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/ldap/LdapClientFactory.java --- openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/ldap/LdapClientFactory.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/ldap/LdapClientFactory.java 2022-04-19 19:38:30.000000000 +0000 @@ -65,7 +65,23 @@ connTimeout, readTimeout, trace, pcb); } + public PooledConnection createPooledConnection(PoolCallback pcb, long timeout) + throws NamingException { + return new LdapClient(host, port, socketFactory, + guardedIntegerCast(timeout), + readTimeout, trace, pcb); + } + public String toString() { return host + ":" + port; } + + private int guardedIntegerCast(long timeout) { + if (timeout < Integer.MIN_VALUE) { + return Integer.MIN_VALUE; + } else if (timeout > Integer.MAX_VALUE) { + return Integer.MAX_VALUE; + } + return (int) timeout; + } } diff -Nru openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/ldap/LdapURL.java openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/ldap/LdapURL.java --- openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/ldap/LdapURL.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/ldap/LdapURL.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,10 @@ import javax.naming.*; import java.net.MalformedURLException; import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.Locale; import java.util.StringTokenizer; import com.sun.jndi.toolkit.url.Uri; import com.sun.jndi.toolkit.url.UrlUtil; @@ -64,6 +68,25 @@ final public class LdapURL extends Uri { + private static final String PARSE_MODE_PROP = "com.sun.jndi.ldapURLParsing"; + private static final ParseMode DEFAULT_PARSE_MODE = ParseMode.COMPAT; + + public static final ParseMode PARSE_MODE; + static { + PrivilegedAction action = () -> + System.getProperty(PARSE_MODE_PROP, DEFAULT_PARSE_MODE.toString()); + ParseMode parseMode = DEFAULT_PARSE_MODE; + try { + @SuppressWarnings("removal") + String mode = AccessController.doPrivileged(action); + parseMode = ParseMode.valueOf(mode.toUpperCase(Locale.ROOT)); + } catch (Throwable t) { + parseMode = DEFAULT_PARSE_MODE; + } finally { + PARSE_MODE = parseMode; + } + } + private boolean useSsl = false; private String DN = null; private String attributes = null; @@ -83,7 +106,7 @@ useSsl = scheme.equalsIgnoreCase("ldaps"); if (! (scheme.equalsIgnoreCase("ldap") || useSsl)) { - throw new MalformedURLException("Not an LDAP URL: " + url); + throw newInvalidURISchemeException(url); } parsePathAndQuery(); // DN, attributes, scope, filter, extensions @@ -99,6 +122,21 @@ } } + @Override + protected MalformedURLException newInvalidURISchemeException(String uri) { + return new MalformedURLException("Not an LDAP URL: " + uri); + } + + @Override + protected boolean isSchemeOnly(String uri) { + return isLdapSchemeOnly(uri); + } + + @Override + protected ParseMode parseMode() { + return PARSE_MODE; + } + /** * Returns true if the URL is an LDAPS URL. */ @@ -151,13 +189,33 @@ StringTokenizer st = new StringTokenizer(urlList, " "); while (st.hasMoreTokens()) { - urls[i++] = st.nextToken(); + // we don't accept scheme-only URLs here + urls[i++] = validateURI(st.nextToken()); } String[] trimmed = new String[i]; System.arraycopy(urls, 0, trimmed, 0, i); return trimmed; } + public static boolean isLdapSchemeOnly(String uri) { + return "ldap:".equals(uri) || "ldaps:".equals(uri); + } + + public static String validateURI(String uri) { + // no validation in legacy mode parsing + if (PARSE_MODE == ParseMode.LEGACY) { + return uri; + } + + // special case of scheme-only URIs + if (isLdapSchemeOnly(uri)) { + return uri; + } + + // use java.net.URI to validate the uri syntax + return URI.create(uri).toString(); + } + /** * Determines whether an LDAP URL has query components. */ @@ -181,7 +239,8 @@ String p = (port != -1) ? (":" + port) : ""; String d = (dn != null) ? ("/" + UrlUtil.encode(dn, "UTF8")) : ""; - return useSsl ? "ldaps://" + h + p + d : "ldap://" + h + p + d; + String uri = useSsl ? "ldaps://" + h + p + d : "ldap://" + h + p + d; + return validateURI(uri); } catch (UnsupportedEncodingException e) { // UTF8 should always be supported throw new IllegalStateException("UTF-8 encoding unavailable"); diff -Nru openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/ldap/pool/Connections.java openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/ldap/pool/Connections.java --- openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/ldap/pool/Connections.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/ldap/pool/Connections.java 2022-04-19 19:38:30.000000000 +0000 @@ -27,6 +27,9 @@ import java.util.ArrayList; // JDK 1.2 import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.Condition; +import java.util.concurrent.locks.ReentrantLock; import java.lang.ref.Reference; import java.lang.ref.SoftReference; @@ -68,13 +71,19 @@ com.sun.jndi.ldap.LdapPoolManager.trace; private static final int DEFAULT_SIZE = 10; + final private int initSize; final private int maxSize; final private int prefSize; final private List conns; + final private PooledConnectionFactory factory; private boolean closed = false; // Closed for business private Reference ref; // maintains reference to id to prevent premature GC + private boolean initialized = false; + private final ReentrantLock lock; + private final Condition connectionsAvailable; + /** * @param id the identity (connection request) of the connections in the list * @param initSize the number of connections to create initially @@ -87,105 +96,73 @@ * when one is removed. * @param factory The factory responsible for creating a connection */ - Connections(Object id, int initSize, int prefSize, int maxSize, - PooledConnectionFactory factory) throws NamingException { - + Connections(Object id, int initSize, int prefSize, int maxSize, PooledConnectionFactory factory, + ReentrantLock lock) throws NamingException { this.maxSize = maxSize; + this.lock = lock; + this.connectionsAvailable = lock.newCondition(); + this.factory = factory; + if (maxSize > 0) { // prefSize and initSize cannot exceed specified maxSize this.prefSize = Math.min(prefSize, maxSize); - initSize = Math.min(initSize, maxSize); + this.initSize = Math.min(initSize, maxSize); } else { this.prefSize = prefSize; + this.initSize = initSize; } - conns = new ArrayList<>(maxSize > 0 ? maxSize : DEFAULT_SIZE); + this.conns = new ArrayList<>(maxSize > 0 ? maxSize : DEFAULT_SIZE); + this.initialized = initSize <= 0; // Maintain soft ref to id so that this Connections' entry in // Pool doesn't get GC'ed prematurely - ref = new SoftReference<>(id); + this.ref = new SoftReference<>(id); d("init size=", initSize); d("max size=", maxSize); d("preferred size=", prefSize); + } - // Create initial connections - PooledConnection conn; - for (int i = 0; i < initSize; i++) { - conn = factory.createPooledConnection(this); - td("Create ", conn ,factory); - conns.add(new ConnectionDesc(conn)); // Add new idle conn to pool + void waitForAvailableConnection() throws InterruptedNamingException { + try { + d("get(): waiting"); + connectionsAvailable.await(); + } catch (InterruptedException e) { + throw new InterruptedNamingException( + "Interrupted while waiting for a connection"); } } - /** - * Retrieves a PooledConnection from this list of connections. - * Use an existing one if one is idle, or create one if the list's - * max size hasn't been reached. If max size has been reached, wait - * for a PooledConnection to be returned, or one to be removed (thus - * not reaching the max size any longer). - * - * @param timeout if > 0, msec to wait until connection is available - * @param factory creates the PooledConnection if one needs to be created - * - * @return A non-null PooledConnection - * @throws NamingException PooledConnection cannot be created, because this - * thread was interrupted while it waited for an available connection, - * or if it timed out while waiting, or the creation of a connection - * resulted in an error. - */ - synchronized PooledConnection get(long timeout, - PooledConnectionFactory factory) throws NamingException { - PooledConnection conn; - long start = (timeout > 0 ? System.currentTimeMillis() : 0); - long waittime = timeout; - - d("get(): before"); - while ((conn = getOrCreateConnection(factory)) == null) { - if (timeout > 0 && waittime <= 0) { - throw new CommunicationException( - "Timeout exceeded while waiting for a connection: " + - timeout + "ms"); - } - try { - d("get(): waiting"); - if (waittime > 0) { - wait(waittime); // Wait until one is released or removed - } else { - wait(); - } - } catch (InterruptedException e) { - throw new InterruptedNamingException( + void waitForAvailableConnection(long waitTime) throws InterruptedNamingException { + try { + d("get(): waiting"); + connectionsAvailable.await(waitTime, TimeUnit.MILLISECONDS); + } catch (InterruptedException e) { + throw new InterruptedNamingException( "Interrupted while waiting for a connection"); - } - // Check whether we timed out - if (timeout > 0) { - long now = System.currentTimeMillis(); - waittime = timeout - (now - start); - } } - - d("get(): after"); - return conn; } /** * Retrieves an idle connection from this list if one is available. - * If none is available, create a new one if maxSize hasn't been reached. - * If maxSize has been reached, return null. - * Always called from a synchronized method. */ - private PooledConnection getOrCreateConnection( - PooledConnectionFactory factory) throws NamingException { - + PooledConnection getAvailableConnection(long timeout) throws NamingException { + if (!initialized) { + PooledConnection conn = createConnection(factory, timeout); + if (conns.size() >= initSize) { + this.initialized = true; + } + return conn; + } int size = conns.size(); // Current number of idle/nonidle conns - PooledConnection conn = null; if (prefSize <= 0 || size >= prefSize) { // If no prefSize specified, or list size already meets or // exceeds prefSize, then first look for an idle connection ConnectionDesc entry; - for (int i = 0; i < size; i++) { - entry = conns.get(i); + for (ConnectionDesc connectionDesc : conns) { + PooledConnection conn; + entry = connectionDesc; if ((conn = entry.tryUse()) != null) { d("get(): use ", conn); td("Use ", conn); @@ -193,17 +170,25 @@ } } } + return null; + } - // Check if list size already at maxSize specified - if (maxSize > 0 && size >= maxSize) { - return null; // List size is at limit; cannot create any more + /* + * Creates a new Connection if maxSize hasn't been reached. + * If maxSize has been reached, return null. + * Caller must hold the ReentrantLock. + */ + PooledConnection createConnection(PooledConnectionFactory factory, long timeout) + throws NamingException { + int size = conns.size(); // Current number of idle/non-idle connections + if (maxSize == 0 || size < maxSize) { + PooledConnection conn = factory.createPooledConnection(this, timeout); + td("Create and use ", conn, factory); + conns.add(new ConnectionDesc(conn, true)); // Add new conn to pool + return conn; } - conn = factory.createPooledConnection(this); - td("Create and use ", conn, factory); - conns.add(new ConnectionDesc(conn, true)); // Add new conn to pool - - return conn; + return null; } /** @@ -211,43 +196,45 @@ * If the list size is below prefSize, the connection may be reused. * If the list size exceeds prefSize, then the connection is closed * and removed from the list. - * + *

* public because implemented as part of PoolCallback. */ - public synchronized boolean releasePooledConnection(PooledConnection conn) { - ConnectionDesc entry; - int loc = conns.indexOf(entry=new ConnectionDesc(conn)); - - d("release(): ", conn); - - if (loc >= 0) { - // Found entry + public boolean releasePooledConnection(PooledConnection conn) { + lock.lock(); + try { + ConnectionDesc entry; + int loc = conns.indexOf(entry = new ConnectionDesc(conn)); - if (closed || (prefSize > 0 && conns.size() > prefSize)) { - // If list size exceeds prefSize, close connection + d("release(): ", conn); - d("release(): closing ", conn); - td("Close ", conn); + if (loc >= 0) { + // Found entry - // size must be >= 2 so don't worry about empty list - conns.remove(entry); - conn.closeConnection(); + if (closed || (prefSize > 0 && conns.size() > prefSize)) { + // If list size exceeds prefSize, close connection - } else { - d("release(): release ", conn); - td("Release ", conn); + d("release(): closing ", conn); + td("Close ", conn); - // Get ConnectionDesc from list to get correct state info - entry = conns.get(loc); - // Return connection to list, ready for reuse - entry.release(); + // size must be >= 2 so don't worry about empty list + conns.remove(entry); + conn.closeConnection(); + } else { + d("release(): release ", conn); + td("Release ", conn); + // Get ConnectionDesc from list to get correct state info + entry = conns.get(loc); + // Return connection to list, ready for reuse + entry.release(); + } + connectionsAvailable.signalAll(); + d("release(): notify"); + return true; } - notifyAll(); - d("release(): notify"); - return true; - } else { - return false; + } finally { + lock.unlock(); } + return false; } /** @@ -257,29 +244,34 @@ * when using the connection and wants it removed from the pool. * * @return true if conn removed; false if it was not in pool - * + *

* public because implemented as part of PoolCallback. */ - public synchronized boolean removePooledConnection(PooledConnection conn) { - if (conns.remove(new ConnectionDesc(conn))) { - d("remove(): ", conn); - - notifyAll(); - - d("remove(): notify"); - td("Remove ", conn); - - if (conns.isEmpty()) { - // Remove softref to make pool entry eligible for GC. - // Once ref has been removed, it cannot be reinstated. - ref = null; - } + public boolean removePooledConnection(PooledConnection conn) { + lock.lock(); + try { + if (conns.remove(new ConnectionDesc(conn))) { + d("remove(): ", conn); + + connectionsAvailable.signalAll(); + + d("remove(): notify"); + td("Remove ", conn); + + if (conns.isEmpty()) { + // Remove softref to make pool entry eligible for GC. + // Once ref has been removed, it cannot be reinstated. + ref = null; + } - return true; - } else { - d("remove(): not found ", conn); - return false; + return true; + } else { + d("remove(): not found ", conn); + } + } finally { + lock.unlock(); } + return false; } /** @@ -291,8 +283,11 @@ */ boolean expire(long threshold) { List clonedConns; - synchronized(this) { + lock.lock(); + try { clonedConns = new ArrayList<>(conns); + } finally { + lock.unlock(); } List expired = new ArrayList<>(); @@ -304,12 +299,15 @@ } } - synchronized (this) { + lock.lock(); + try { conns.removeAll(expired); // Don't need to call notify() because we're // removing only idle connections. If there were // idle connections, then there should be no waiters. return conns.isEmpty(); // whether whole list has 'expired' + } finally { + lock.unlock(); } } @@ -355,6 +353,29 @@ + "; idle=" + idle + "; expired=" + expired; } + boolean grabLock(long timeout) throws InterruptedNamingException { + final long start = System.nanoTime(); + long current = start; + long remaining = timeout; + boolean locked = false; + while (!locked && remaining > 0) { + try { + locked = lock.tryLock(remaining, TimeUnit.MILLISECONDS); + remaining -= TimeUnit.NANOSECONDS.toMillis(current - start); + } catch (InterruptedException ignore) { + throw new InterruptedNamingException( + "Interrupted while waiting for the connection pool lock"); + } + current = System.nanoTime(); + remaining -= TimeUnit.NANOSECONDS.toMillis(current - start); + } + return locked; + } + + void unlock() { + lock.unlock(); + } + private void d(String msg, Object o1) { if (debug) { d(msg + o1); diff -Nru openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/ldap/pool/Pool.java openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/ldap/pool/Pool.java --- openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/ldap/pool/Pool.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/ldap/pool/Pool.java 2022-04-19 19:38:30.000000000 +0000 @@ -31,10 +31,13 @@ import java.util.Collection; import java.util.Collections; import java.util.LinkedList; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.ReentrantLock; import java.io.PrintStream; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; +import javax.naming.CommunicationException; import javax.naming.NamingException; /** @@ -117,45 +120,109 @@ public PooledConnection getPooledConnection(Object id, long timeout, PooledConnectionFactory factory) throws NamingException { + final long start = System.nanoTime(); + long remaining = timeout; + d("get(): ", id); if (debug) { synchronized (map) { d("size: ", map.size()); } + remaining = checkRemaining(start, remaining); } expungeStaleConnections(); + Connections conns = getOrCreateConnections(factory, id); + d("get(): size after: ", map.size()); + remaining = checkRemaining(start, remaining); + + if (!conns.grabLock(remaining)) { + throw new CommunicationException("Timed out waiting for lock"); + } + + try { + remaining = checkRemaining(start, remaining); + PooledConnection conn = null; + while (remaining > 0 && conn == null) { + conn = getOrCreatePooledConnection(factory, conns, start, remaining); + // don't loop if the timeout has expired + remaining = checkRemaining(start, timeout); + } + return conn; + } finally { + conns.unlock(); + } + } + + private Connections getOrCreateConnections(PooledConnectionFactory factory, Object id) + throws NamingException { + Connections conns; synchronized (map) { - conns = getConnections(id); - if (conns == null) { - d("get(): creating new connections list for ", id); - - // No connections for this id so create a new list - conns = new Connections(id, initSize, prefSize, maxSize, - factory); - ConnectionsRef connsRef = new ConnectionsRef(conns); - map.put(id, connsRef); - - // Create a weak reference to ConnectionsRef - Reference weakRef = - new ConnectionsWeakRef(connsRef, queue); - - // Keep the weak reference through the element of a linked list - weakRefs.add(weakRef); + ConnectionsRef ref = map.get(id); + if (ref != null) { + return ref.getConnections(); } - d("get(): size after: ", map.size()); + + d("get(): creating new connections list for ", id); + + // No connections for this id so create a new list + conns = new Connections(id, initSize, prefSize, maxSize, + factory, new ReentrantLock()); + + ConnectionsRef connsRef = new ConnectionsRef(conns); + map.put(id, connsRef); + + // Create a weak reference to ConnectionsRef + Reference weakRef = new ConnectionsWeakRef(connsRef, queue); + + // Keep the weak reference through the element of a linked list + weakRefs.add(weakRef); } + return conns; + } - return conns.get(timeout, factory); // get one connection from list + private PooledConnection getOrCreatePooledConnection( + PooledConnectionFactory factory, Connections conns, long start, long timeout) + throws NamingException { + PooledConnection conn = conns.getAvailableConnection(timeout); + if (conn != null) { + return conn; + } + // no available cached connection + // check if list size already at maxSize before creating a new one + conn = conns.createConnection(factory, timeout); + if (conn != null) { + return conn; + } + // max number of connections already created, + // try waiting around for one to become available + if (timeout <= 0) { + conns.waitForAvailableConnection(); + } else { + long remaining = checkRemaining(start, timeout); + conns.waitForAvailableConnection(remaining); + } + return null; } - private Connections getConnections(Object id) { - ConnectionsRef ref = map.get(id); - return (ref != null) ? ref.getConnections() : null; + // Check whether we timed out + private long checkRemaining(long start, long timeout) throws CommunicationException { + if (timeout > 0) { + long current = System.nanoTime(); + long remaining = timeout - TimeUnit.NANOSECONDS.toMillis(current - start); + if (remaining <= 0) { + throw new CommunicationException( + "Timeout exceeded while waiting for a connection: " + + timeout + "ms"); + } + return remaining; + } + return Long.MAX_VALUE; } + /** * Goes through the connections in this Pool and expires ones that * have been idle before 'threshold'. An expired connection is closed diff -Nru openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/ldap/pool/PooledConnectionFactory.java openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/ldap/pool/PooledConnectionFactory.java --- openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/ldap/pool/PooledConnectionFactory.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/ldap/pool/PooledConnectionFactory.java 2022-04-19 19:38:30.000000000 +0000 @@ -44,4 +44,13 @@ */ public abstract PooledConnection createPooledConnection(PoolCallback pcb) throws NamingException; + + /** + * Creates a pooled connection. + * @param pcb callback responsible for removing and releasing the pooled + * connection from the pool. + * @param timeout the connection timeout + */ + public abstract PooledConnection createPooledConnection(PoolCallback pcb, long timeout) + throws NamingException; }; diff -Nru openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java --- openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,8 @@ import java.util.Hashtable; import java.net.MalformedURLException; +import com.sun.jndi.toolkit.url.Uri.ParseMode; + /** * This abstract class is a generic URL context that accepts as the * name argument either a string URL or a Name whose first component @@ -48,6 +50,7 @@ * @author Rosanna Lee */ abstract public class GenericURLContext implements Context { + protected Hashtable myEnv = null; @SuppressWarnings("unchecked") // Expect Hashtable @@ -161,8 +164,18 @@ if (url.startsWith("//", start)) { start += 2; // skip double slash - // find last slash - int posn = url.indexOf('/', start); + // find where the authority component ends + // and the rest of the URL starts + int slash = url.indexOf('/', start); + int qmark = url.indexOf('?', start); + int fmark = url.indexOf('#', start); + if (fmark > -1 && qmark > fmark) qmark = -1; + if (fmark > -1 && slash > fmark) slash = -1; + if (qmark > -1 && slash > qmark) slash = -1; + int posn = slash > -1 ? slash + : (qmark > -1 ? qmark + : (fmark > -1 ? fmark + : url.length())); if (posn >= 0) { start = posn; } else { diff -Nru openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/toolkit/url/Uri.java openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/toolkit/url/Uri.java --- openjdk-11-11.0.14+9/src/java.naming/share/classes/com/sun/jndi/toolkit/url/Uri.java 2022-01-13 21:56:25.000000000 +0000 +++ openjdk-11-11.0.15+10/src/java.naming/share/classes/com/sun/jndi/toolkit/url/Uri.java 2022-04-19 19:38:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,8 @@ import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; /** @@ -36,15 +38,17 @@ * *

The java.net.URL class cannot be used to parse URIs since it * requires the installation of URL stream handlers that may not be - * available. The hack of getting around this by temporarily - * replacing the scheme part of a URI is not appropriate here: JNDI - * service providers must work on older Java platforms, and we want - * new features and bug fixes that are not available in old versions - * of the URL class. - * - *

It may be appropriate to drop this code in favor of the - * java.net.URI class. The changes would need to be written so as to - * still run on pre-1.4 platforms not containing that class. + * available. + * + *

The {@linkplain ParseMode#STRICT strict} parsing mode uses + * the java.net.URI class to syntactically validate URI strings. + * The {@linkplain ParseMode#COMPAT compat} mode validate the + * URI authority and rejects URI fragments, but doesn't perform any + * additional validation on path and query, other than that + * which may be implemented in the concrete the Uri subclasses. + * The {@linkplain ParseMode#LEGACY legacy} mode should not be + * used unless the application is capable of validating all URI + * strings before any constructors of this class is invoked. * *

The format of an absolute URI (see the RFCs mentioned above) is: *

{@code
@@ -105,6 +109,28 @@
 
 public class Uri {
 
+    // three parsing modes
+    public enum ParseMode {
+        /**
+         * Strict validation mode.
+         * Validate the URI syntactically using {@link java.net.URI}.
+         * Rejects URI fragments unless explicitly supported by the
+         * subclass.
+         */
+        STRICT,
+        /**
+         * Compatibility mode. The URI authority is syntactically validated.
+         * Rejects URI fragments unless explicitly supported by the
+         * subclass.
+         * This is the default.
+         */
+        COMPAT,
+        /**
+         * Legacy mode. In this mode, no validation is performed.
+         */
+        LEGACY
+     }
+
     protected String uri;
     protected String scheme;
     protected String host = null;
@@ -112,6 +138,7 @@
     protected boolean hasAuthority;
     protected String path;
     protected String query = null;
+    protected String fragment;
 
 
     /**
@@ -129,13 +156,22 @@
     }
 
     /**
+     * The parse mode for parsing this URI.
+     * The default is {@link ParseMode#COMPAT}.
+     * @return the parse mode for parsing this URI.
+     */
+    protected ParseMode parseMode() {
+        return ParseMode.COMPAT;
+    }
+
+    /**
      * Initializes a Uri object given a URI string.
      * This method must be called exactly once, and before any other Uri
      * methods.
      */
     protected void init(String uri) throws MalformedURLException {
         this.uri = uri;
-        parse(uri);
+        parse(uri, parseMode());
     }
 
     /**
@@ -188,10 +224,235 @@
         return uri;
     }
 
+    private void parse(String uri, ParseMode mode) throws MalformedURLException {
+        switch (mode) {
+            case STRICT:
+                parseStrict(uri);
+                break;
+            case COMPAT:
+                parseCompat(uri);
+                break;
+            case LEGACY:
+                parseLegacy(uri);
+                break;
+        }
+    }
+
+    /*
+     * Parses a URI string and sets this object's fields accordingly.
+     * Use java.net.URI to validate the uri string syntax
+     */
+    private void parseStrict(String uri) throws MalformedURLException {
+        try {
+            if (!isSchemeOnly(uri)) {
+                URI u = new URI(uri);
+                scheme = u.getScheme();
+                if (scheme == null) throw new MalformedURLException("Invalid URI: " + uri);
+                var auth = u.getRawAuthority();
+                hasAuthority = auth != null;
+                if (hasAuthority) {
+                    var host = u.getHost();
+                    var port = u.getPort();
+                    if (host != null) this.host = host;
+                    if (port != -1) this.port = port;
+                    String hostport = (host == null ? "" : host)
+                            + (port == -1 ? "" : (":" + port));
+                    if (!hostport.equals(auth)) {
+                        // throw if we have user info or regname
+                        throw new MalformedURLException("unsupported authority: " + auth);
+                    }
+                }
+                path = u.getRawPath();
+                if (u.getRawQuery() != null) {
+                    query = "?" + u.getRawQuery();
+                }
+                if (u.getRawFragment() != null) {
+                    if (!acceptsFragment()) {
+                        throw new MalformedURLException("URI fragments not supported: " + uri);
+                    }
+                    fragment = "#" + u.getRawFragment();
+                }
+            } else {
+                // scheme-only URIs are not supported by java.net.URI
+                // validate the URI by appending "/" to the uri string.
+                var s = uri.substring(0, uri.indexOf(':'));
+                URI u = new URI(uri + "/");
+                if (!s.equals(u.getScheme())
+                        || !checkSchemeOnly(uri, u.getScheme())) {
+                    throw newInvalidURISchemeException(uri);
+                }
+                scheme = s;
+                path = "";
+            }
+        } catch (URISyntaxException e) {
+            var mue =  new MalformedURLException(e.getMessage());
+            mue.initCause(e);
+            throw mue;
+        }
+    }
+
+
+    /*
+     * Parses a URI string and sets this object's fields accordingly.
+     * Compatibility mode. Use java.net.URI to validate the syntax of
+     * the uri string authority.
+     */
+    private void parseCompat(String uri) throws MalformedURLException {
+        int i;  // index into URI
+
+        i = uri.indexOf(':');                           // parse scheme
+        int slash = uri.indexOf('/');
+        int qmark = uri.indexOf('?');
+        int fmark = uri.indexOf('#');
+        if (i < 0 || slash > 0 && i > slash || qmark > 0 && i > qmark || fmark > 0 && i > fmark) {
+            throw new MalformedURLException("Invalid URI: " + uri);
+        }
+        if (fmark > -1) {
+            if (!acceptsFragment()) {
+                throw new MalformedURLException("URI fragments not supported: " + uri);
+            }
+        }
+        if (i == uri.length() - 1) {
+            if (!isSchemeOnly(uri)) {
+                throw newInvalidURISchemeException(uri);
+            }
+        }
+        scheme = uri.substring(0, i);
+        i++;                                            // skip past ":"
+
+        hasAuthority = uri.startsWith("//", i);
+        if (fmark > -1 && qmark > fmark) qmark = -1;
+        int endp = qmark > -1 ? qmark : fmark > -1 ? fmark : uri.length();
+        if (hasAuthority) {                             // parse "//host:port"
+            i += 2;                                     // skip past "//"
+            int starta = i;
+            // authority ends at the first appearance of /, ?, or #
+            int enda = uri.indexOf('/', i);
+            if (enda == -1 || qmark > -1 && qmark < enda) enda = qmark;
+            if (enda == -1 || fmark > -1 && fmark < enda) enda = fmark;
+            if (enda < 0) {
+                enda = uri.length();
+            }
+            if (uri.startsWith(":", i)) {
+                // LdapURL supports empty host.
+                i++;
+                host = "";
+                if (enda > i) {
+                    port = Integer.parseInt(uri.substring(i, enda));
+                }
+            } else {
+                // Use URI to parse authority
+                try {
+                    // URI requires at least one char after authority:
+                    // we use "/" and expect that the resulting URI path
+                    // will be exactly "/".
+                    URI u = new URI(uri.substring(0, enda) + "/");
+                    String auth = uri.substring(starta, enda);
+                    host = u.getHost();
+                    port = u.getPort();
+                    String p = u.getRawPath();
+                    String q = u.getRawQuery();
+                    String f = u.getRawFragment();
+                    String ui = u.getRawUserInfo();
+                    if (ui != null) {
+                        throw new MalformedURLException("user info not supported in authority: " + ui);
+                    }
+                    if (!"/".equals(p)) {
+                        throw new MalformedURLException("invalid authority: " + auth);
+                    }
+                    if (q != null) {
+                        throw new MalformedURLException("invalid trailing characters in authority: ?" + q);
+                    }
+                    if (f != null) {
+                        throw new MalformedURLException("invalid trailing characters in authority: #" + f);
+                    }
+                    String hostport = (host == null ? "" : host)
+                            + (port == -1?"":(":" + port));
+                    if (!auth.equals(hostport)) {
+                        // throw if we have user info or regname
+                        throw new MalformedURLException("unsupported authority: " + auth);
+                    }
+                } catch (URISyntaxException e) {
+                    var mue = new MalformedURLException(e.getMessage());
+                    mue.initCause(e);
+                    throw mue;
+                }
+            }
+            i = enda;
+        }
+        path = uri.substring(i, endp);
+        // look for query
+        if (qmark > -1) {
+            if (fmark > -1) {
+                query = uri.substring(qmark, fmark);
+            } else {
+                query = uri.substring(qmark);
+            }
+        }
+        if (fmark > -1) {
+            fragment = uri.substring(fmark);
+        }
+    }
+
+    /**
+     * A subclass of {@code Uri} that supports scheme only
+     * URIs can override this method and return true in the
+     * case where the URI string is a scheme-only URI that
+     * the subclass supports.
+     * @implSpec
+     * The default implementation of this method returns false,
+     * always.
+     * @param uri An URI string
+     * @return if this is a scheme-only URI supported by the subclass
+     */
+    protected boolean isSchemeOnly(String uri) {
+        return false;
+    }
+
+    /**
+     * Checks whether the given uri string should be considered
+     * as a scheme-only URI. For some protocols - e.g. DNS, we
+     * might accept "dns://" as a valid URL denoting default DNS.
+     * For others - we might only accept "scheme:".
+     * @implSpec
+     * The default implementation of this method returns true if
+     * the URI is of the form {@code ":"} with nothing
+     * after the scheme delimiter.
+     * @param uri the URI
+     * @param scheme the scheme
+     * @return true if the URI should be considered as a scheme-only
+     *         URI supported by this URI scheme.
+     */
+    protected boolean checkSchemeOnly(String uri, String scheme) {
+        return uri.equals(scheme + ":");
+    }
+
+    /**
+     * Creates a {@code MalformedURLException} to be thrown when the
+     * URI scheme is not supported.
+     *
+     * @param uri the URI string
+     * @return a {@link MalformedURLException}
+     */
+    protected MalformedURLException newInvalidURISchemeException(String uri) {
+        return new MalformedURLException("Invalid URI scheme: " + uri);
+    }
+
+    /**
+     * Whether fragments are supported.
+     * @implSpec
+     * The default implementation of this method retturns false, always.
+     * @return true if fragments are supported.
+     */
+    protected boolean acceptsFragment() {
+        return parseMode() == ParseMode.LEGACY;
+    }
+
     /*
      * Parses a URI string and sets this object's fields accordingly.
+     * Legacy parsing mode.
      */
-    private void parse(String uri) throws MalformedURLException {
+    private void parseLegacy(String uri) throws MalformedURLException {
         int i;  // index into URI
 
         i = uri.indexOf(':');                           // parse scheme
diff -Nru openjdk-11-11.0.14+9/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java openjdk-11-11.0.15+10/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java
--- openjdk-11-11.0.14+9/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java	2022-04-19 19:38:30.000000000 +0000
@@ -614,10 +614,6 @@
         if (contentLength > 0) {
             h.setHeader("content-length", Long.toString(contentLength));
         }
-        URI uri = request.uri();
-        if (uri != null) {
-            h.setHeader("host", Utils.hostString(request));
-        }
         HttpHeaders sysh = filterHeaders(h.build());
         HttpHeaders userh = filterHeaders(request.getUserHeaders());
         // Filter context restricted from userHeaders
diff -Nru openjdk-11-11.0.14+9/src/java.security.jgss/share/native/libj2gss/gssapi.h openjdk-11-11.0.15+10/src/java.security.jgss/share/native/libj2gss/gssapi.h
--- openjdk-11-11.0.14+9/src/java.security.jgss/share/native/libj2gss/gssapi.h	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.security.jgss/share/native/libj2gss/gssapi.h	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,9 @@
 extern "C" {
 #endif /* __cplusplus */
 
-#if TARGET_OS_MAC
+// Condition was copied from
+// Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/gssapi/gssapi.h
+#if TARGET_OS_MAC && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
 #    pragma pack(push,2)
 #endif
 
@@ -695,7 +697,7 @@
         gss_name_t *            /* output_name */
 );
 
-#if TARGET_OS_MAC
+#if TARGET_OS_MAC && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
 #    pragma pack(pop)
 #endif
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/lr_parser.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/lr_parser.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/lr_parser.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/lr_parser.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
 
 package com.sun.java_cup.internal.runtime;
 
+import com.sun.org.apache.xalan.internal.xsltc.compiler.sym;
+import java.util.Arrays;
 import java.util.Stack;
 
 /** This class implements a skeleton table driven LR parser.  In general,
@@ -134,9 +136,19 @@
  * @see     com.sun.java_cup.internal.runtime.Symbol
  * @see     com.sun.java_cup.internal.runtime.virtual_parse_stack
  * @author  Frank Flannery
+ *
+ * @LastModified: Jan 2022
  */
 
 public abstract class lr_parser {
+    public static final int ID_GROUP = 1;
+    public static final int ID_OPERATOR = 2;
+    public static final int ID_TOTAL_OPERATOR = 3;
+
+    private boolean isLiteral = false;
+    private int grpCount = 0;
+    private int opCount = 0;
+    private int totalOpCount = 0;
 
   /*-----------------------------------------------------------*/
   /*--- Constructor(s) ----------------------------------------*/
@@ -355,8 +367,29 @@
    *  the "scan with" clause.  Do not recycle objects; every call to
    *  scan() should return a fresh object.
    */
-  public Symbol scan() throws java.lang.Exception {
-    return getScanner().next_token();
+  public Symbol scan() throws Exception {
+      Symbol s = getScanner().next_token();
+
+      if (s.sym == sym.LPAREN) {
+          if (!isLiteral) {
+            grpCount++;
+          }
+          opCount++; // function
+          isLiteral = false;
+      } else if (contains(sym.OPERATORS, s.sym)) {
+          opCount++;
+          isLiteral = false;
+      }
+
+      if (s.sym == sym.Literal || s.sym == sym.QNAME) {
+          isLiteral = true;
+      }
+
+    return s;
+  }
+
+  private boolean contains(final int[] arr, final int key) {
+    return Arrays.stream(arr).anyMatch(i -> i == key);
   }
 
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
@@ -552,6 +585,9 @@
 
       /* do user initialization */
       user_init();
+      isLiteral = false;
+      grpCount = 0;
+      opCount = 0;
 
       /* get the first token */
       cur_token = scan();
@@ -630,9 +666,29 @@
                 }
             }
         }
+
+      totalOpCount += opCount;
       return lhs_sym;
     }
 
+    /**
+     * Returns the count of operators in XPath expressions.
+     *
+     * @param id the ID of the count
+     * @return the count associated with the ID
+     */
+    public int getCount(int id) {
+        switch (id) {
+            case ID_GROUP:
+                return grpCount;
+            case ID_OPERATOR:
+                return opCount;
+            case ID_TOTAL_OPERATOR:
+                return totalOpCount;
+        }
+        return 0;
+    }
+
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
 
   /** Write a debugging message to System.err for the debugging version
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Const.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Const.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Const.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Const.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -26,14 +26,14 @@
  * Constants for the project, mostly defined in the JVM specification.
  *
  * @since 6.0 (intended to replace the Constants interface)
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public final class Const {
 
   /**
    * Java class file format Magic number (0xCAFEBABE)
    *
-   * @see 
+   * @see 
    * The ClassFile Structure in The Java Virtual Machine Specification
    */
   public static final int JVM_CLASSFILE_MAGIC = 0xCAFEBABE;
@@ -211,13 +211,14 @@
   public static final int MAX_BYTE  = 255; // 2^8 - 1
 
   /** One of the access flags for fields, methods, or classes.
-   *  @see 
+   *
+   *  @see 
    *  Flag definitions for Classes in the Java Virtual Machine Specification (Java SE 9 Edition).
-   *  @see 
+   *  @see 
    *  Flag definitions for Fields in the Java Virtual Machine Specification (Java SE 9 Edition).
-   *  @see 
+   *  @see 
    *  Flag definitions for Methods in the Java Virtual Machine Specification (Java SE 9 Edition).
-   *  @see 
+   *  @see 
    *  Flag definitions for Inner Classes in the Java Virtual Machine Specification (Java SE 9 Edition).
    */
   public static final short ACC_PUBLIC       = 0x0001;
@@ -381,87 +382,87 @@
 
   /**
    * Marks a constant pool entry as type UTF-8.
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_Utf8               = 1;
 
   /**
    * Marks a constant pool entry as type Integer.
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_Integer            = 3;
 
   /**
    * Marks a constant pool entry as type Float.
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_Float              = 4;
 
   /**
    * Marks a constant pool entry as type Long.
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_Long               = 5;
 
   /**
    * Marks a constant pool entry as type Double.
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_Double             = 6;
 
   /**
    * Marks a constant pool entry as a Class
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_Class              = 7;
 
   /**
    * Marks a constant pool entry as a Field Reference.
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_Fieldref           = 9;
 
   /**
    * Marks a constant pool entry as type String
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_String             = 8;
 
   /** Marks a constant pool entry as a Method Reference.
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification */
   public static final byte CONSTANT_Methodref          = 10;
 
   /**
    * Marks a constant pool entry as an Interface Method Reference.
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_InterfaceMethodref = 11;
 
   /** Marks a constant pool entry as a name and type.
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification */
   public static final byte CONSTANT_NameAndType        = 12;
 
   /**
    * Marks a constant pool entry as a Method Handle.
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_MethodHandle       = 15;
 
   /**
    * Marks a constant pool entry as a Method Type.
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_MethodType         = 16;
@@ -476,7 +477,7 @@
 
   /**
    * Marks a constant pool entry as an Invoke Dynamic
-   * @see  
+   * @see  
    * The Constant Pool in The Java Virtual Machine Specification
    */
   public static final byte CONSTANT_InvokeDynamic      = 18;
@@ -546,7 +547,7 @@
   /**
    * Maximum Constant Pool entries.
    * One of the limitations of the Java Virtual Machine.
-   * @see 
+   * @see 
    * The Java Virtual Machine Specification, Java SE 8 Edition, page 330, chapter 4.11.
    */
   public static final int MAX_CP_ENTRIES     = 65535;
@@ -564,8 +565,8 @@
    * The entry in the Limitations section has been removed from later versions of the spec;
    * it is not present in the Java SE 8 edition.
    *
-   * @see 
-   * The Java Virtual Machine Specification, Java SE 8 Edition, page 104, chapter 4.7.3
+   * @see 
+   * The Java Virtual Machine Specification, Java SE 8 Edition, page 104, chapter 4.7.
    */
   public static final int MAX_CODE_SIZE      = 65536; //bytes
 
@@ -573,1228 +574,1228 @@
    * The maximum number of dimensions in an array ({@value}).
    * One of the limitations of the Java Virtual Machine.
    *
-   * @see 
+   * @see 
    * Field Descriptors in The Java Virtual Machine Specification
    */
   public static final int MAX_ARRAY_DIMENSIONS = 255;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short NOP              = 0;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ACONST_NULL      = 1;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ICONST_M1        = 2;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ICONST_0         = 3;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ICONST_1         = 4;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ICONST_2         = 5;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ICONST_3         = 6;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ICONST_4         = 7;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ICONST_5         = 8;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LCONST_0         = 9;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LCONST_1         = 10;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FCONST_0         = 11;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FCONST_1         = 12;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FCONST_2         = 13;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DCONST_0         = 14;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DCONST_1         = 15;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short BIPUSH           = 16;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short SIPUSH           = 17;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LDC              = 18;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LDC_W            = 19;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LDC2_W           = 20;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ILOAD            = 21;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LLOAD            = 22;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FLOAD            = 23;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DLOAD            = 24;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ALOAD            = 25;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ILOAD_0          = 26;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ILOAD_1          = 27;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ILOAD_2          = 28;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ILOAD_3          = 29;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LLOAD_0          = 30;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LLOAD_1          = 31;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LLOAD_2          = 32;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LLOAD_3          = 33;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FLOAD_0          = 34;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FLOAD_1          = 35;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FLOAD_2          = 36;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FLOAD_3          = 37;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DLOAD_0          = 38;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DLOAD_1          = 39;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DLOAD_2          = 40;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DLOAD_3          = 41;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ALOAD_0          = 42;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ALOAD_1          = 43;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ALOAD_2          = 44;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ALOAD_3          = 45;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IALOAD           = 46;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LALOAD           = 47;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FALOAD           = 48;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DALOAD           = 49;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short AALOAD           = 50;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short BALOAD           = 51;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short CALOAD           = 52;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short SALOAD           = 53;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ISTORE           = 54;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LSTORE           = 55;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FSTORE           = 56;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DSTORE           = 57;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ASTORE           = 58;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ISTORE_0         = 59;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ISTORE_1         = 60;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ISTORE_2         = 61;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ISTORE_3         = 62;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LSTORE_0         = 63;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LSTORE_1         = 64;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LSTORE_2         = 65;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LSTORE_3         = 66;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FSTORE_0         = 67;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FSTORE_1         = 68;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FSTORE_2         = 69;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FSTORE_3         = 70;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DSTORE_0         = 71;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DSTORE_1         = 72;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DSTORE_2         = 73;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DSTORE_3         = 74;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ASTORE_0         = 75;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ASTORE_1         = 76;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ASTORE_2         = 77;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ASTORE_3         = 78;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IASTORE          = 79;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LASTORE          = 80;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FASTORE          = 81;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DASTORE          = 82;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short AASTORE          = 83;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short BASTORE          = 84;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short CASTORE          = 85;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short SASTORE          = 86;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short POP              = 87;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short POP2             = 88;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DUP              = 89;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DUP_X1           = 90;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DUP_X2           = 91;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DUP2             = 92;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DUP2_X1          = 93;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DUP2_X2          = 94;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short SWAP             = 95;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IADD             = 96;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LADD             = 97;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FADD             = 98;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DADD             = 99;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ISUB             = 100;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LSUB             = 101;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FSUB             = 102;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DSUB             = 103;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IMUL             = 104;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LMUL             = 105;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FMUL             = 106;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DMUL             = 107;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IDIV             = 108;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LDIV             = 109;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FDIV             = 110;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DDIV             = 111;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IREM             = 112;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LREM             = 113;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FREM             = 114;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DREM             = 115;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short INEG             = 116;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LNEG             = 117;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FNEG             = 118;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DNEG             = 119;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ISHL             = 120;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LSHL             = 121;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ISHR             = 122;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LSHR             = 123;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IUSHR            = 124;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LUSHR            = 125;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IAND             = 126;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LAND             = 127;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IOR              = 128;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LOR              = 129;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IXOR             = 130;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LXOR             = 131;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IINC             = 132;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short I2L              = 133;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short I2F              = 134;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short I2D              = 135;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short L2I              = 136;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short L2F              = 137;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short L2D              = 138;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short F2I              = 139;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short F2L              = 140;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short F2D              = 141;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short D2I              = 142;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short D2L              = 143;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short D2F              = 144;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short I2B              = 145;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short INT2BYTE         = 145; // Old notation
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short I2C              = 146;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short INT2CHAR         = 146; // Old notation
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short I2S              = 147;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short INT2SHORT        = 147; // Old notation
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LCMP             = 148;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FCMPL            = 149;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FCMPG            = 150;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DCMPL            = 151;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DCMPG            = 152;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IFEQ             = 153;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IFNE             = 154;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IFLT             = 155;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IFGE             = 156;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IFGT             = 157;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IFLE             = 158;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IF_ICMPEQ        = 159;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IF_ICMPNE        = 160;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IF_ICMPLT        = 161;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IF_ICMPGE        = 162;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IF_ICMPGT        = 163;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IF_ICMPLE        = 164;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IF_ACMPEQ        = 165;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IF_ACMPNE        = 166;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short GOTO             = 167;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short JSR              = 168;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short RET              = 169;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short TABLESWITCH      = 170;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LOOKUPSWITCH     = 171;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IRETURN          = 172;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short LRETURN          = 173;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short FRETURN          = 174;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short DRETURN          = 175;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ARETURN          = 176;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short RETURN           = 177;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short GETSTATIC        = 178;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short PUTSTATIC        = 179;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short GETFIELD         = 180;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short PUTFIELD         = 181;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short INVOKEVIRTUAL    = 182;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short INVOKESPECIAL    = 183;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short INVOKENONVIRTUAL = 183; // Old name in JDK 1.0
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short INVOKESTATIC     = 184;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short INVOKEINTERFACE  = 185;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short INVOKEDYNAMIC    = 186;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short NEW              = 187;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short NEWARRAY         = 188;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ANEWARRAY        = 189;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ARRAYLENGTH      = 190;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short ATHROW           = 191;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short CHECKCAST        = 192;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short INSTANCEOF       = 193;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short MONITORENTER     = 194;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short MONITOREXIT      = 195;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short WIDE             = 196;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short MULTIANEWARRAY   = 197;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IFNULL           = 198;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short IFNONNULL        = 199;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short GOTO_W           = 200;
 
   /** Java VM opcode.
-   * @see 
+   * @see 
    * Opcode definitions in The Java Virtual Machine Specification */
   public static final short JSR_W            = 201;
 
   /** JVM internal opcode.
-   * @see 
+   * @see 
    * Reserved opcodes in the Java Virtual Machine Specification */
   public static final short BREAKPOINT                = 202;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short LDC_QUICK                 = 203;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short LDC_W_QUICK               = 204;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short LDC2_W_QUICK              = 205;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short GETFIELD_QUICK            = 206;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short PUTFIELD_QUICK            = 207;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short GETFIELD2_QUICK           = 208;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short PUTFIELD2_QUICK           = 209;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short GETSTATIC_QUICK           = 210;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short PUTSTATIC_QUICK           = 211;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short GETSTATIC2_QUICK          = 212;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short PUTSTATIC2_QUICK          = 213;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short INVOKEVIRTUAL_QUICK       = 214;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short INVOKENONVIRTUAL_QUICK    = 215;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short INVOKESUPER_QUICK         = 216;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short INVOKESTATIC_QUICK        = 217;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short INVOKEINTERFACE_QUICK     = 218;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short INVOKEVIRTUALOBJECT_QUICK = 219;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short NEW_QUICK                 = 221;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short ANEWARRAY_QUICK           = 222;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short MULTIANEWARRAY_QUICK      = 223;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short CHECKCAST_QUICK           = 224;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short INSTANCEOF_QUICK          = 225;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short INVOKEVIRTUAL_QUICK_W     = 226;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short GETFIELD_QUICK_W          = 227;
 
   /** JVM internal opcode.
    * @see 
    * Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)
-   * @see 
+   * @see 
    * Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification. */
   public static final short PUTFIELD_QUICK_W          = 228;
 
   /** JVM internal opcode.
-   * @see 
+   * @see 
    * Reserved opcodes in the Java Virtual Machine Specification */
   public static final short IMPDEP1                   = 254;
 
   /** JVM internal opcode.
-   * @see 
+   * @see 
    * Reserved opcodes in the Java Virtual Machine Specification */
   public static final short IMPDEP2                   = 255;
 
@@ -1826,42 +1827,42 @@
   public static final String ILLEGAL_TYPE   = "";
 
   /** Boolean data type.
-   * @see 
+   * @see 
    * Static Constraints in the Java Virtual Machine Specification */
   public static final byte T_BOOLEAN = 4;
 
   /** Char data type.
-   * @see 
+   * @see 
    * Static Constraints in the Java Virtual Machine Specification */
   public static final byte T_CHAR    = 5;
 
   /** Float data type.
-   * @see 
+   * @see 
    * Static Constraints in the Java Virtual Machine Specification */
   public static final byte T_FLOAT   = 6;
 
   /** Double data type.
-   * @see 
+   * @see 
    * Static Constraints in the Java Virtual Machine Specification */
   public static final byte T_DOUBLE  = 7;
 
   /** Byte data type.
-   * @see 
+   * @see 
    * Static Constraints in the Java Virtual Machine Specification */
   public static final byte T_BYTE    = 8;
 
   /** Short data type.
-   * @see 
+   * @see 
    * Static Constraints in the Java Virtual Machine Specification */
   public static final byte T_SHORT   = 9;
 
   /** Int data type.
-   * @see 
+   * @see 
    * Static Constraints in the Java Virtual Machine Specification */
   public static final byte T_INT     = 10;
 
   /** Long data type.
-   * @see 
+   * @see 
    * Static Constraints in the Java Virtual Machine Specification */
   public static final byte T_LONG    = 11;
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -23,20 +23,27 @@
 /**
  * Exception constants.
  * @since 6.0 (intended to replace the InstructionConstant interface)
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public final class ExceptionConst {
 
-    /** The mother of all exceptions
+    /**
+     * The mother of all exceptions
      */
     public static final Class THROWABLE = Throwable.class;
-    /** Super class of any run-time exception
+
+    /**
+     * Super class of any run-time exception
      */
     public static final Class RUNTIME_EXCEPTION = RuntimeException.class;
-    /** Super class of any linking exception (aka Linkage Error)
+
+    /**
+     * Super class of any linking exception (aka Linkage Error)
      */
     public static final Class LINKING_EXCEPTION = LinkageError.class;
-    /** Linking Exceptions
+
+    /**
+     * Linking Exceptions
      */
     public static final Class CLASS_CIRCULARITY_ERROR = ClassCircularityError.class;
     public static final Class CLASS_FORMAT_ERROR = ClassFormatError.class;
@@ -52,7 +59,9 @@
     public static final Class VERIFY_ERROR = VerifyError.class;
     /* UnsupportedClassVersionError is new in JDK 1.2 */
 //    public static final Class UnsupportedClassVersionError = UnsupportedClassVersionError.class;
-    /** Run-Time Exceptions
+
+    /**
+     * Run-Time Exceptions
      */
     public static final Class NULL_POINTER_EXCEPTION = NullPointerException.class;
     public static final Class ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationDefault.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationDefault.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationDefault.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationDefault.java	2022-04-19 19:38:30.000000000 +0000
@@ -34,7 +34,7 @@
  */
 public class AnnotationDefault extends Attribute {
 
-    private ElementValue default_value;
+    private ElementValue defaultValue;
 
     /**
      * @param name_index    Index pointing to the name Code
@@ -44,7 +44,7 @@
      */
     AnnotationDefault(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool) throws IOException {
         this(name_index, length, (ElementValue) null, constant_pool);
-        default_value = ElementValue.readElementValue(input, constant_pool);
+        defaultValue = ElementValue.readElementValue(input, constant_pool);
     }
 
     /**
@@ -55,7 +55,7 @@
      */
     public AnnotationDefault(final int name_index, final int length, final ElementValue defaultValue, final ConstantPool constant_pool) {
         super(Const.ATTR_ANNOTATION_DEFAULT, name_index, length, constant_pool);
-        this.default_value = defaultValue;
+        this.defaultValue = defaultValue;
     }
 
     /**
@@ -74,14 +74,14 @@
      * @param defaultValue the default value of this methodinfo's annotation
      */
     public final void setDefaultValue(final ElementValue defaultValue) {
-        default_value = defaultValue;
+        this.defaultValue = defaultValue;
     }
 
     /**
      * @return the default value
      */
     public final ElementValue getDefaultValue() {
-        return default_value;
+        return defaultValue;
     }
 
     @Override
@@ -92,6 +92,6 @@
     @Override
     public final void dump(final DataOutputStream dos) throws IOException {
         super.dump(dos);
-        default_value.dump(dos);
+        defaultValue.dump(dos);
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationElementValue.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationElementValue.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationElementValue.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationElementValue.java	2022-04-19 19:38:30.000000000 +0000
@@ -37,7 +37,7 @@
         {
                 super(type, cpool);
                 if (type != ANNOTATION) {
-                    throw new RuntimeException(
+                    throw new IllegalArgumentException(
                                     "Only element values of type annotation can be built with this ctor - type specified: " + type);
                 }
                 this.annotationEntry = annotationEntry;
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationEntry.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationEntry.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationEntry.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationEntry.java	2022-04-19 19:38:30.000000000 +0000
@@ -37,17 +37,17 @@
  */
 public class AnnotationEntry implements Node {
 
-    private final int type_index;
-    private final ConstantPool constant_pool;
+    private final int typeIndex;
+    private final ConstantPool constantPool;
     private final boolean isRuntimeVisible;
 
-    private List element_value_pairs;
+    private List elementValuePairs;
 
     /*
      * Factory method to create an AnnotionEntry from a DataInput
      *
      * @param input
-     * @param constant_pool
+     * @param constantPool
      * @param isRuntimeVisible
      * @return the entry
      * @throws IOException
@@ -56,9 +56,9 @@
 
         final AnnotationEntry annotationEntry = new AnnotationEntry(input.readUnsignedShort(), constant_pool, isRuntimeVisible);
         final int num_element_value_pairs = input.readUnsignedShort();
-        annotationEntry.element_value_pairs = new ArrayList<>();
+        annotationEntry.elementValuePairs = new ArrayList<>();
         for (int i = 0; i < num_element_value_pairs; i++) {
-            annotationEntry.element_value_pairs.add(
+            annotationEntry.elementValuePairs.add(
                     new ElementValuePair(input.readUnsignedShort(), ElementValue.readElementValue(input, constant_pool),
                     constant_pool));
         }
@@ -66,17 +66,17 @@
     }
 
     public AnnotationEntry(final int type_index, final ConstantPool constant_pool, final boolean isRuntimeVisible) {
-        this.type_index = type_index;
-        this.constant_pool = constant_pool;
+        this.typeIndex = type_index;
+        this.constantPool = constant_pool;
         this.isRuntimeVisible = isRuntimeVisible;
     }
 
     public int getTypeIndex() {
-        return type_index;
+        return typeIndex;
     }
 
     public ConstantPool getConstantPool() {
-        return constant_pool;
+        return constantPool;
     }
 
     public boolean isRuntimeVisible() {
@@ -98,7 +98,7 @@
      * @return the annotation type name
      */
     public String getAnnotationType() {
-        final ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(type_index, Const.CONSTANT_Utf8);
+        final ConstantUtf8 c = (ConstantUtf8) constantPool.getConstant(typeIndex, Const.CONSTANT_Utf8);
         return c.getBytes();
     }
 
@@ -106,14 +106,14 @@
      * @return the annotation type index
      */
     public int getAnnotationTypeIndex() {
-        return type_index;
+        return typeIndex;
     }
 
     /**
      * @return the number of element value pairs in this annotation entry
      */
     public final int getNumElementValuePairs() {
-        return element_value_pairs.size();
+        return elementValuePairs.size();
     }
 
     /**
@@ -121,20 +121,20 @@
      */
     public ElementValuePair[] getElementValuePairs() {
         // TODO return List
-        return element_value_pairs.toArray(new ElementValuePair[element_value_pairs.size()]);
+        return elementValuePairs.toArray(new ElementValuePair[elementValuePairs.size()]);
     }
 
     public void dump(final DataOutputStream dos) throws IOException {
-        dos.writeShort(type_index); // u2 index of type name in cpool
-        dos.writeShort(element_value_pairs.size()); // u2 element_value pair
+        dos.writeShort(typeIndex); // u2 index of type name in cpool
+        dos.writeShort(elementValuePairs.size()); // u2 element_value pair
         // count
-        for (final ElementValuePair envp : element_value_pairs) {
+        for (final ElementValuePair envp : elementValuePairs) {
             envp.dump(dos);
         }
     }
 
     public void addElementNameValuePair(final ElementValuePair elementNameValuePair) {
-        element_value_pairs.add(elementNameValuePair);
+        elementValuePairs.add(elementNameValuePair);
     }
 
     public String toShortString() {
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Annotations.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Annotations.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Annotations.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Annotations.java	2022-04-19 19:38:30.000000000 +0000
@@ -32,7 +32,7 @@
  */
 public abstract class Annotations extends Attribute {
 
-    private AnnotationEntry[] annotation_table;
+    private AnnotationEntry[] annotationTable;
     private final boolean isRuntimeVisible;
 
     /**
@@ -46,23 +46,23 @@
             final ConstantPool constant_pool, final boolean isRuntimeVisible) throws IOException {
         this(annotation_type, name_index, length, (AnnotationEntry[]) null, constant_pool, isRuntimeVisible);
         final int annotation_table_length = input.readUnsignedShort();
-        annotation_table = new AnnotationEntry[annotation_table_length];
+        annotationTable = new AnnotationEntry[annotation_table_length];
         for (int i = 0; i < annotation_table_length; i++) {
-            annotation_table[i] = AnnotationEntry.read(input, constant_pool, isRuntimeVisible);
+            annotationTable[i] = AnnotationEntry.read(input, constant_pool, isRuntimeVisible);
         }
     }
 
     /**
-     * @param annotation_type the subclass type of the annotation
-     * @param name_index Index pointing to the name Code
+     * @param annotationType the subclass type of the annotation
+     * @param nameIndex Index pointing to the name Code
      * @param length Content length in bytes
-     * @param annotation_table the actual annotations
-     * @param constant_pool Array of constants
+     * @param annotationTable the actual annotations
+     * @param constantPool Array of constants
      */
-    public Annotations(final byte annotation_type, final int name_index, final int length, final AnnotationEntry[] annotation_table,
-            final ConstantPool constant_pool, final boolean isRuntimeVisible) {
-        super(annotation_type, name_index, length, constant_pool);
-        this.annotation_table = annotation_table;
+    public Annotations(final byte annotationType, final int nameIndex, final int length, final AnnotationEntry[] annotationTable,
+            final ConstantPool constantPool, final boolean isRuntimeVisible) {
+        super(annotationType, nameIndex, length, constantPool);
+        this.annotationTable = annotationTable;
         this.isRuntimeVisible = isRuntimeVisible;
     }
 
@@ -78,27 +78,27 @@
     }
 
     /**
-     * @param annotation_table the entries to set in this annotation
+     * @param annotationTable the entries to set in this annotation
      */
-    public final void setAnnotationTable(final AnnotationEntry[] annotation_table) {
-        this.annotation_table = annotation_table;
+    public final void setAnnotationTable(final AnnotationEntry[] annotationTable) {
+        this.annotationTable = annotationTable;
     }
 
     /**
      * returns the array of annotation entries in this annotation
      */
     public AnnotationEntry[] getAnnotationEntries() {
-        return annotation_table;
+        return annotationTable;
     }
 
     /**
      * @return the number of annotation entries in this annotation
      */
     public final int getNumAnnotations() {
-        if (annotation_table == null) {
+        if (annotationTable == null) {
             return 0;
         }
-        return annotation_table.length;
+        return annotationTable.length;
     }
 
     public boolean isRuntimeVisible() {
@@ -106,11 +106,11 @@
     }
 
     protected void writeAnnotations(final DataOutputStream dos) throws IOException {
-        if (annotation_table == null) {
+        if (annotationTable == null) {
             return;
         }
-        dos.writeShort(annotation_table.length);
-        for (final AnnotationEntry element : annotation_table) {
+        dos.writeShort(annotationTable.length);
+        for (final AnnotationEntry element : annotationTable) {
             element.dump(dos);
         }
     }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ArrayElementValue.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ArrayElementValue.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ArrayElementValue.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ArrayElementValue.java	2022-04-19 19:38:30.000000000 +0000
@@ -30,17 +30,17 @@
 public class ArrayElementValue extends ElementValue
 {
     // For array types, this is the array
-    private final ElementValue[] evalues;
+    private final ElementValue[] elementValues;
 
     @Override
     public String toString()
     {
         final StringBuilder sb = new StringBuilder();
         sb.append("{");
-        for (int i = 0; i < evalues.length; i++)
+        for (int i = 0; i < elementValues.length; i++)
         {
-            sb.append(evalues[i]);
-            if ((i + 1) < evalues.length) {
+            sb.append(elementValues[i]);
+            if ((i + 1) < elementValues.length) {
                 sb.append(",");
             }
         }
@@ -52,18 +52,18 @@
     {
         super(type, cpool);
         if (type != ARRAY) {
-            throw new RuntimeException(
+            throw new IllegalArgumentException(
                     "Only element values of type array can be built with this ctor - type specified: " + type);
         }
-        this.evalues = datums;
+        this.elementValues = datums;
     }
 
     @Override
     public void dump(final DataOutputStream dos) throws IOException
     {
         dos.writeByte(super.getType()); // u1 type of value (ARRAY == '[')
-        dos.writeShort(evalues.length);
-        for (final ElementValue evalue : evalues) {
+        dos.writeShort(elementValues.length);
+        for (final ElementValue evalue : elementValues) {
             evalue.dump(dos);
         }
     }
@@ -73,10 +73,10 @@
     {
         final StringBuilder sb = new StringBuilder();
         sb.append("[");
-        for (int i = 0; i < evalues.length; i++)
+        for (int i = 0; i < elementValues.length; i++)
         {
-            sb.append(evalues[i].stringifyValue());
-            if ((i + 1) < evalues.length) {
+            sb.append(elementValues[i].stringifyValue());
+            if ((i + 1) < elementValues.length) {
                 sb.append(",");
             }
         }
@@ -86,11 +86,11 @@
 
     public ElementValue[] getElementValuesArray()
     {
-        return evalues;
+        return elementValues;
     }
 
     public int getElementValuesArraySize()
     {
-        return evalues.length;
+        return elementValues.length;
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -47,7 +47,7 @@
  * @see Synthetic
  * @see Deprecated
  * @see Signature
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public abstract class Attribute implements Cloneable, Node {
     private static final boolean debug = false;
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethod.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethod.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethod.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethod.java	2022-04-19 19:38:30.000000000 +0000
@@ -33,17 +33,17 @@
  * method ref, the number of bootstrap arguments and an array of the
  * bootstrap arguments.
  *
- * @see 
+ * @see 
  * The class File Format : The BootstrapMethods Attribute
  * @since 6.0
  */
 public class BootstrapMethod implements Cloneable {
 
     /** Index of the CONSTANT_MethodHandle_info structure in the constant_pool table */
-    private int bootstrap_method_ref;
+    private int bootstrapMethodRef;
 
     /** Array of references to the constant_pool table */
-    private int[] bootstrap_arguments;
+    private int[] bootstrapArguments;
 
 
     /**
@@ -62,8 +62,8 @@
     BootstrapMethod(final DataInput input) throws IOException {
         this(input.readUnsignedShort(), input.readUnsignedShort());
 
-        for (int i = 0; i < bootstrap_arguments.length; i++) {
-            bootstrap_arguments[i] = input.readUnsignedShort();
+        for (int i = 0; i < bootstrapArguments.length; i++) {
+            bootstrapArguments[i] = input.readUnsignedShort();
         }
     }
 
@@ -73,47 +73,47 @@
     }
 
     /**
-     * @param bootstrap_method_ref int index into constant_pool of CONSTANT_MethodHandle
-     * @param bootstrap_arguments int[] indices into constant_pool of CONSTANT_[type]_info
+     * @param bootstrapMethodRef int index into constant_pool of CONSTANT_MethodHandle
+     * @param bootstrapArguments int[] indices into constant_pool of CONSTANT_[type]_info
      */
-    public BootstrapMethod(final int bootstrap_method_ref, final int[] bootstrap_arguments) {
-        this.bootstrap_method_ref = bootstrap_method_ref;
-        this.bootstrap_arguments = bootstrap_arguments;
+    public BootstrapMethod(final int bootstrapMethodRef, final int[] bootstrapArguments) {
+        this.bootstrapMethodRef = bootstrapMethodRef;
+        this.bootstrapArguments = bootstrapArguments;
     }
 
     /**
      * @return index into constant_pool of bootstrap_method
      */
     public int getBootstrapMethodRef() {
-        return bootstrap_method_ref;
+        return bootstrapMethodRef;
     }
 
     /**
-     * @param bootstrap_method_ref int index into constant_pool of CONSTANT_MethodHandle
+     * @param bootstrapMethodRef int index into constant_pool of CONSTANT_MethodHandle
      */
-    public void setBootstrapMethodRef(final int bootstrap_method_ref) {
-        this.bootstrap_method_ref = bootstrap_method_ref;
+    public void setBootstrapMethodRef(final int bootstrapMethodRef) {
+        this.bootstrapMethodRef = bootstrapMethodRef;
     }
 
     /**
      * @return int[] of bootstrap_method indices into constant_pool of CONSTANT_[type]_info
      */
     public int[] getBootstrapArguments() {
-        return bootstrap_arguments;
+        return bootstrapArguments;
     }
 
     /**
      * @return count of number of boostrap arguments
      */
     public int getNumBootstrapArguments() {
-        return bootstrap_arguments.length;
+        return bootstrapArguments.length;
     }
 
     /**
-     * @param bootstrap_arguments int[] indices into constant_pool of CONSTANT_[type]_info
+     * @param bootstrapArguments int[] indices into constant_pool of CONSTANT_[type]_info
      */
-    public void setBootstrapArguments(final int[] bootstrap_arguments) {
-        this.bootstrap_arguments = bootstrap_arguments;
+    public void setBootstrapArguments(final int[] bootstrapArguments) {
+        this.bootstrapArguments = bootstrapArguments;
     }
 
     /**
@@ -121,25 +121,25 @@
      */
     @Override
     public final String toString() {
-        return "BootstrapMethod(" + bootstrap_method_ref + ", " + bootstrap_arguments.length + ", "
-               + Arrays.toString(bootstrap_arguments) + ")";
+        return "BootstrapMethod(" + bootstrapMethodRef + ", " + bootstrapArguments.length + ", "
+               + Arrays.toString(bootstrapArguments) + ")";
     }
 
     /**
      * @return Resolved string representation
      */
-    public final String toString( final ConstantPool constant_pool ) {
+    public final String toString( final ConstantPool constantPool ) {
         final StringBuilder buf = new StringBuilder();
         String bootstrap_method_name;
-        bootstrap_method_name = constant_pool.constantToString(bootstrap_method_ref,
+        bootstrap_method_name = constantPool.constantToString(bootstrapMethodRef,
                 Const.CONSTANT_MethodHandle);
         buf.append(Utility.compactClassName(bootstrap_method_name, false));
-        final int num_bootstrap_arguments = bootstrap_arguments.length;
+        final int num_bootstrap_arguments = bootstrapArguments.length;
         if (num_bootstrap_arguments > 0) {
             buf.append("\nMethod Arguments:");
             for (int i = 0; i < num_bootstrap_arguments; i++) {
                 buf.append("\n  ").append(i).append(": ");
-                buf.append(constant_pool.constantToString(constant_pool.getConstant(bootstrap_arguments[i])));
+                buf.append(constantPool.constantToString(constantPool.getConstant(bootstrapArguments[i])));
             }
         }
         return buf.toString();
@@ -152,9 +152,9 @@
      * @throws IOException
      */
     public final void dump(final DataOutputStream file) throws IOException {
-        file.writeShort(bootstrap_method_ref);
-        file.writeShort(bootstrap_arguments.length);
-        for (final int bootstrap_argument : bootstrap_arguments) {
+        file.writeShort(bootstrapMethodRef);
+        file.writeShort(bootstrapArguments.length);
+        for (final int bootstrap_argument : bootstrapArguments) {
             file.writeShort(bootstrap_argument);
         }
     }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethods.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethods.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethods.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethods.java	2022-04-19 19:38:30.000000000 +0000
@@ -30,13 +30,13 @@
 /**
  * This class represents a BootstrapMethods attribute.
  *
- * @see 
+ * @see 
  * The class File Format : The BootstrapMethods Attribute
  * @since 6.0
  */
 public class BootstrapMethods extends Attribute {
 
-    private BootstrapMethod[] bootstrap_methods;  // TODO this could be made final (setter is not used)
+    private BootstrapMethod[] bootstrapMethods;  // TODO this could be made final (setter is not used)
 
     /**
      * Initialize from another object. Note that both objects use the same
@@ -50,12 +50,12 @@
     /**
      * @param name_index Index in constant pool to CONSTANT_Utf8
      * @param length Content length in bytes
-     * @param bootstrap_methods array of bootstrap methods
+     * @param bootstrapMethods array of bootstrap methods
      * @param constant_pool Array of constants
      */
-    public BootstrapMethods(final int name_index, final int length, final BootstrapMethod[] bootstrap_methods, final ConstantPool constant_pool) {
+    public BootstrapMethods(final int name_index, final int length, final BootstrapMethod[] bootstrapMethods, final ConstantPool constant_pool) {
         super(Const.ATTR_BOOTSTRAP_METHODS, name_index, length, constant_pool);
-        this.bootstrap_methods = bootstrap_methods;
+        this.bootstrapMethods = bootstrapMethods;
     }
 
     /**
@@ -71,9 +71,9 @@
         this(name_index, length, (BootstrapMethod[]) null, constant_pool);
 
         final int num_bootstrap_methods = input.readUnsignedShort();
-        bootstrap_methods = new BootstrapMethod[num_bootstrap_methods];
+        bootstrapMethods = new BootstrapMethod[num_bootstrap_methods];
         for (int i = 0; i < num_bootstrap_methods; i++) {
-            bootstrap_methods[i] = new BootstrapMethod(input);
+            bootstrapMethods[i] = new BootstrapMethod(input);
         }
     }
 
@@ -81,14 +81,14 @@
      * @return array of bootstrap method "records"
      */
     public final BootstrapMethod[] getBootstrapMethods() {
-        return bootstrap_methods;
+        return bootstrapMethods;
     }
 
     /**
-     * @param bootstrap_methods the array of bootstrap methods
+     * @param bootstrapMethods the array of bootstrap methods
      */
-    public final void setBootstrapMethods(final BootstrapMethod[] bootstrap_methods) {
-        this.bootstrap_methods = bootstrap_methods;
+    public final void setBootstrapMethods(final BootstrapMethod[] bootstrapMethods) {
+        this.bootstrapMethods = bootstrapMethods;
     }
 
     /**
@@ -105,10 +105,10 @@
     @Override
     public BootstrapMethods copy(final ConstantPool _constant_pool) {
         final BootstrapMethods c = (BootstrapMethods) clone();
-        c.bootstrap_methods = new BootstrapMethod[bootstrap_methods.length];
+        c.bootstrapMethods = new BootstrapMethod[bootstrapMethods.length];
 
-        for (int i = 0; i < bootstrap_methods.length; i++) {
-            c.bootstrap_methods[i] = bootstrap_methods[i].copy();
+        for (int i = 0; i < bootstrapMethods.length; i++) {
+            c.bootstrapMethods[i] = bootstrapMethods[i].copy();
         }
         c.setConstantPool(_constant_pool);
         return c;
@@ -124,8 +124,8 @@
     public final void dump(final DataOutputStream file) throws IOException {
         super.dump(file);
 
-        file.writeShort(bootstrap_methods.length);
-        for (final BootstrapMethod bootstrap_method : bootstrap_methods) {
+        file.writeShort(bootstrapMethods.length);
+        for (final BootstrapMethod bootstrap_method : bootstrapMethods) {
             bootstrap_method.dump(file);
         }
     }
@@ -137,14 +137,14 @@
     public final String toString() {
         final StringBuilder buf = new StringBuilder();
         buf.append("BootstrapMethods(");
-        buf.append(bootstrap_methods.length);
+        buf.append(bootstrapMethods.length);
         buf.append("):");
-        for (int i = 0; i < bootstrap_methods.length; i++) {
+        for (int i = 0; i < bootstrapMethods.length; i++) {
             buf.append("\n");
             final int start = buf.length();
             buf.append("  ").append(i).append(": ");
             final int indent_count = buf.length() - start;
-            final String[] lines = (bootstrap_methods[i].toString(super.getConstantPool())).split("\\r?\\n");
+            final String[] lines = (bootstrapMethods[i].toString(super.getConstantPool())).split("\\r?\\n");
             buf.append(lines[0]);
             for (int j = 1; j < lines.length; j++) {
                 buf.append("\n").append("          ".substring(0,indent_count)).append(lines[j]);
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java	2022-04-19 19:38:30.000000000 +0000
@@ -48,19 +48,19 @@
 
     private DataInputStream dataInputStream;
     private final boolean fileOwned;
-    private final String file_name;
-    private String zip_file;
-    private int class_name_index;
-    private int superclass_name_index;
+    private final String fileName;
+    private String zipFile;
+    private int classNameIndex;
+    private int superclassNameIndex;
     private int major; // Compiler version
     private int minor; // Compiler version
-    private int access_flags; // Access rights of parsed class
+    private int accessFlags; // Access rights of parsed class
     private int[] interfaces; // Names of implemented interfaces
-    private ConstantPool constant_pool; // collection of constants
+    private ConstantPool constantPool; // collection of constants
     private Field[] fields; // class fields, i.e., its variables
     private Method[] methods; // methods defined in the class
     private Attribute[] attributes; // attributes defined in the class
-    private final boolean is_zip; // Loaded from zip file
+    private final boolean isZip; // Loaded from zip file
     private static final int BUFSIZE = 8192;
 
 
@@ -68,13 +68,13 @@
      * Parses class from the given stream.
      *
      * @param inputStream Input stream
-     * @param file_name File name
+     * @param fileName File name
      */
-    public ClassParser(final InputStream inputStream, final String file_name) {
-        this.file_name = file_name;
+    public ClassParser(final InputStream inputStream, final String fileName) {
+        this.fileName = fileName;
         fileOwned = false;
         final String clazz = inputStream.getClass().getName(); // Not a very clean solution ...
-        is_zip = clazz.startsWith("java.util.zip.") || clazz.startsWith("java.util.jar.");
+        isZip = clazz.startsWith("java.util.zip.") || clazz.startsWith("java.util.jar.");
         if (inputStream instanceof DataInputStream) {
             this.dataInputStream = (DataInputStream) inputStream;
         } else {
@@ -85,25 +85,25 @@
 
     /** Parses class from given .class file.
      *
-     * @param file_name file name
+     * @param fileName file name
      */
-    public ClassParser(final String file_name) {
-        is_zip = false;
-        this.file_name = file_name;
+    public ClassParser(final String fileName) {
+        isZip = false;
+        this.fileName = fileName;
         fileOwned = true;
     }
 
 
     /** Parses class from given .class file in a ZIP-archive
      *
-     * @param zip_file zip file name
-     * @param file_name file name
+     * @param zipFile zip file name
+     * @param fileName file name
      */
-    public ClassParser(final String zip_file, final String file_name) {
-        is_zip = true;
+    public ClassParser(final String zipFile, final String fileName) {
+        isZip = true;
         fileOwned = true;
-        this.zip_file = zip_file;
-        this.file_name = file_name;
+        this.zipFile = zipFile;
+        this.fileName = fileName;
     }
 
 
@@ -122,19 +122,19 @@
         ZipFile zip = null;
         try {
             if (fileOwned) {
-                if (is_zip) {
-                    zip = new ZipFile(zip_file);
-                    final ZipEntry entry = zip.getEntry(file_name);
+                if (isZip) {
+                    zip = new ZipFile(zipFile);
+                    final ZipEntry entry = zip.getEntry(fileName);
 
                     if (entry == null) {
-                        throw new IOException("File " + file_name + " not found");
+                        throw new IOException("File " + fileName + " not found");
                     }
 
                     dataInputStream = new DataInputStream(new BufferedInputStream(zip.getInputStream(entry),
                             BUFSIZE));
                 } else {
                     dataInputStream = new DataInputStream(new BufferedInputStream(new FileInputStream(
-                            file_name), BUFSIZE));
+                            fileName), BUFSIZE));
                 }
             }
             /****************** Read headers ********************************/
@@ -165,8 +165,8 @@
             //        int bytes = file.available();
             //        byte[] buf = new byte[bytes];
             //        file.read(buf);
-            //        if(!(is_zip && (buf.length == 1))) {
-            //      System.err.println("WARNING: Trailing garbage at end of " + file_name);
+            //        if(!(isZip && (buf.length == 1))) {
+            //      System.err.println("WARNING: Trailing garbage at end of " + fileName);
             //      System.err.println(bytes + " extra bytes: " + Utility.toHexString(buf));
             //        }
             //      }
@@ -190,8 +190,8 @@
             }
         }
         // Return the information we have gathered in a new object
-        return new JavaClass(class_name_index, superclass_name_index, file_name, major, minor,
-                access_flags, constant_pool, interfaces, fields, methods, attributes, is_zip
+        return new JavaClass(classNameIndex, superclassNameIndex, fileName, major, minor,
+                accessFlags, constantPool, interfaces, fields, methods, attributes, isZip
                         ? JavaClass.ZIP
                         : JavaClass.FILE);
     }
@@ -206,7 +206,7 @@
         final int attributes_count = dataInputStream.readUnsignedShort();
         attributes = new Attribute[attributes_count];
         for (int i = 0; i < attributes_count; i++) {
-            attributes[i] = Attribute.readAttribute(dataInputStream, constant_pool);
+            attributes[i] = Attribute.readAttribute(dataInputStream, constantPool);
         }
     }
 
@@ -217,19 +217,19 @@
      * @throws  ClassFormatException
      */
     private void readClassInfo() throws IOException, ClassFormatException {
-        access_flags = dataInputStream.readUnsignedShort();
+        accessFlags = dataInputStream.readUnsignedShort();
         /* Interfaces are implicitely abstract, the flag should be set
          * according to the JVM specification.
          */
-        if ((access_flags & Const.ACC_INTERFACE) != 0) {
-            access_flags |= Const.ACC_ABSTRACT;
+        if ((accessFlags & Const.ACC_INTERFACE) != 0) {
+            accessFlags |= Const.ACC_ABSTRACT;
         }
-        if (((access_flags & Const.ACC_ABSTRACT) != 0)
-                && ((access_flags & Const.ACC_FINAL) != 0)) {
-            throw new ClassFormatException("Class " + file_name + " can't be both final and abstract");
+        if (((accessFlags & Const.ACC_ABSTRACT) != 0)
+                && ((accessFlags & Const.ACC_FINAL) != 0)) {
+            throw new ClassFormatException("Class " + fileName + " can't be both final and abstract");
         }
-        class_name_index = dataInputStream.readUnsignedShort();
-        superclass_name_index = dataInputStream.readUnsignedShort();
+        classNameIndex = dataInputStream.readUnsignedShort();
+        superclassNameIndex = dataInputStream.readUnsignedShort();
     }
 
 
@@ -239,7 +239,7 @@
      * @throws  ClassFormatException
      */
     private void readConstantPool() throws IOException, ClassFormatException {
-        constant_pool = new ConstantPool(dataInputStream);
+        constantPool = new ConstantPool(dataInputStream);
     }
 
 
@@ -252,7 +252,7 @@
         final int fields_count = dataInputStream.readUnsignedShort();
         fields = new Field[fields_count];
         for (int i = 0; i < fields_count; i++) {
-            fields[i] = new Field(dataInputStream, constant_pool);
+            fields[i] = new Field(dataInputStream, constantPool);
         }
     }
 
@@ -266,7 +266,7 @@
      */
     private void readID() throws IOException, ClassFormatException {
         if (dataInputStream.readInt() != Const.JVM_CLASSFILE_MAGIC) {
-            throw new ClassFormatException(file_name + " is not a Java .class file");
+            throw new ClassFormatException(fileName + " is not a Java .class file");
         }
     }
 
@@ -294,7 +294,7 @@
         final int methods_count = dataInputStream.readUnsignedShort();
         methods = new Method[methods_count];
         for (int i = 0; i < methods_count; i++) {
-            methods[i] = new Method(dataInputStream, constant_pool);
+            methods[i] = new Method(dataInputStream, constantPool);
         }
     }
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java	2022-04-19 19:38:30.000000000 +0000
@@ -46,10 +46,10 @@
  */
 public final class Code extends Attribute {
 
-    private int max_stack; // Maximum size of stack used by this method  // TODO this could be made final (setter is not used)
-    private int max_locals; // Number of local variables  // TODO this could be made final (setter is not used)
+    private int maxStack; // Maximum size of stack used by this method  // TODO this could be made final (setter is not used)
+    private int maxLocals; // Number of local variables  // TODO this could be made final (setter is not used)
     private byte[] code; // Actual byte code
-    private CodeException[] exception_table; // Table of handled exceptions
+    private CodeException[] exceptionTable; // Table of handled exceptions
     private Attribute[] attributes; // or LocalVariable
 
 
@@ -81,9 +81,9 @@
          * handler is active, i.e., a try { ... } catch() block.
          */
         final int exception_table_length = file.readUnsignedShort();
-        exception_table = new CodeException[exception_table_length];
+        exceptionTable = new CodeException[exception_table_length];
         for (int i = 0; i < exception_table_length; i++) {
-            exception_table[i] = new CodeException(file);
+            exceptionTable[i] = new CodeException(file);
         }
         /* Read all attributes, currently `LineNumberTable' and
          * `LocalVariableTable'
@@ -104,20 +104,20 @@
     /**
      * @param name_index Index pointing to the name Code
      * @param length Content length in bytes
-     * @param max_stack Maximum size of stack
-     * @param max_locals Number of local variables
+     * @param maxStack Maximum size of stack
+     * @param maxLocals Number of local variables
      * @param code Actual byte code
-     * @param exception_table Table of handled exceptions
+     * @param exceptionTable of handled exceptions
      * @param attributes Attributes of code: LineNumber or LocalVariable
      * @param constant_pool Array of constants
      */
-    public Code(final int name_index, final int length, final int max_stack, final int max_locals, final byte[] code,
-            final CodeException[] exception_table, final Attribute[] attributes, final ConstantPool constant_pool) {
+    public Code(final int name_index, final int length, final int maxStack, final int maxLocals, final byte[] code,
+            final CodeException[] exceptionTable, final Attribute[] attributes, final ConstantPool constant_pool) {
         super(Const.ATTR_CODE, name_index, length, constant_pool);
-        this.max_stack = max_stack;
-        this.max_locals = max_locals;
+        this.maxStack = maxStack;
+        this.maxLocals = maxLocals;
         this.code = code != null ? code : new byte[0];
-        this.exception_table = exception_table != null ? exception_table : new CodeException[0];
+        this.exceptionTable = exceptionTable != null ? exceptionTable : new CodeException[0];
         this.attributes = attributes != null ? attributes : new Attribute[0];
         super.setLength(calculateLength()); // Adjust length
     }
@@ -145,12 +145,12 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(max_stack);
-        file.writeShort(max_locals);
+        file.writeShort(maxStack);
+        file.writeShort(maxLocals);
         file.writeInt(code.length);
         file.write(code, 0, code.length);
-        file.writeShort(exception_table.length);
-        for (final CodeException exception : exception_table) {
+        file.writeShort(exceptionTable.length);
+        for (final CodeException exception : exceptionTable) {
             exception.dump(file);
         }
         file.writeShort(attributes.length);
@@ -208,7 +208,7 @@
      * @see CodeException
      */
     public CodeException[] getExceptionTable() {
-        return exception_table;
+        return exceptionTable;
     }
 
 
@@ -216,7 +216,7 @@
      * @return Number of local variables.
      */
     public int getMaxLocals() {
-        return max_locals;
+        return maxLocals;
     }
 
 
@@ -224,7 +224,7 @@
      * @return Maximum size of stack used by this method.
      */
     public int getMaxStack() {
-        return max_stack;
+        return maxStack;
     }
 
 
@@ -233,10 +233,10 @@
      * and excluding all its attributes
      */
     private int getInternalLength() {
-        return 2 /*max_stack*/+ 2 /*max_locals*/+ 4 /*code length*/
+        return 2 /*maxStack*/+ 2 /*maxLocals*/+ 4 /*code length*/
                 + code.length /*byte-code*/
                 + 2 /*exception-table length*/
-                + 8 * (exception_table == null ? 0 : exception_table.length) /* exception table */
+                + 8 * (exceptionTable == null ? 0 : exceptionTable.length) /* exception table */
                 + 2 /* attributes count */;
     }
 
@@ -275,27 +275,27 @@
 
 
     /**
-     * @param exception_table exception table
+     * @param exceptionTable exception table
      */
-    public void setExceptionTable( final CodeException[] exception_table ) {
-        this.exception_table = exception_table != null ? exception_table : new CodeException[0];
+    public void setExceptionTable( final CodeException[] exceptionTable ) {
+        this.exceptionTable = exceptionTable != null ? exceptionTable : new CodeException[0];
         super.setLength(calculateLength()); // Adjust length
     }
 
 
     /**
-     * @param max_locals maximum number of local variables
+     * @param maxLocals maximum number of local variables
      */
-    public void setMaxLocals( final int max_locals ) {
-        this.max_locals = max_locals;
+    public void setMaxLocals( final int maxLocals ) {
+        this.maxLocals = maxLocals;
     }
 
 
     /**
-     * @param max_stack maximum stack size
+     * @param maxStack maximum stack size
      */
-    public void setMaxStack( final int max_stack ) {
-        this.max_stack = max_stack;
+    public void setMaxStack( final int maxStack ) {
+        this.maxStack = maxStack;
     }
 
 
@@ -304,18 +304,19 @@
      */
     public String toString( final boolean verbose ) {
         final StringBuilder buf = new StringBuilder(100); // CHECKSTYLE IGNORE MagicNumber
-        buf.append("Code(max_stack = ").append(max_stack).append(", max_locals = ").append(
-                max_locals).append(", code_length = ").append(code.length).append(")\n").append(
+        buf.append("Code(maxStack = ").append(maxStack).append(", maxLocals = ").append(
+                maxLocals).append(", code_length = ").append(code.length).append(")\n").append(
                 Utility.codeToString(code, super.getConstantPool(), 0, -1, verbose));
-        if (exception_table.length > 0) {
+        if (exceptionTable.length > 0) {
             buf.append("\nException handler(s) = \n").append("From\tTo\tHandler\tType\n");
-            for (final CodeException exception : exception_table) {
+            for (final CodeException exception : exceptionTable) {
                 buf.append(exception.toString(super.getConstantPool(), verbose)).append("\n");
             }
         }
         if (attributes.length > 0) {
             buf.append("\nAttribute(s) = ");
             for (final Attribute attribute : attributes) {
+                buf.append("\n").append(attribute.getName()).append(":");
                 buf.append("\n").append(attribute);
             }
         }
@@ -345,9 +346,9 @@
             System.arraycopy(code, 0, c.code, 0, code.length);
         }
         c.setConstantPool(_constant_pool);
-        c.exception_table = new CodeException[exception_table.length];
-        for (int i = 0; i < exception_table.length; i++) {
-            c.exception_table[i] = exception_table[i].copy();
+        c.exceptionTable = new CodeException[exceptionTable.length];
+        for (int i = 0; i < exceptionTable.length; i++) {
+            c.exceptionTable[i] = exceptionTable[i].copy();
         }
         c.attributes = new Attribute[attributes.length];
         for (int i = 0; i < attributes.length; i++) {
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -32,16 +32,16 @@
  * particular exception handler is active.
  *
  * @see     Code
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public final class CodeException implements Cloneable, Node {
 
-    private int start_pc; // Range in the code the exception handler is
-    private int end_pc; // active. start_pc is inclusive, end_pc exclusive
-    private int handler_pc; /* Starting address of exception handler, i.e.,
+    private int startPc; // Range in the code the exception handler is
+    private int endPc; // active. startPc is inclusive, endPc exclusive
+    private int handlerPc; /* Starting address of exception handler, i.e.,
      * an offset from start of code.
      */
-    private int catch_type; /* If this is zero the handler catches any
+    private int catchType; /* If this is zero the handler catches any
      * exception, otherwise it points to the
      * exception class which is to be caught.
      */
@@ -67,20 +67,20 @@
 
 
     /**
-     * @param start_pc Range in the code the exception handler is active,
-     * start_pc is inclusive while
-     * @param end_pc is exclusive
-     * @param handler_pc Starting address of exception handler, i.e.,
+     * @param startPc Range in the code the exception handler is active,
+     * startPc is inclusive while
+     * @param endPc is exclusive
+     * @param handlerPc Starting address of exception handler, i.e.,
      * an offset from start of code.
-     * @param catch_type If zero the handler catches any
+     * @param catchType If zero the handler catches any
      * exception, otherwise it points to the exception class which is
      * to be caught.
      */
-    public CodeException(final int start_pc, final int end_pc, final int handler_pc, final int catch_type) {
-        this.start_pc = start_pc;
-        this.end_pc = end_pc;
-        this.handler_pc = handler_pc;
-        this.catch_type = catch_type;
+    public CodeException(final int startPc, final int endPc, final int handlerPc, final int catchType) {
+        this.startPc = startPc;
+        this.endPc = endPc;
+        this.handlerPc = handlerPc;
+        this.catchType = catchType;
     }
 
 
@@ -104,10 +104,10 @@
      * @throws IOException
      */
     public void dump( final DataOutputStream file ) throws IOException {
-        file.writeShort(start_pc);
-        file.writeShort(end_pc);
-        file.writeShort(handler_pc);
-        file.writeShort(catch_type);
+        file.writeShort(startPc);
+        file.writeShort(endPc);
+        file.writeShort(handlerPc);
+        file.writeShort(catchType);
     }
 
 
@@ -116,7 +116,7 @@
      * the exception class which is to be caught.
      */
     public int getCatchType() {
-        return catch_type;
+        return catchType;
     }
 
 
@@ -124,7 +124,7 @@
      * @return Exclusive end index of the region where the handler is active.
      */
     public int getEndPC() {
-        return end_pc;
+        return endPc;
     }
 
 
@@ -132,7 +132,7 @@
      * @return Starting address of exception handler, relative to the code.
      */
     public int getHandlerPC() {
-        return handler_pc;
+        return handlerPc;
     }
 
 
@@ -140,39 +140,39 @@
      * @return Inclusive start index of the region where the handler is active.
      */
     public int getStartPC() {
-        return start_pc;
+        return startPc;
     }
 
 
     /**
-     * @param catch_type the type of exception that is caught
+     * @param catchType the type of exception that is caught
      */
-    public void setCatchType( final int catch_type ) {
-        this.catch_type = catch_type;
+    public void setCatchType( final int catchType ) {
+        this.catchType = catchType;
     }
 
 
     /**
-     * @param end_pc end of handled block
+     * @param endPc end of handled block
      */
-    public void setEndPC( final int end_pc ) {
-        this.end_pc = end_pc;
+    public void setEndPC( final int endPc ) {
+        this.endPc = endPc;
     }
 
 
     /**
-     * @param handler_pc where the actual code is
+     * @param handlerPc where the actual code is
      */
-    public void setHandlerPC( final int handler_pc ) { // TODO unused
-        this.handler_pc = handler_pc;
+    public void setHandlerPC( final int handlerPc ) { // TODO unused
+        this.handlerPc = handlerPc;
     }
 
 
     /**
-     * @param start_pc start of handled block
+     * @param startPc start of handled block
      */
-    public void setStartPC( final int start_pc ) { // TODO unused
-        this.start_pc = start_pc;
+    public void setStartPC( final int startPc ) { // TODO unused
+        this.startPc = startPc;
     }
 
 
@@ -181,8 +181,8 @@
      */
     @Override
     public String toString() {
-        return "CodeException(start_pc = " + start_pc + ", end_pc = " + end_pc + ", handler_pc = "
-                + handler_pc + ", catch_type = " + catch_type + ")";
+        return "CodeException(startPc = " + startPc + ", endPc = " + endPc + ", handlerPc = "
+                + handlerPc + ", catchType = " + catchType + ")";
     }
 
 
@@ -191,13 +191,13 @@
      */
     public String toString( final ConstantPool cp, final boolean verbose ) {
         String str;
-        if (catch_type == 0) {
+        if (catchType == 0) {
             str = "(0)";
         } else {
-            str = Utility.compactClassName(cp.getConstantString(catch_type, Const.CONSTANT_Class), false)
-                    + (verbose ? "(" + catch_type + ")" : "");
+            str = Utility.compactClassName(cp.getConstantString(catchType, Const.CONSTANT_Class), false)
+                    + (verbose ? "(" + catchType + ")" : "");
         }
-        return start_pc + "\t" + end_pc + "\t" + handler_pc + "\t" + str;
+        return startPc + "\t" + endPc + "\t" + handlerPc + "\t" + str;
     }
 
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -32,7 +32,7 @@
  * in the constant pool of a class file. The classes keep closely to
  * the JVM specification.
  *
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public abstract class Constant implements Cloneable, Node {
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantClass.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantClass.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantClass.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantClass.java	2022-04-19 19:38:30.000000000 +0000
@@ -35,7 +35,7 @@
  */
 public final class ConstantClass extends Constant implements ConstantObject {
 
-    private int name_index; // Identical to ConstantString except for the name
+    private int nameIndex; // Identical to ConstantString except for the name
 
 
     /**
@@ -58,12 +58,12 @@
 
 
     /**
-     * @param name_index Name index in constant pool.  Should refer to a
+     * @param nameIndex Name index in constant pool.  Should refer to a
      * ConstantUtf8.
      */
-    public ConstantClass(final int name_index) {
+    public ConstantClass(final int nameIndex) {
         super(Const.CONSTANT_Class);
-        this.name_index = name_index;
+        this.nameIndex = nameIndex;
     }
 
 
@@ -89,7 +89,7 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         file.writeByte(super.getTag());
-        file.writeShort(name_index);
+        file.writeShort(nameIndex);
     }
 
 
@@ -97,15 +97,15 @@
      * @return Name index in constant pool of class name.
      */
     public int getNameIndex() {
-        return name_index;
+        return nameIndex;
     }
 
 
     /**
-     * @param name_index the name index in the constant pool of this Constant Class
+     * @param nameIndex the name index in the constant pool of this Constant Class
      */
-    public void setNameIndex( final int name_index ) {
-        this.name_index = name_index;
+    public void setNameIndex( final int nameIndex ) {
+        this.nameIndex = nameIndex;
     }
 
 
@@ -113,7 +113,7 @@
      */
     @Override
     public Object getConstantValue( final ConstantPool cp ) {
-        final Constant c = cp.getConstant(name_index, Const.CONSTANT_Utf8);
+        final Constant c = cp.getConstant(nameIndex, Const.CONSTANT_Utf8);
         return ((ConstantUtf8) c).getBytes();
     }
 
@@ -130,6 +130,6 @@
      */
     @Override
     public String toString() {
-        return super.toString() + "(name_index = " + name_index + ")";
+        return super.toString() + "(nameIndex = " + nameIndex + ")";
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInvokeDynamic.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInvokeDynamic.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInvokeDynamic.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInvokeDynamic.java	2022-04-19 19:38:30.000000000 +0000
@@ -31,7 +31,7 @@
  * and represents a reference to a invoke dynamic.
  *
  * @see     Constant
- * @see  
+ * @see  
  * The CONSTANT_InvokeDynamic_info Structure in The Java Virtual Machine Specification
  * @since 6.0
  */
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodHandle.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodHandle.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodHandle.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodHandle.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,8 +36,8 @@
  */
 public final class ConstantMethodHandle extends Constant {
 
-    private int reference_kind;
-    private int reference_index;
+    private int referenceKind;
+    private int referenceIndex;
 
 
     /**
@@ -61,8 +61,8 @@
 
     public ConstantMethodHandle(final int reference_kind, final int reference_index) {
         super(Const.CONSTANT_MethodHandle);
-        this.reference_kind = reference_kind;
-        this.reference_index = reference_index;
+        this.referenceKind = reference_kind;
+        this.referenceIndex = reference_index;
     }
 
 
@@ -88,28 +88,28 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         file.writeByte(super.getTag());
-        file.writeByte(reference_kind);
-        file.writeShort(reference_index);
+        file.writeByte(referenceKind);
+        file.writeShort(referenceIndex);
     }
 
 
     public int getReferenceKind() {
-        return reference_kind;
+        return referenceKind;
     }
 
 
     public void setReferenceKind(final int reference_kind) {
-        this.reference_kind = reference_kind;
+        this.referenceKind = reference_kind;
     }
 
 
     public int getReferenceIndex() {
-        return reference_index;
+        return referenceIndex;
     }
 
 
     public void setReferenceIndex(final int reference_index) {
-        this.reference_index = reference_index;
+        this.referenceIndex = reference_index;
     }
 
 
@@ -118,7 +118,7 @@
      */
     @Override
     public String toString() {
-        return super.toString() + "(reference_kind = " + reference_kind +
-                ", reference_index = " + reference_index + ")";
+        return super.toString() + "(referenceKind = " + referenceKind +
+                ", referenceIndex = " + referenceIndex + ")";
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodType.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodType.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodType.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodType.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,7 +36,7 @@
  */
 public final class ConstantMethodType extends Constant {
 
-    private int descriptor_index;
+    private int descriptorIndex;
 
 
     /**
@@ -60,7 +60,7 @@
 
     public ConstantMethodType(final int descriptor_index) {
         super(Const.CONSTANT_MethodType);
-        this.descriptor_index = descriptor_index;
+        this.descriptorIndex = descriptor_index;
     }
 
 
@@ -86,17 +86,17 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         file.writeByte(super.getTag());
-        file.writeShort(descriptor_index);
+        file.writeShort(descriptorIndex);
     }
 
 
     public int getDescriptorIndex() {
-        return descriptor_index;
+        return descriptorIndex;
     }
 
 
     public void setDescriptorIndex(final int descriptor_index) {
-        this.descriptor_index = descriptor_index;
+        this.descriptorIndex = descriptor_index;
     }
 
 
@@ -105,6 +105,6 @@
      */
     @Override
     public String toString() {
-        return super.toString() + "(descriptor_index = " + descriptor_index + ")";
+        return super.toString() + "(descriptorIndex = " + descriptorIndex + ")";
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantModule.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantModule.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantModule.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantModule.java	2022-04-19 19:38:30.000000000 +0000
@@ -38,7 +38,7 @@
  */
 public final class ConstantModule extends Constant implements ConstantObject {
 
-    private int name_index;
+    private int nameIndex;
 
 
     /**
@@ -61,12 +61,12 @@
 
 
     /**
-     * @param name_index Name index in constant pool.  Should refer to a
+     * @param nameIndex Name index in constant pool.  Should refer to a
      * ConstantUtf8.
      */
-    public ConstantModule(final int name_index) {
+    public ConstantModule(final int nameIndex) {
         super(Const.CONSTANT_Module);
-        this.name_index = name_index;
+        this.nameIndex = nameIndex;
     }
 
 
@@ -92,7 +92,7 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         file.writeByte(super.getTag());
-        file.writeShort(name_index);
+        file.writeShort(nameIndex);
     }
 
 
@@ -100,15 +100,15 @@
      * @return Name index in constant pool of module name.
      */
     public int getNameIndex() {
-        return name_index;
+        return nameIndex;
     }
 
 
     /**
-     * @param name_index the name index in the constant pool of this Constant Module
+     * @param nameIndex the name index in the constant pool of this Constant Module
      */
-    public void setNameIndex( final int name_index ) {
-        this.name_index = name_index;
+    public void setNameIndex( final int nameIndex ) {
+        this.nameIndex = nameIndex;
     }
 
 
@@ -116,7 +116,7 @@
      */
     @Override
     public Object getConstantValue( final ConstantPool cp ) {
-        final Constant c = cp.getConstant(name_index, Const.CONSTANT_Utf8);
+        final Constant c = cp.getConstant(nameIndex, Const.CONSTANT_Utf8);
         return ((ConstantUtf8) c).getBytes();
     }
 
@@ -133,6 +133,6 @@
      */
     @Override
     public String toString() {
-        return super.toString() + "(name_index = " + name_index + ")";
+        return super.toString() + "(nameIndex = " + nameIndex + ")";
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantNameAndType.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantNameAndType.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantNameAndType.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantNameAndType.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,8 +36,8 @@
  */
 public final class ConstantNameAndType extends Constant {
 
-    private int name_index; // Name of field/method
-    private int signature_index; // and its signature.
+    private int nameIndex; // Name of field/method
+    private int signatureIndex; // and its signature.
 
 
     /**
@@ -60,13 +60,13 @@
 
 
     /**
-     * @param name_index Name of field/method
-     * @param signature_index and its signature
+     * @param nameIndex Name of field/method
+     * @param signatureIndex and its signature
      */
-    public ConstantNameAndType(final int name_index, final int signature_index) {
+    public ConstantNameAndType(final int nameIndex, final int signatureIndex) {
         super(Const.CONSTANT_NameAndType);
-        this.name_index = name_index;
-        this.signature_index = signature_index;
+        this.nameIndex = nameIndex;
+        this.signatureIndex = signatureIndex;
     }
 
 
@@ -92,8 +92,8 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         file.writeByte(super.getTag());
-        file.writeShort(name_index);
-        file.writeShort(signature_index);
+        file.writeShort(nameIndex);
+        file.writeShort(signatureIndex);
     }
 
 
@@ -101,7 +101,7 @@
      * @return Name index in constant pool of field/method name.
      */
     public int getNameIndex() {
-        return name_index;
+        return nameIndex;
     }
 
 
@@ -116,7 +116,7 @@
      * @return Index in constant pool of field/method signature.
      */
     public int getSignatureIndex() {
-        return signature_index;
+        return signatureIndex;
     }
 
 
@@ -128,18 +128,18 @@
 
 
     /**
-     * @param name_index the name index of this constant
+     * @param nameIndex the name index of this constant
      */
-    public void setNameIndex( final int name_index ) {
-        this.name_index = name_index;
+    public void setNameIndex( final int nameIndex ) {
+        this.nameIndex = nameIndex;
     }
 
 
     /**
-     * @param signature_index the signature index in the constant pool of this type
+     * @param signatureIndex the signature index in the constant pool of this type
      */
-    public void setSignatureIndex( final int signature_index ) {
-        this.signature_index = signature_index;
+    public void setSignatureIndex( final int signatureIndex ) {
+        this.signatureIndex = signatureIndex;
     }
 
 
@@ -148,7 +148,7 @@
      */
     @Override
     public String toString() {
-        return super.toString() + "(name_index = " + name_index + ", signature_index = "
-                + signature_index + ")";
+        return super.toString() + "(nameIndex = " + nameIndex + ", signatureIndex = "
+                + signatureIndex + ")";
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPackage.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPackage.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPackage.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPackage.java	2022-04-19 19:38:30.000000000 +0000
@@ -38,7 +38,7 @@
  */
 public final class ConstantPackage extends Constant implements ConstantObject {
 
-    private int name_index;
+    private int nameIndex;
 
 
     /**
@@ -61,12 +61,12 @@
 
 
     /**
-     * @param name_index Name index in constant pool.  Should refer to a
+     * @param nameIndex Name index in constant pool.  Should refer to a
      * ConstantUtf8.
      */
-    public ConstantPackage(final int name_index) {
+    public ConstantPackage(final int nameIndex) {
         super(Const.CONSTANT_Package);
-        this.name_index = name_index;
+        this.nameIndex = nameIndex;
     }
 
 
@@ -92,7 +92,7 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         file.writeByte(super.getTag());
-        file.writeShort(name_index);
+        file.writeShort(nameIndex);
     }
 
 
@@ -100,15 +100,15 @@
      * @return Name index in constant pool of package name.
      */
     public int getNameIndex() {
-        return name_index;
+        return nameIndex;
     }
 
 
     /**
-     * @param name_index the name index in the constant pool of this Constant Package
+     * @param nameIndex the name index in the constant pool of this Constant Package
      */
-    public void setNameIndex( final int name_index ) {
-        this.name_index = name_index;
+    public void setNameIndex( final int nameIndex ) {
+        this.nameIndex = nameIndex;
     }
 
 
@@ -116,7 +116,7 @@
      */
     @Override
     public Object getConstantValue( final ConstantPool cp ) {
-        final Constant c = cp.getConstant(name_index, Const.CONSTANT_Utf8);
+        final Constant c = cp.getConstant(nameIndex, Const.CONSTANT_Utf8);
         return ((ConstantUtf8) c).getBytes();
     }
 
@@ -133,6 +133,6 @@
      */
     @Override
     public String toString() {
-        return super.toString() + "(name_index = " + name_index + ")";
+        return super.toString() + "(nameIndex = " + nameIndex + ")";
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java	2022-04-19 19:38:30.000000000 +0000
@@ -40,13 +40,13 @@
  */
 public class ConstantPool implements Cloneable, Node {
 
-    private Constant[] constant_pool;
+    private Constant[] constantPool;
 
     /**
-     * @param constant_pool Array of constants
+     * @param constantPool Array of constants
      */
-    public ConstantPool(final Constant[] constant_pool) {
-        this.constant_pool = constant_pool;
+    public ConstantPool(final Constant[] constantPool) {
+        this.constantPool = constantPool;
     }
 
     /**
@@ -59,12 +59,12 @@
     public ConstantPool(final DataInput input) throws IOException, ClassFormatException {
         byte tag;
         final int constant_pool_count = input.readUnsignedShort();
-        constant_pool = new Constant[constant_pool_count];
-        /* constant_pool[0] is unused by the compiler and may be used freely
+        constantPool = new Constant[constant_pool_count];
+        /* constantPool[0] is unused by the compiler and may be used freely
          * by the implementation.
          */
         for (int i = 1; i < constant_pool_count; i++) {
-            constant_pool[i] = Constant.readConstant(input);
+            constantPool[i] = Constant.readConstant(input);
             /* Quote from the JVM specification:
              * "All eight byte constants take up two spots in the constant pool.
              * If this is the n'th byte in the constant pool, then the next item
@@ -72,7 +72,7 @@
              *
              * Thus we have to increment the index counter.
              */
-            tag = constant_pool[i].getTag();
+            tag = constantPool[i].getTag();
             if ((tag == Const.CONSTANT_Double) || (tag == Const.CONSTANT_Long)) {
                 i++;
             }
@@ -169,7 +169,7 @@
                 str = Utility.compactClassName(((ConstantUtf8) c).getBytes(), false);
                 break;
             default: // Never reached
-                throw new RuntimeException("Unknown constant type " + tag);
+                throw new IllegalArgumentException("Unknown constant type " + tag);
         }
         return str;
     }
@@ -222,10 +222,10 @@
      * @throws IOException
      */
     public void dump( final DataOutputStream file ) throws IOException {
-        file.writeShort(constant_pool.length);
-        for (int i = 1; i < constant_pool.length; i++) {
-            if (constant_pool[i] != null) {
-                constant_pool[i].dump(file);
+        file.writeShort(constantPool.length);
+        for (int i = 1; i < constantPool.length; i++) {
+            if (constantPool[i] != null) {
+                constantPool[i].dump(file);
             }
         }
     }
@@ -238,11 +238,11 @@
      * @see    Constant
      */
     public Constant getConstant( final int index ) {
-        if (index >= constant_pool.length || index < 0) {
+        if (index >= constantPool.length || index < 0) {
             throw new ClassFormatException("Invalid constant pool reference: " + index
-                    + ". Constant pool size is: " + constant_pool.length);
+                    + ". Constant pool size is: " + constantPool.length);
         }
-        return constant_pool[index];
+        return constantPool[index];
     }
 
     /**
@@ -273,7 +273,7 @@
      * @see    Constant
      */
     public Constant[] getConstantPool() {
-        return constant_pool;
+        return constantPool;
     }
 
     /**
@@ -314,7 +314,7 @@
                 i = ((ConstantPackage) c).getNameIndex();
                 break;
             default:
-                throw new RuntimeException("getConstantString called with illegal tag " + tag);
+                throw new IllegalArgumentException("getConstantString called with illegal tag " + tag);
         }
         // Finally get the string from the constant pool
         c = getConstant(i, Const.CONSTANT_Utf8);
@@ -326,7 +326,7 @@
      * @return Length of constant pool.
      */
     public int getLength() {
-        return constant_pool == null ? 0 : constant_pool.length;
+        return constantPool == null ? 0 : constantPool.length;
     }
 
 
@@ -334,15 +334,15 @@
      * @param constant Constant to set
      */
     public void setConstant( final int index, final Constant constant ) {
-        constant_pool[index] = constant;
+        constantPool[index] = constant;
     }
 
 
     /**
-     * @param constant_pool
+     * @param constantPool
      */
-    public void setConstantPool( final Constant[] constant_pool ) {
-        this.constant_pool = constant_pool;
+    public void setConstantPool( final Constant[] constantPool ) {
+        this.constantPool = constantPool;
     }
 
 
@@ -352,8 +352,8 @@
     @Override
     public String toString() {
         final StringBuilder buf = new StringBuilder();
-        for (int i = 1; i < constant_pool.length; i++) {
-            buf.append(i).append(")").append(constant_pool[i]).append("\n");
+        for (int i = 1; i < constantPool.length; i++) {
+            buf.append(i).append(")").append(constantPool[i]).append("\n");
         }
         return buf.toString();
     }
@@ -366,10 +366,10 @@
         ConstantPool c = null;
         try {
             c = (ConstantPool) clone();
-            c.constant_pool = new Constant[constant_pool.length];
-            for (int i = 1; i < constant_pool.length; i++) {
-                if (constant_pool[i] != null) {
-                    c.constant_pool[i] = constant_pool[i].copy();
+            c.constantPool = new Constant[constantPool.length];
+            for (int i = 1; i < constantPool.length; i++) {
+                if (constantPool[i] != null) {
+                    c.constantPool[i] = constantPool[i].copy();
                 }
             }
         } catch (final CloneNotSupportedException e) {
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantString.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantString.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantString.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantString.java	2022-04-19 19:38:30.000000000 +0000
@@ -35,7 +35,7 @@
  */
 public final class ConstantString extends Constant implements ConstantObject {
 
-    private int string_index; // Identical to ConstantClass except for this name
+    private int stringIndex; // Identical to ConstantClass except for this name
 
 
     /**
@@ -58,11 +58,11 @@
 
 
     /**
-     * @param string_index Index of Constant_Utf8 in constant pool
+     * @param stringIndex Index of Constant_Utf8 in constant pool
      */
-    public ConstantString(final int string_index) {
+    public ConstantString(final int stringIndex) {
         super(Const.CONSTANT_String);
-        this.string_index = string_index;
+        this.stringIndex = stringIndex;
     }
 
 
@@ -88,7 +88,7 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         file.writeByte(super.getTag());
-        file.writeShort(string_index);
+        file.writeShort(stringIndex);
     }
 
 
@@ -96,15 +96,15 @@
      * @return Index in constant pool of the string (ConstantUtf8).
      */
     public int getStringIndex() {
-        return string_index;
+        return stringIndex;
     }
 
 
     /**
-     * @param string_index the index into the constant of the string value
+     * @param stringIndex the index into the constant of the string value
      */
-    public void setStringIndex( final int string_index ) {
-        this.string_index = string_index;
+    public void setStringIndex( final int stringIndex ) {
+        this.stringIndex = stringIndex;
     }
 
 
@@ -113,7 +113,7 @@
      */
     @Override
     public String toString() {
-        return super.toString() + "(string_index = " + string_index + ")";
+        return super.toString() + "(stringIndex = " + stringIndex + ")";
     }
 
 
@@ -121,7 +121,7 @@
      */
     @Override
     public Object getConstantValue( final ConstantPool cp ) {
-        final Constant c = cp.getConstant(string_index, Const.CONSTANT_Utf8);
+        final Constant c = cp.getConstant(stringIndex, Const.CONSTANT_Utf8);
         return ((ConstantUtf8) c).getBytes();
     }
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,7 +36,7 @@
  */
 public final class ConstantValue extends Attribute {
 
-    private int constantvalue_index;
+    private int constantValueIndex;
 
 
     /**
@@ -65,13 +65,13 @@
     /**
      * @param name_index Name index in constant pool
      * @param length Content length in bytes
-     * @param constantvalue_index Index in constant pool
+     * @param constantValueIndex Index in constant pool
      * @param constant_pool Array of constants
      */
-    public ConstantValue(final int name_index, final int length, final int constantvalue_index,
+    public ConstantValue(final int name_index, final int length, final int constantValueIndex,
             final ConstantPool constant_pool) {
         super(Const.ATTR_CONSTANT_VALUE, name_index, length, constant_pool);
-        this.constantvalue_index = constantvalue_index;
+        this.constantValueIndex = constantValueIndex;
     }
 
 
@@ -97,7 +97,7 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(constantvalue_index);
+        file.writeShort(constantValueIndex);
     }
 
 
@@ -105,15 +105,15 @@
      * @return Index in constant pool of constant value.
      */
     public int getConstantValueIndex() {
-        return constantvalue_index;
+        return constantValueIndex;
     }
 
 
     /**
-     * @param constantvalue_index the index info the constant pool of this constant value
+     * @param constantValueIndex the index info the constant pool of this constant value
      */
-    public void setConstantValueIndex( final int constantvalue_index ) {
-        this.constantvalue_index = constantvalue_index;
+    public void setConstantValueIndex( final int constantValueIndex ) {
+        this.constantValueIndex = constantValueIndex;
     }
 
 
@@ -122,7 +122,7 @@
      */
     @Override
     public String toString() {
-        Constant c = super.getConstantPool().getConstant(constantvalue_index);
+        Constant c = super.getConstantPool().getConstant(constantValueIndex);
         String buf;
         int i;
         // Print constant to string depending on its type
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ElementValue.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ElementValue.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ElementValue.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ElementValue.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -26,7 +26,7 @@
 
 /**
  * @since 6.0
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public abstract class ElementValue
 {
@@ -105,7 +105,7 @@
                 return new ArrayElementValue(ARRAY, evalues, cpool);
 
             default:
-                throw new RuntimeException("Unexpected element value kind in annotation: " + type);
+                throw new IllegalArgumentException("Unexpected element value kind in annotation: " + type);
         }
     }
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EnumElementValue.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EnumElementValue.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EnumElementValue.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EnumElementValue.java	2022-04-19 19:38:30.000000000 +0000
@@ -41,7 +41,7 @@
     {
         super(type, cpool);
         if (type != ENUM_CONSTANT) {
-            throw new RuntimeException(
+            throw new IllegalArgumentException(
                     "Only element values of type enum can be built with this ctor - type specified: " + type);
         }
         this.typeIdx = typeIdx;
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java	2022-04-19 19:38:30.000000000 +0000
@@ -39,7 +39,7 @@
  */
 public final class ExceptionTable extends Attribute {
 
-    private int[] exception_index_table; // constant pool
+    private int[] exceptionIndexTable; // constant pool
 
 
     /**
@@ -54,30 +54,30 @@
     /**
      * @param name_index Index in constant pool
      * @param length Content length in bytes
-     * @param exception_index_table Table of indices in constant pool
+     * @param exceptionIndexTable Table of indices in constant pool
      * @param constant_pool Array of constants
      */
-    public ExceptionTable(final int name_index, final int length, final int[] exception_index_table,
+    public ExceptionTable(final int name_index, final int length, final int[] exceptionIndexTable,
             final ConstantPool constant_pool) {
         super(Const.ATTR_EXCEPTIONS, name_index, length, constant_pool);
-        this.exception_index_table = exception_index_table != null ? exception_index_table : new int[0];
+        this.exceptionIndexTable = exceptionIndexTable != null ? exceptionIndexTable : new int[0];
     }
 
 
     /**
      * Construct object from input stream.
-     * @param name_index Index in constant pool
+     * @param nameIndex Index in constant pool
      * @param length Content length in bytes
      * @param input Input stream
-     * @param constant_pool Array of constants
+     * @param constantPool Array of constants
      * @throws IOException
      */
-    ExceptionTable(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool) throws IOException {
-        this(name_index, length, (int[]) null, constant_pool);
+    ExceptionTable(final int nameIndex, final int length, final DataInput input, final ConstantPool constantPool) throws IOException {
+        this(nameIndex, length, (int[]) null, constantPool);
         final int number_of_exceptions = input.readUnsignedShort();
-        exception_index_table = new int[number_of_exceptions];
+        exceptionIndexTable = new int[number_of_exceptions];
         for (int i = 0; i < number_of_exceptions; i++) {
-            exception_index_table[i] = input.readUnsignedShort();
+            exceptionIndexTable[i] = input.readUnsignedShort();
         }
     }
 
@@ -104,8 +104,8 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(exception_index_table.length);
-        for (final int index : exception_index_table) {
+        file.writeShort(exceptionIndexTable.length);
+        for (final int index : exceptionIndexTable) {
             file.writeShort(index);
         }
     }
@@ -115,7 +115,7 @@
      * @return Array of indices into constant pool of thrown exceptions.
      */
     public int[] getExceptionIndexTable() {
-        return exception_index_table;
+        return exceptionIndexTable;
     }
 
 
@@ -123,7 +123,7 @@
      * @return Length of exception table.
      */
     public int getNumberOfExceptions() {
-        return exception_index_table == null ? 0 : exception_index_table.length;
+        return exceptionIndexTable == null ? 0 : exceptionIndexTable.length;
     }
 
 
@@ -131,9 +131,9 @@
      * @return class names of thrown exceptions
      */
     public String[] getExceptionNames() {
-        final String[] names = new String[exception_index_table.length];
-        for (int i = 0; i < exception_index_table.length; i++) {
-            names[i] = super.getConstantPool().getConstantString(exception_index_table[i],
+        final String[] names = new String[exceptionIndexTable.length];
+        for (int i = 0; i < exceptionIndexTable.length; i++) {
+            names[i] = super.getConstantPool().getConstantString(exceptionIndexTable[i],
                     Const.CONSTANT_Class).replace('/', '.');
         }
         return names;
@@ -141,11 +141,11 @@
 
 
     /**
-     * @param exception_index_table the list of exception indexes
+     * @param exceptionIndexTable the list of exception indexes
      * Also redefines number_of_exceptions according to table length.
      */
-    public void setExceptionIndexTable( final int[] exception_index_table ) {
-        this.exception_index_table = exception_index_table != null ? exception_index_table : new int[0];
+    public void setExceptionIndexTable( final int[] exceptionIndexTable ) {
+        this.exceptionIndexTable = exceptionIndexTable != null ? exceptionIndexTable : new int[0];
     }
 
 
@@ -157,10 +157,10 @@
         final StringBuilder buf = new StringBuilder();
         String str;
         buf.append("Exceptions: ");
-        for (int i = 0; i < exception_index_table.length; i++) {
-            str = super.getConstantPool().getConstantString(exception_index_table[i], Const.CONSTANT_Class);
+        for (int i = 0; i < exceptionIndexTable.length; i++) {
+            str = super.getConstantPool().getConstantString(exceptionIndexTable[i], Const.CONSTANT_Class);
             buf.append(Utility.compactClassName(str, false));
-            if (i < exception_index_table.length - 1) {
+            if (i < exceptionIndexTable.length - 1) {
                 buf.append(", ");
             }
         }
@@ -174,10 +174,10 @@
     @Override
     public Attribute copy( final ConstantPool _constant_pool ) {
         final ExceptionTable c = (ExceptionTable) clone();
-        if (exception_index_table != null) {
-            c.exception_index_table = new int[exception_index_table.length];
-            System.arraycopy(exception_index_table, 0, c.exception_index_table, 0,
-                    exception_index_table.length);
+        if (exceptionIndexTable != null) {
+            c.exceptionIndexTable = new int[exceptionIndexTable.length];
+            System.arraycopy(exceptionIndexTable, 0, c.exceptionIndexTable, 0,
+                    exceptionIndexTable.length);
         }
         c.setConstantPool(_constant_pool);
         return c;
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,10 +36,10 @@
  */
 public final class InnerClass implements Cloneable, Node {
 
-    private int inner_class_index;
-    private int outer_class_index;
-    private int inner_name_index;
-    private int inner_access_flags;
+    private int innerClassIndex;
+    private int outerClassIndex;
+    private int innerNameIndex;
+    private int innerAccessFlags;
 
 
     /**
@@ -63,17 +63,17 @@
 
 
     /**
-     * @param inner_class_index Class index in constant pool of inner class
-     * @param outer_class_index Class index in constant pool of outer class
-     * @param inner_name_index  Name index in constant pool of inner class
-     * @param inner_access_flags Access flags of inner class
-     */
-    public InnerClass(final int inner_class_index, final int outer_class_index, final int inner_name_index,
-            final int inner_access_flags) {
-        this.inner_class_index = inner_class_index;
-        this.outer_class_index = outer_class_index;
-        this.inner_name_index = inner_name_index;
-        this.inner_access_flags = inner_access_flags;
+     * @param innerClassIndex Class index in constant pool of inner class
+     * @param outerClassIndex Class index in constant pool of outer class
+     * @param innerNameIndex  Name index in constant pool of inner class
+     * @param innerAccessFlags Access flags of inner class
+     */
+    public InnerClass(final int innerClassIndex, final int outerClassIndex, final int innerNameIndex,
+            final int innerAccessFlags) {
+        this.innerClassIndex = innerClassIndex;
+        this.outerClassIndex = outerClassIndex;
+        this.innerNameIndex = innerNameIndex;
+        this.innerAccessFlags = innerAccessFlags;
     }
 
 
@@ -97,10 +97,10 @@
      * @throws IOException
      */
     public void dump( final DataOutputStream file ) throws IOException {
-        file.writeShort(inner_class_index);
-        file.writeShort(outer_class_index);
-        file.writeShort(inner_name_index);
-        file.writeShort(inner_access_flags);
+        file.writeShort(innerClassIndex);
+        file.writeShort(outerClassIndex);
+        file.writeShort(innerNameIndex);
+        file.writeShort(innerAccessFlags);
     }
 
 
@@ -108,7 +108,7 @@
      * @return access flags of inner class.
      */
     public int getInnerAccessFlags() {
-        return inner_access_flags;
+        return innerAccessFlags;
     }
 
 
@@ -116,7 +116,7 @@
      * @return class index of inner class.
      */
     public int getInnerClassIndex() {
-        return inner_class_index;
+        return innerClassIndex;
     }
 
 
@@ -124,7 +124,7 @@
      * @return name index of inner class.
      */
     public int getInnerNameIndex() {
-        return inner_name_index;
+        return innerNameIndex;
     }
 
 
@@ -132,39 +132,39 @@
      * @return class index of outer class.
      */
     public int getOuterClassIndex() {
-        return outer_class_index;
+        return outerClassIndex;
     }
 
 
     /**
-     * @param inner_access_flags access flags for this inner class
+     * @param innerAccessFlags access flags for this inner class
      */
-    public void setInnerAccessFlags( final int inner_access_flags ) {
-        this.inner_access_flags = inner_access_flags;
+    public void setInnerAccessFlags( final int innerAccessFlags ) {
+        this.innerAccessFlags = innerAccessFlags;
     }
 
 
     /**
-     * @param inner_class_index index into the constant pool for this class
+     * @param innerClassIndex index into the constant pool for this class
      */
-    public void setInnerClassIndex( final int inner_class_index ) {
-        this.inner_class_index = inner_class_index;
+    public void setInnerClassIndex( final int innerClassIndex ) {
+        this.innerClassIndex = innerClassIndex;
     }
 
 
     /**
-     * @param inner_name_index index into the constant pool for this class's name
+     * @param innerNameIndex index into the constant pool for this class's name
      */
-    public void setInnerNameIndex( final int inner_name_index ) { // TODO unused
-        this.inner_name_index = inner_name_index;
+    public void setInnerNameIndex( final int innerNameIndex ) { // TODO unused
+        this.innerNameIndex = innerNameIndex;
     }
 
 
     /**
-     * @param outer_class_index index into the constant pool for the owning class
+     * @param outerClassIndex index into the constant pool for the owning class
      */
-    public void setOuterClassIndex( final int outer_class_index ) { // TODO unused
-        this.outer_class_index = outer_class_index;
+    public void setOuterClassIndex( final int outerClassIndex ) { // TODO unused
+        this.outerClassIndex = outerClassIndex;
     }
 
 
@@ -173,34 +173,34 @@
      */
     @Override
     public String toString() {
-        return "InnerClass(" + inner_class_index + ", " + outer_class_index + ", "
-                + inner_name_index + ", " + inner_access_flags + ")";
+        return "InnerClass(" + innerClassIndex + ", " + outerClassIndex + ", "
+                + innerNameIndex + ", " + innerAccessFlags + ")";
     }
 
 
     /**
      * @return Resolved string representation
      */
-    public String toString( final ConstantPool constant_pool ) {
+    public String toString( final ConstantPool constantPool ) {
         String outer_class_name;
         String inner_name;
-        String inner_class_name = constant_pool.getConstantString(inner_class_index,
+        String inner_class_name = constantPool.getConstantString(innerClassIndex,
                 Const.CONSTANT_Class);
         inner_class_name = Utility.compactClassName(inner_class_name, false);
-        if (outer_class_index != 0) {
-            outer_class_name = constant_pool.getConstantString(outer_class_index,
+        if (outerClassIndex != 0) {
+            outer_class_name = constantPool.getConstantString(outerClassIndex,
                     Const.CONSTANT_Class);
             outer_class_name = " of class " + Utility.compactClassName(outer_class_name, false);
         } else {
             outer_class_name = "";
         }
-        if (inner_name_index != 0) {
-            inner_name = ((ConstantUtf8) constant_pool.getConstant(inner_name_index,
+        if (innerNameIndex != 0) {
+            inner_name = ((ConstantUtf8) constantPool.getConstant(innerNameIndex,
                     Const.CONSTANT_Utf8)).getBytes();
         } else {
             inner_name = "(anonymous)";
         }
-        String access = Utility.accessToString(inner_access_flags, true);
+        String access = Utility.accessToString(innerAccessFlags, true);
         access = access.isEmpty() ? "" : (access + " ");
         return "  " + access + inner_name + "=class " + inner_class_name + outer_class_name;
     }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java	2022-04-19 19:38:30.000000000 +0000
@@ -37,7 +37,7 @@
  */
 public final class InnerClasses extends Attribute {
 
-    private InnerClass[] inner_classes;
+    private InnerClass[] innerClasses;
 
 
     /**
@@ -52,13 +52,13 @@
     /**
      * @param name_index Index in constant pool to CONSTANT_Utf8
      * @param length Content length in bytes
-     * @param inner_classes array of inner classes attributes
+     * @param innerClasses array of inner classes attributes
      * @param constant_pool Array of constants
      */
-    public InnerClasses(final int name_index, final int length, final InnerClass[] inner_classes,
+    public InnerClasses(final int name_index, final int length, final InnerClass[] innerClasses,
             final ConstantPool constant_pool) {
         super(Const.ATTR_INNER_CLASSES, name_index, length, constant_pool);
-        this.inner_classes = inner_classes != null ? inner_classes : new InnerClass[0];
+        this.innerClasses = innerClasses != null ? innerClasses : new InnerClass[0];
     }
 
 
@@ -75,9 +75,9 @@
             throws IOException {
         this(name_index, length, (InnerClass[]) null, constant_pool);
         final int number_of_classes = input.readUnsignedShort();
-        inner_classes = new InnerClass[number_of_classes];
+        innerClasses = new InnerClass[number_of_classes];
         for (int i = 0; i < number_of_classes; i++) {
-            inner_classes[i] = new InnerClass(input);
+            innerClasses[i] = new InnerClass(input);
         }
     }
 
@@ -104,8 +104,8 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(inner_classes.length);
-        for (final InnerClass inner_class : inner_classes) {
+        file.writeShort(innerClasses.length);
+        for (final InnerClass inner_class : innerClasses) {
             inner_class.dump(file);
         }
     }
@@ -115,15 +115,15 @@
      * @return array of inner class "records"
      */
     public InnerClass[] getInnerClasses() {
-        return inner_classes;
+        return innerClasses;
     }
 
 
     /**
-     * @param inner_classes the array of inner classes
+     * @param innerClasses the array of inner classes
      */
-    public void setInnerClasses( final InnerClass[] inner_classes ) {
-        this.inner_classes = inner_classes != null ? inner_classes : new InnerClass[0];
+    public void setInnerClasses( final InnerClass[] innerClasses ) {
+        this.innerClasses = innerClasses != null ? innerClasses : new InnerClass[0];
     }
 
 
@@ -134,9 +134,9 @@
     public String toString() {
         final StringBuilder buf = new StringBuilder();
         buf.append("InnerClasses(");
-        buf.append(inner_classes.length);
+        buf.append(innerClasses.length);
         buf.append("):\n");
-        for (final InnerClass inner_class : inner_classes) {
+        for (final InnerClass inner_class : innerClasses) {
             buf.append(inner_class.toString(super.getConstantPool())).append("\n");
         }
         return buf.substring(0, buf.length()-1); // remove the last newline
@@ -150,9 +150,9 @@
     public Attribute copy( final ConstantPool _constant_pool ) {
         // TODO this could be recoded to use a lower level constructor after creating a copy of the inner classes
         final InnerClasses c = (InnerClasses) clone();
-        c.inner_classes = new InnerClass[inner_classes.length];
-        for (int i = 0; i < inner_classes.length; i++) {
-            c.inner_classes[i] = inner_classes[i].copy();
+        c.innerClasses = new InnerClass[innerClasses.length];
+        for (int i = 0; i < innerClasses.length; i++) {
+            c.innerClasses[i] = innerClasses[i].copy();
         }
         c.setConstantPool(_constant_pool);
         return c;
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -41,28 +41,28 @@
 /**
  * Represents a Java class, i.e., the data structures, constant pool,
  * fields, methods and commands contained in a Java .class file.
- * See JVM specification for details.
+ * See JVM specification for details.
  * The intent of this class is to represent a parsed or otherwise existing
  * class file.  Those interested in programatically generating classes
  * should see the ClassGen class.
 
  * @see com.sun.org.apache.bcel.internal.generic.ClassGen
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public class JavaClass extends AccessFlags implements Cloneable, Node, Comparable {
 
-    private String file_name;
-    private String package_name;
-    private String source_file_name = "";
-    private int class_name_index;
-    private int superclass_name_index;
-    private String class_name;
-    private String superclass_name;
+    private String fileName;
+    private String packageName;
+    private String sourceFileName = "";
+    private int classNameIndex;
+    private int superclassNameIndex;
+    private String className;
+    private String superclassName;
     private int major;
     private int minor; // Compiler version
-    private ConstantPool constant_pool; // Constant pool
+    private ConstantPool constantPool; // Constant pool
     private int[] interfaces; // implemented interfaces
-    private String[] interface_names;
+    private String[] interfaceNames;
     private Field[] fields; // Fields, i.e., variables of class
     private Method[] methods; // methods defined in the class
     private Attribute[] attributes; // attributes defined in the class
@@ -104,24 +104,24 @@
     /**
      * Constructor gets all contents as arguments.
      *
-     * @param class_name_index Index into constant pool referencing a
+     * @param classNameIndex Index into constant pool referencing a
      * ConstantClass that represents this class.
-     * @param superclass_name_index Index into constant pool referencing a
+     * @param superclassNameIndex Index into constant pool referencing a
      * ConstantClass that represents this class's superclass.
-     * @param file_name File name
+     * @param fileName File name
      * @param major Major compiler version
      * @param minor Minor compiler version
      * @param access_flags Access rights defined by bit flags
-     * @param constant_pool Array of constants
+     * @param constantPool Array of constants
      * @param interfaces Implemented interfaces
      * @param fields Class fields
      * @param methods Class methods
      * @param attributes Class attributes
      * @param source Read from file or generated in memory?
      */
-    public JavaClass(final int class_name_index, final int superclass_name_index,
-            final String file_name, final int major, final int minor, final int access_flags,
-            final ConstantPool constant_pool, int[] interfaces, Field[] fields,
+    public JavaClass(final int classNameIndex, final int superclassNameIndex,
+            final String fileName, final int major, final int minor, final int access_flags,
+            final ConstantPool constantPool, int[] interfaces, Field[] fields,
             Method[] methods, Attribute[] attributes, final byte source) {
         super(access_flags);
         if (interfaces == null) {
@@ -136,12 +136,12 @@
         if (methods == null) {
             methods = new Method[0];
         }
-        this.class_name_index = class_name_index;
-        this.superclass_name_index = superclass_name_index;
-        this.file_name = file_name;
+        this.classNameIndex = classNameIndex;
+        this.superclassNameIndex = superclassNameIndex;
+        this.fileName = fileName;
         this.major = major;
         this.minor = minor;
-        this.constant_pool = constant_pool;
+        this.constantPool = constantPool;
         this.interfaces = interfaces;
         this.fields = fields;
         this.methods = methods;
@@ -150,7 +150,7 @@
         // Get source file name if available
         for (final Attribute attribute : attributes) {
             if (attribute instanceof SourceFile) {
-                source_file_name = ((SourceFile) attribute).getSourceFileName();
+                sourceFileName = ((SourceFile) attribute).getSourceFileName();
                 break;
             }
         }
@@ -158,26 +158,26 @@
          * `ConstantClass' but we check that anyway via the
          * `ConstPool.getConstant' method.
          */
-        class_name = constant_pool.getConstantString(class_name_index, Const.CONSTANT_Class);
-        class_name = Utility.compactClassName(class_name, false);
-        final int index = class_name.lastIndexOf('.');
+        className = constantPool.getConstantString(classNameIndex, Const.CONSTANT_Class);
+        className = Utility.compactClassName(className, false);
+        final int index = className.lastIndexOf('.');
         if (index < 0) {
-            package_name = "";
+            packageName = "";
         } else {
-            package_name = class_name.substring(0, index);
+            packageName = className.substring(0, index);
         }
-        if (superclass_name_index > 0) {
+        if (superclassNameIndex > 0) {
             // May be zero -> class is java.lang.Object
-            superclass_name = constant_pool.getConstantString(superclass_name_index,
+            superclassName = constantPool.getConstantString(superclassNameIndex,
                     Const.CONSTANT_Class);
-            superclass_name = Utility.compactClassName(superclass_name, false);
+            superclassName = Utility.compactClassName(superclassName, false);
         } else {
-            superclass_name = "java.lang.Object";
+            superclassName = "java.lang.Object";
         }
-        interface_names = new String[interfaces.length];
+        interfaceNames = new String[interfaces.length];
         for (int i = 0; i < interfaces.length; i++) {
-            final String str = constant_pool.getConstantString(interfaces[i], Const.CONSTANT_Class);
-            interface_names[i] = Utility.compactClassName(str, false);
+            final String str = constantPool.getConstantString(interfaces[i], Const.CONSTANT_Class);
+            interfaceNames[i] = Utility.compactClassName(str, false);
         }
     }
 
@@ -185,24 +185,24 @@
     /**
      * Constructor gets all contents as arguments.
      *
-     * @param class_name_index Class name
-     * @param superclass_name_index Superclass name
-     * @param file_name File name
+     * @param classNameIndex Class name
+     * @param superclassNameIndex Superclass name
+     * @param fileName File name
      * @param major Major compiler version
      * @param minor Minor compiler version
      * @param access_flags Access rights defined by bit flags
-     * @param constant_pool Array of constants
+     * @param constantPool Array of constants
      * @param interfaces Implemented interfaces
      * @param fields Class fields
      * @param methods Class methods
      * @param attributes Class attributes
      */
-    public JavaClass(final int class_name_index, final int superclass_name_index,
-            final String file_name, final int major, final int minor, final int access_flags,
-            final ConstantPool constant_pool, final int[] interfaces, final Field[] fields,
+    public JavaClass(final int classNameIndex, final int superclassNameIndex,
+            final String fileName, final int major, final int minor, final int access_flags,
+            final ConstantPool constantPool, final int[] interfaces, final Field[] fields,
             final Method[] methods, final Attribute[] attributes) {
-        this(class_name_index, superclass_name_index, file_name, major, minor, access_flags,
-                constant_pool, interfaces, fields, methods, attributes, HEAP);
+        this(classNameIndex, superclassNameIndex, fileName, major, minor, access_flags,
+                constantPool, interfaces, fields, methods, attributes, HEAP);
     }
 
 
@@ -251,7 +251,7 @@
 
 
     /**
-     * Dump class to a file named file_name.
+     * Dump class to a file named fileName.
      *
      * @param _file_name Output file name
      * @throws IOException
@@ -303,10 +303,10 @@
         file.writeInt(Const.JVM_CLASSFILE_MAGIC);
         file.writeShort(minor);
         file.writeShort(major);
-        constant_pool.dump(file);
+        constantPool.dump(file);
         file.writeShort(super.getAccessFlags());
-        file.writeShort(class_name_index);
-        file.writeShort(superclass_name_index);
+        file.writeShort(classNameIndex);
+        file.writeShort(superclassNameIndex);
         file.writeShort(interfaces.length);
         for (final int interface1 : interfaces) {
             file.writeShort(interface1);
@@ -354,7 +354,7 @@
      * @return Class name.
      */
     public String getClassName() {
-        return class_name;
+        return className;
     }
 
 
@@ -362,7 +362,7 @@
      * @return Package name.
      */
     public String getPackageName() {
-        return package_name;
+        return packageName;
     }
 
 
@@ -370,7 +370,7 @@
      * @return Class name index.
      */
     public int getClassNameIndex() {
-        return class_name_index;
+        return classNameIndex;
     }
 
 
@@ -378,7 +378,7 @@
      * @return Constant pool.
      */
     public ConstantPool getConstantPool() {
-        return constant_pool;
+        return constantPool;
     }
 
 
@@ -396,7 +396,7 @@
      * @return File name of class, aka SourceFile attribute value
      */
     public String getFileName() {
-        return file_name;
+        return fileName;
     }
 
 
@@ -404,7 +404,7 @@
      * @return Names of implemented interfaces.
      */
     public String[] getInterfaceNames() {
-        return interface_names;
+        return interfaceNames;
     }
 
 
@@ -459,7 +459,7 @@
      * @return sbsolute path to file where this class was read from
      */
     public String getSourceFileName() {
-        return source_file_name;
+        return sourceFileName;
     }
 
 
@@ -471,7 +471,7 @@
      * @return Superclass name.
      */
     public String getSuperclassName() {
-        return superclass_name;
+        return superclassName;
     }
 
 
@@ -479,7 +479,7 @@
      * @return Class name index.
      */
     public int getSuperclassNameIndex() {
-        return superclass_name_index;
+        return superclassNameIndex;
     }
 
     /**
@@ -491,26 +491,26 @@
 
 
     /**
-     * @param class_name .
+     * @param className .
      */
-    public void setClassName( final String class_name ) {
-        this.class_name = class_name;
+    public void setClassName( final String className ) {
+        this.className = className;
     }
 
 
     /**
-     * @param class_name_index .
+     * @param classNameIndex .
      */
-    public void setClassNameIndex( final int class_name_index ) {
-        this.class_name_index = class_name_index;
+    public void setClassNameIndex( final int classNameIndex ) {
+        this.classNameIndex = classNameIndex;
     }
 
 
     /**
-     * @param constant_pool .
+     * @param constantPool .
      */
-    public void setConstantPool( final ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
+    public void setConstantPool( final ConstantPool constantPool ) {
+        this.constantPool = constantPool;
     }
 
 
@@ -525,16 +525,16 @@
     /**
      * Set File name of class, aka SourceFile attribute value
      */
-    public void setFileName( final String file_name ) {
-        this.file_name = file_name;
+    public void setFileName( final String fileName ) {
+        this.fileName = fileName;
     }
 
 
     /**
-     * @param interface_names .
+     * @param interfaceNames .
      */
-    public void setInterfaceNames( final String[] interface_names ) {
-        this.interface_names = interface_names;
+    public void setInterfaceNames( final String[] interfaceNames ) {
+        this.interfaceNames = interfaceNames;
     }
 
 
@@ -573,24 +573,24 @@
     /**
      * Set absolute path to file this class was read from.
      */
-    public void setSourceFileName( final String source_file_name ) {
-        this.source_file_name = source_file_name;
+    public void setSourceFileName( final String sourceFileName ) {
+        this.sourceFileName = sourceFileName;
     }
 
 
     /**
-     * @param superclass_name .
+     * @param superclassName .
      */
-    public void setSuperclassName( final String superclass_name ) {
-        this.superclass_name = superclass_name;
+    public void setSuperclassName( final String superclassName ) {
+        this.superclassName = superclassName;
     }
 
 
     /**
-     * @param superclass_name_index .
+     * @param superclassNameIndex .
      */
-    public void setSuperclassNameIndex( final int superclass_name_index ) {
-        this.superclass_name_index = superclass_name_index;
+    public void setSuperclassNameIndex( final int superclassNameIndex ) {
+        this.superclassNameIndex = superclassNameIndex;
     }
 
 
@@ -603,24 +603,24 @@
         access = access.isEmpty() ? "" : (access + " ");
         final StringBuilder buf = new StringBuilder(128);
         buf.append(access).append(Utility.classOrInterface(super.getAccessFlags())).append(" ").append(
-                class_name).append(" extends ").append(
-                Utility.compactClassName(superclass_name, false)).append('\n');
+                className).append(" extends ").append(
+                Utility.compactClassName(superclassName, false)).append('\n');
         final int size = interfaces.length;
         if (size > 0) {
             buf.append("implements\t\t");
             for (int i = 0; i < size; i++) {
-                buf.append(interface_names[i]);
+                buf.append(interfaceNames[i]);
                 if (i < size - 1) {
                     buf.append(", ");
                 }
             }
             buf.append('\n');
         }
-        buf.append("file name\t\t").append(file_name).append('\n');
-        buf.append("compiled from\t\t").append(source_file_name).append('\n');
+        buf.append("file name\t\t").append(fileName).append('\n');
+        buf.append("compiled from\t\t").append(sourceFileName).append('\n');
         buf.append("compiler version\t").append(major).append(".").append(minor).append('\n');
         buf.append("access flags\t\t").append(super.getAccessFlags()).append('\n');
-        buf.append("constant pool\t\t").append(constant_pool.getLength()).append(" entries\n");
+        buf.append("constant pool\t\t").append(constantPool.getLength()).append(" entries\n");
         buf.append("ACC_SUPER flag\t\t").append(isSuper()).append("\n");
         if (attributes.length > 0) {
             buf.append("\nAttribute(s):\n");
@@ -668,20 +668,20 @@
         JavaClass c = null;
         try {
             c = (JavaClass) clone();
-            c.constant_pool = constant_pool.copy();
+            c.constantPool = constantPool.copy();
             c.interfaces = interfaces.clone();
-            c.interface_names = interface_names.clone();
+            c.interfaceNames = interfaceNames.clone();
             c.fields = new Field[fields.length];
             for (int i = 0; i < fields.length; i++) {
-                c.fields[i] = fields[i].copy(c.constant_pool);
+                c.fields[i] = fields[i].copy(c.constantPool);
             }
             c.methods = new Method[methods.length];
             for (int i = 0; i < methods.length; i++) {
-                c.methods[i] = methods[i].copy(c.constant_pool);
+                c.methods[i] = methods[i].copy(c.constantPool);
             }
             c.attributes = new Attribute[attributes.length];
             for (int i = 0; i < attributes.length; i++) {
-                c.attributes[i] = attributes[i].copy(c.constant_pool);
+                c.attributes[i] = attributes[i].copy(c.constantPool);
             }
         } catch (final CloneNotSupportedException e) {
             // TODO should this throw?
@@ -724,7 +724,7 @@
                   final InnerClass[] innerClasses = ((InnerClasses) attribute).getInnerClasses();
                   for (final InnerClass innerClasse : innerClasses) {
                       boolean innerClassAttributeRefersToMe = false;
-                      String inner_class_name = constant_pool.getConstantString(innerClasse.getInnerClassIndex(),
+                      String inner_class_name = constantPool.getConstantString(innerClasse.getInnerClassIndex(),
                                  Const.CONSTANT_Class);
                       inner_class_name = Utility.compactClassName(inner_class_name, false);
                       if (inner_class_name.equals(getClassName())) {
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java	2022-04-19 19:38:30.000000000 +0000
@@ -35,10 +35,10 @@
 public final class LineNumber implements Cloneable, Node {
 
     /** Program Counter (PC) corresponds to line */
-    private short start_pc;
+    private short startPc;
 
     /** number in source file */
-    private short line_number;
+    private short lineNumber;
 
     /**
      * Initialize from another object.
@@ -62,12 +62,12 @@
 
 
     /**
-     * @param start_pc Program Counter (PC) corresponds to
-     * @param line_number line number in source file
+     * @param startPc Program Counter (PC) corresponds to
+     * @param lineNumber line number in source file
      */
-    public LineNumber(final int start_pc, final int line_number) {
-        this.start_pc = (short) start_pc;
-        this.line_number = (short)line_number;
+    public LineNumber(final int startPc, final int lineNumber) {
+        this.startPc = (short) startPc;
+        this.lineNumber = (short)lineNumber;
     }
 
 
@@ -91,8 +91,8 @@
      * @throws IOException if an I/O Exception occurs in writeShort
      */
     public void dump( final DataOutputStream file ) throws IOException {
-        file.writeShort(start_pc);
-        file.writeShort(line_number);
+        file.writeShort(startPc);
+        file.writeShort(lineNumber);
     }
 
 
@@ -100,7 +100,7 @@
      * @return Corresponding source line
      */
     public int getLineNumber() {
-        return 0xffff & line_number;
+        return 0xffff & lineNumber;
     }
 
 
@@ -108,23 +108,23 @@
      * @return PC in code
      */
     public int getStartPC() {
-        return  0xffff & start_pc;
+        return  0xffff & startPc;
     }
 
 
     /**
-     * @param line_number the source line number
+     * @param lineNumber the source line number
      */
-    public void setLineNumber( final int line_number ) {
-        this.line_number = (short) line_number;
+    public void setLineNumber( final int lineNumber ) {
+        this.lineNumber = (short) lineNumber;
     }
 
 
     /**
-     * @param start_pc the pc for this line number
+     * @param startPc the pc for this line number
      */
-    public void setStartPC( final int start_pc ) {
-        this.start_pc = (short) start_pc;
+    public void setStartPC( final int startPc ) {
+        this.startPc = (short) startPc;
     }
 
 
@@ -133,7 +133,7 @@
      */
     @Override
     public String toString() {
-        return "LineNumber(" + start_pc + ", " + line_number + ")";
+        return "LineNumber(" + startPc + ", " + lineNumber + ")";
     }
 
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -32,12 +32,12 @@
  *
  * @see     Code
  * @see LineNumber
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public final class LineNumberTable extends Attribute {
 
     private static final int MAX_LINE_LENGTH = 72;
-    private LineNumber[] line_number_table; // Table of line/numbers pairs
+    private LineNumber[] lineNumberTable; // Table of line/numbers pairs
 
 
     /*
@@ -52,13 +52,13 @@
     /*
      * @param name_index Index of name
      * @param length Content length in bytes
-     * @param line_number_table Table of line/numbers pairs
+     * @param lineNumberTable Table of line/numbers pairs
      * @param constant_pool Array of constants
      */
     public LineNumberTable(final int name_index, final int length, final LineNumber[] line_number_table,
             final ConstantPool constant_pool) {
         super(Const.ATTR_LINE_NUMBER_TABLE, name_index, length, constant_pool);
-        this.line_number_table = line_number_table;
+        this.lineNumberTable = line_number_table;
     }
 
     /**
@@ -73,9 +73,9 @@
             throws IOException {
         this(name_index, length, (LineNumber[]) null, constant_pool);
         final int line_number_table_length = input.readUnsignedShort();
-        line_number_table = new LineNumber[line_number_table_length];
+        lineNumberTable = new LineNumber[line_number_table_length];
         for (int i = 0; i < line_number_table_length; i++) {
-            line_number_table[i] = new LineNumber(input);
+            lineNumberTable[i] = new LineNumber(input);
         }
     }
 
@@ -100,8 +100,8 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(line_number_table.length);
-        for (final LineNumber lineNumber : line_number_table) {
+        file.writeShort(lineNumberTable.length);
+        for (final LineNumber lineNumber : lineNumberTable) {
             lineNumber.dump(file);
         }
     }
@@ -110,14 +110,14 @@
      * @return Array of (pc offset, line number) pairs.
      */
     public LineNumber[] getLineNumberTable() {
-        return line_number_table;
+        return lineNumberTable;
     }
 
     /**
-     * @param line_number_table the line number entries for this table
+     * @param lineNumberTable the line number entries for this table
      */
-    public void setLineNumberTable( final LineNumber[] line_number_table ) {
-        this.line_number_table = line_number_table;
+    public void setLineNumberTable( final LineNumber[] lineNumberTable ) {
+        this.lineNumberTable = lineNumberTable;
     }
 
     /**
@@ -128,12 +128,12 @@
         final StringBuilder buf = new StringBuilder();
         final StringBuilder line = new StringBuilder();
 
-        for (int i = 0; i < line_number_table.length; i++) {
-            line.append(line_number_table[i].toString());
-            if (i < line_number_table.length - 1) {
+        for (int i = 0; i < lineNumberTable.length; i++) {
+            line.append(lineNumberTable[i].toString());
+            if (i < lineNumberTable.length - 1) {
                 line.append(", ");
             }
-            if ((line.length() > MAX_LINE_LENGTH) && (i < line_number_table.length - 1)) {
+            if ((line.length() > MAX_LINE_LENGTH) && (i < lineNumberTable.length - 1)) {
                 line.append(SecuritySupport.NEWLINE);
                 buf.append(line);
                 line.setLength(0);
@@ -151,7 +151,7 @@
      */
     public int getSourceLine( final int pos ) {
         int l = 0;
-        int r = line_number_table.length - 1;
+        int r = lineNumberTable.length - 1;
         if (r < 0) {
             return -1;
         }
@@ -161,9 +161,9 @@
          */
         do {
             final int i = (l + r) >>> 1;
-            final int j = line_number_table[i].getStartPC();
+            final int j = lineNumberTable[i].getStartPC();
             if (j == pos) {
-                return line_number_table[i].getLineNumber();
+                return lineNumberTable[i].getLineNumber();
             } else if (pos < j) {
                 r = i - 1;
             } else {
@@ -184,7 +184,7 @@
         if (min_index < 0) {
             return -1;
         }
-        return line_number_table[min_index].getLineNumber();
+        return lineNumberTable[min_index].getLineNumber();
     }
 
     /**
@@ -193,17 +193,18 @@
     @Override
     public Attribute copy( final ConstantPool _constant_pool ) {
         // TODO could use the lower level constructor and thereby allow
-        // line_number_table to be made final
+        // lineNumberTable to be made final
         final LineNumberTable c = (LineNumberTable) clone();
-        c.line_number_table = new LineNumber[line_number_table.length];
-        for (int i = 0; i < line_number_table.length; i++) {
-            c.line_number_table[i] = line_number_table[i].copy();
+        c.lineNumberTable = new LineNumber[lineNumberTable.length];
+        for (int i = 0; i < lineNumberTable.length; i++) {
+            c.lineNumberTable[i] = lineNumberTable[i].copy();
         }
         c.setConstantPool(_constant_pool);
         return c;
     }
 
+
     public int getTableLength() {
-        return line_number_table == null ? 0 : line_number_table.length;
+        return lineNumberTable == null ? 0 : lineNumberTable.length;
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariable.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariable.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariable.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariable.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -32,27 +32,27 @@
  * to represent an element of the LocalVariableTable as well as an element
  * of the LocalVariableTypeTable.  The nomenclature used here may be a bit confusing;
  * while the two items have the same layout in a class file, a LocalVariableTable
- * attribute contains a descriptor_index, not a signature_index.  The
- * LocalVariableTypeTable attribute does have a signature_index.
+ * attribute contains a descriptor_index, not a signatureIndex.  The
+ * LocalVariableTypeTable attribute does have a signatureIndex.
  * @see com.sun.org.apache.bcel.internal.classfile.Utility for more details on the difference.
  *
  * @see     LocalVariableTable
  * @see     LocalVariableTypeTable
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public final class LocalVariable implements Cloneable, Node {
 
-    private int start_pc; // Range in which the variable is valid
+    private int startPc; // Range in which the variable is valid
     private int length;
-    private int name_index; // Index in constant pool of variable name
+    private int nameIndex; // Index in constant pool of variable name
     // Technically, a decscriptor_index for a local variable table entry
-    // and a signature_index for a local variable type table entry.
-    private int signature_index; // Index of variable signature
+    // and a signatureIndex for a local variable type table entry.
+    private int signatureIndex; // Index of variable signature
     private int index; /* Variable is index'th local variable on
      * this method's frame.
      */
-    private ConstantPool constant_pool;
-    private int orig_index; // never changes; used to match up with LocalVariableTypeTable entries
+    private ConstantPool constantPool;
+    private int origIndex; // never changes; used to match up with LocalVariableTypeTable entries
 
 
     /**
@@ -64,7 +64,7 @@
     public LocalVariable(final LocalVariable localVariable) {
         this(localVariable.getStartPC(), localVariable.getLength(), localVariable.getNameIndex(),
                 localVariable.getSignatureIndex(), localVariable.getIndex(), localVariable.getConstantPool());
-        this.orig_index = localVariable.getOrigIndex();
+        this.origIndex = localVariable.getOrigIndex();
     }
 
     /**
@@ -79,43 +79,43 @@
 
 
     /**
-     * @param start_pc Range in which the variable
+     * @param startPc Range in which the variable
      * @param length ... is valid
-     * @param name_index Index in constant pool of variable name
-     * @param signature_index Index of variable's signature
+     * @param nameIndex Index in constant pool of variable name
+     * @param signatureIndex Index of variable's signature
      * @param index Variable is `index'th local variable on the method's frame
-     * @param constant_pool Array of constants
+     * @param constantPool Array of constants
      */
-    public LocalVariable(final int start_pc, final int length, final int name_index, final int signature_index, final int index,
-            final ConstantPool constant_pool) {
-        this.start_pc = start_pc;
+    public LocalVariable(final int startPc, final int length, final int nameIndex, final int signatureIndex, final int index,
+            final ConstantPool constantPool) {
+        this.startPc = startPc;
         this.length = length;
-        this.name_index = name_index;
-        this.signature_index = signature_index;
+        this.nameIndex = nameIndex;
+        this.signatureIndex = signatureIndex;
         this.index = index;
-        this.constant_pool = constant_pool;
-        this.orig_index = index;
+        this.constantPool = constantPool;
+        this.origIndex = index;
     }
 
 
     /**
-     * @param start_pc Range in which the variable
+     * @param startPc Range in which the variable
      * @param length ... is valid
-     * @param name_index Index in constant pool of variable name
-     * @param signature_index Index of variable's signature
+     * @param nameIndex Index in constant pool of variable name
+     * @param signatureIndex Index of variable's signature
      * @param index Variable is `index'th local variable on the method's frame
-     * @param constant_pool Array of constants
-     * @param orig_index Variable is `index'th local variable on the method's frame prior to any changes
+     * @param constantPool Array of constants
+     * @param origIndex Variable is `index'th local variable on the method's frame prior to any changes
      */
-    public LocalVariable(final int start_pc, final int length, final int name_index, final int signature_index, final int index,
-            final ConstantPool constant_pool, final int orig_index) {
-        this.start_pc = start_pc;
+    public LocalVariable(final int startPc, final int length, final int nameIndex, final int signatureIndex, final int index,
+            final ConstantPool constantPool, final int origIndex) {
+        this.startPc = startPc;
         this.length = length;
-        this.name_index = name_index;
-        this.signature_index = signature_index;
+        this.nameIndex = nameIndex;
+        this.signatureIndex = signatureIndex;
         this.index = index;
-        this.constant_pool = constant_pool;
-        this.orig_index = orig_index;
+        this.constantPool = constantPool;
+        this.origIndex = origIndex;
     }
 
 
@@ -140,10 +140,10 @@
      * @see java.io.FilterOutputStream#out
      */
     public void dump(final DataOutputStream dataOutputStream) throws IOException {
-        dataOutputStream.writeShort(start_pc);
+        dataOutputStream.writeShort(startPc);
         dataOutputStream.writeShort(length);
-        dataOutputStream.writeShort(name_index);
-        dataOutputStream.writeShort(signature_index);
+        dataOutputStream.writeShort(nameIndex);
+        dataOutputStream.writeShort(signatureIndex);
         dataOutputStream.writeShort(index);
     }
 
@@ -151,7 +151,7 @@
      * @return Constant pool used by this object.
      */
     public ConstantPool getConstantPool() {
-        return constant_pool;
+        return constantPool;
     }
 
 
@@ -168,7 +168,7 @@
      */
     public String getName() {
         ConstantUtf8 c;
-        c = (ConstantUtf8) constant_pool.getConstant(name_index, Const.CONSTANT_Utf8);
+        c = (ConstantUtf8) constantPool.getConstant(nameIndex, Const.CONSTANT_Utf8);
         return c.getBytes();
     }
 
@@ -177,7 +177,7 @@
      * @return Index in constant pool of variable name.
      */
     public int getNameIndex() {
-        return name_index;
+        return nameIndex;
     }
 
 
@@ -186,7 +186,7 @@
      */
     public String getSignature() {
         ConstantUtf8 c;
-        c = (ConstantUtf8) constant_pool.getConstant(signature_index, Const.CONSTANT_Utf8);
+        c = (ConstantUtf8) constantPool.getConstant(signatureIndex, Const.CONSTANT_Utf8);
         return c.getBytes();
     }
 
@@ -195,7 +195,7 @@
      * @return Index in constant pool of variable signature.
      */
     public int getSignatureIndex() {
-        return signature_index;
+        return signatureIndex;
     }
 
 
@@ -211,7 +211,7 @@
      * @return index of register where variable was originally stored
      */
     public int getOrigIndex() {
-        return orig_index;
+        return origIndex;
     }
 
 
@@ -219,7 +219,7 @@
      * @return Start of range where the variable is valid
      */
     public int getStartPC() {
-        return start_pc;
+        return startPc;
     }
 
 
@@ -230,16 +230,16 @@
         final String name = getName();
         final String signature = Utility.signatureToString(getSignature(), false);
         final String label = "LocalVariable" + (typeTable ? "Types" : "" );
-        return label + "(start_pc = " + start_pc + ", length = " + length + ", index = "
+        return label + "(startPc = " + startPc + ", length = " + length + ", index = "
                 + index + ":" + signature + " " + name + ")";
     }
 
 
     /**
-     * @param constant_pool Constant pool to be used for this object.
+     * @param constantPool Constant pool to be used for this object.
      */
-    public void setConstantPool( final ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
+    public void setConstantPool( final ConstantPool constantPool ) {
+        this.constantPool = constantPool;
     }
 
 
@@ -252,18 +252,18 @@
 
 
     /**
-     * @param name_index the index into the constant pool for the name of this variable
+     * @param nameIndex the index into the constant pool for the name of this variable
      */
-    public void setNameIndex( final int name_index ) { // TODO unused
-        this.name_index = name_index;
+    public void setNameIndex( final int nameIndex ) { // TODO unused
+        this.nameIndex = nameIndex;
     }
 
 
     /**
-     * @param signature_index the index into the constant pool for the signature of this variable
+     * @param signatureIndex the index into the constant pool for the signature of this variable
      */
-    public void setSignatureIndex( final int signature_index ) { // TODO unused
-        this.signature_index = signature_index;
+    public void setSignatureIndex( final int signatureIndex ) { // TODO unused
+        this.signatureIndex = signatureIndex;
     }
 
 
@@ -276,10 +276,10 @@
 
 
     /**
-     * @param start_pc Specify range where the local variable is valid.
+     * @param startPc Specify range where the local variable is valid.
      */
-    public void setStartPC( final int start_pc ) { // TODO unused
-        this.start_pc = start_pc;
+    public void setStartPC( final int startPc ) { // TODO unused
+        this.startPc = startPc;
     }
 
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,7 +36,7 @@
  */
 public class LocalVariableTable extends Attribute {
 
-    private LocalVariable[] local_variable_table; // variables
+    private LocalVariable[] localVariableTable; // variables
 
 
     /**
@@ -49,15 +49,15 @@
 
 
     /**
-     * @param name_index Index in constant pool to `LocalVariableTable'
+     * @param nameIndex Index in constant pool to `LocalVariableTable'
      * @param length Content length in bytes
-     * @param local_variable_table Table of local variables
-     * @param constant_pool Array of constants
+     * @param localVariableTable Table of local variables
+     * @param constantPool Array of constants
      */
-    public LocalVariableTable(final int name_index, final int length, final LocalVariable[] local_variable_table,
-            final ConstantPool constant_pool) {
-        super(Const.ATTR_LOCAL_VARIABLE_TABLE, name_index, length, constant_pool);
-        this.local_variable_table = local_variable_table;
+    public LocalVariableTable(final int nameIndex, final int length, final LocalVariable[] localVariableTable,
+            final ConstantPool constantPool) {
+        super(Const.ATTR_LOCAL_VARIABLE_TABLE, nameIndex, length, constantPool);
+        this.localVariableTable = localVariableTable;
     }
 
 
@@ -73,9 +73,9 @@
             throws IOException {
         this(name_index, length, (LocalVariable[]) null, constant_pool);
         final int local_variable_table_length = input.readUnsignedShort();
-        local_variable_table = new LocalVariable[local_variable_table_length];
+        localVariableTable = new LocalVariable[local_variable_table_length];
         for (int i = 0; i < local_variable_table_length; i++) {
-            local_variable_table[i] = new LocalVariable(input, constant_pool);
+            localVariableTable[i] = new LocalVariable(input, constant_pool);
         }
     }
 
@@ -102,8 +102,8 @@
     @Override
     public final void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(local_variable_table.length);
-        for (final LocalVariable variable : local_variable_table) {
+        file.writeShort(localVariableTable.length);
+        for (final LocalVariable variable : localVariableTable) {
             variable.dump(file);
         }
     }
@@ -113,7 +113,7 @@
      * @return Array of local variables of method.
      */
     public final LocalVariable[] getLocalVariableTable() {
-        return local_variable_table;
+        return localVariableTable;
     }
 
 
@@ -128,7 +128,7 @@
      */
     @java.lang.Deprecated
     public final LocalVariable getLocalVariable( final int index ) {
-        for (final LocalVariable variable : local_variable_table) {
+        for (final LocalVariable variable : localVariableTable) {
             if (variable.getIndex() == index) {
                 return variable;
             }
@@ -145,7 +145,7 @@
      * @return the LocalVariable that matches or null if not found
      */
     public final LocalVariable getLocalVariable( final int index, final int pc ) {
-        for (final LocalVariable variable : local_variable_table) {
+        for (final LocalVariable variable : localVariableTable) {
             if (variable.getIndex() == index) {
                 final int start_pc = variable.getStartPC();
                 final int end_pc = start_pc + variable.getLength();
@@ -159,7 +159,7 @@
 
 
     public final void setLocalVariableTable( final LocalVariable[] local_variable_table ) {
-        this.local_variable_table = local_variable_table;
+        this.localVariableTable = local_variable_table;
     }
 
 
@@ -169,9 +169,9 @@
     @Override
     public final String toString() {
         final StringBuilder buf = new StringBuilder();
-        for (int i = 0; i < local_variable_table.length; i++) {
-            buf.append(local_variable_table[i]);
-            if (i < local_variable_table.length - 1) {
+        for (int i = 0; i < localVariableTable.length; i++) {
+            buf.append(localVariableTable[i]);
+            if (i < localVariableTable.length - 1) {
                 buf.append('\n');
             }
         }
@@ -185,9 +185,9 @@
     @Override
     public Attribute copy( final ConstantPool _constant_pool ) {
         final LocalVariableTable c = (LocalVariableTable) clone();
-        c.local_variable_table = new LocalVariable[local_variable_table.length];
-        for (int i = 0; i < local_variable_table.length; i++) {
-            c.local_variable_table[i] = local_variable_table[i].copy();
+        c.localVariableTable = new LocalVariable[localVariableTable.length];
+        for (int i = 0; i < localVariableTable.length; i++) {
+            c.localVariableTable[i] = localVariableTable[i].copy();
         }
         c.setConstantPool(_constant_pool);
         return c;
@@ -195,6 +195,6 @@
 
 
     public final int getTableLength() {
-        return local_variable_table == null ? 0 : local_variable_table.length;
+        return localVariableTable == null ? 0 : localVariableTable.length;
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTypeTable.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTypeTable.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTypeTable.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTypeTable.java	2022-04-19 19:38:30.000000000 +0000
@@ -50,7 +50,7 @@
 //      u2 name_index;
 //      u2 signature_index;
 //      u2 index;
-//    } local_variable_type_table[local_variable_type_table_length];
+//    } localVariableTypeTable[local_variable_type_table_length];
 //  }
 // J5TODO: Needs some testing !
 
@@ -59,7 +59,7 @@
  */
 public class LocalVariableTypeTable extends Attribute {
 
-    private LocalVariable[] local_variable_type_table;        // variables
+    private LocalVariable[] localVariableTypeTable;        // variables
 
     public LocalVariableTypeTable(final LocalVariableTypeTable c) {
         this(c.getNameIndex(), c.getLength(), c.getLocalVariableTypeTable(), c.getConstantPool());
@@ -67,17 +67,17 @@
 
     public LocalVariableTypeTable(final int name_index, final int length, final LocalVariable[] local_variable_table, final ConstantPool constant_pool) {
         super(Const.ATTR_LOCAL_VARIABLE_TYPE_TABLE, name_index, length, constant_pool);
-        this.local_variable_type_table = local_variable_table;
+        this.localVariableTypeTable = local_variable_table;
     }
 
     LocalVariableTypeTable(final int nameIdx, final int len, final DataInput input, final ConstantPool cpool) throws IOException {
         this(nameIdx, len, (LocalVariable[]) null, cpool);
 
         final int local_variable_type_table_length = input.readUnsignedShort();
-        local_variable_type_table = new LocalVariable[local_variable_type_table_length];
+        localVariableTypeTable = new LocalVariable[local_variable_type_table_length];
 
         for (int i = 0; i < local_variable_type_table_length; i++) {
-            local_variable_type_table[i] = new LocalVariable(input, cpool);
+            localVariableTypeTable[i] = new LocalVariable(input, cpool);
         }
     }
 
@@ -89,18 +89,18 @@
     @Override
     public final void dump(final DataOutputStream file) throws IOException {
         super.dump(file);
-        file.writeShort(local_variable_type_table.length);
-        for (final LocalVariable variable : local_variable_type_table) {
+        file.writeShort(localVariableTypeTable.length);
+        for (final LocalVariable variable : localVariableTypeTable) {
             variable.dump(file);
         }
     }
 
     public final LocalVariable[] getLocalVariableTypeTable() {
-        return local_variable_type_table;
+        return localVariableTypeTable;
     }
 
     public final LocalVariable getLocalVariable(final int index) {
-        for (final LocalVariable variable : local_variable_type_table) {
+        for (final LocalVariable variable : localVariableTypeTable) {
             if (variable.getIndex() == index) {
                 return variable;
             }
@@ -110,7 +110,7 @@
     }
 
     public final void setLocalVariableTable(final LocalVariable[] local_variable_table) {
-        this.local_variable_type_table = local_variable_table;
+        this.localVariableTypeTable = local_variable_table;
     }
 
     /**
@@ -120,10 +120,10 @@
     public final String toString() {
         final StringBuilder buf = new StringBuilder();
 
-        for (int i = 0; i < local_variable_type_table.length; i++) {
-            buf.append(local_variable_type_table[i].toStringShared(true));
+        for (int i = 0; i < localVariableTypeTable.length; i++) {
+            buf.append(localVariableTypeTable[i].toStringShared(true));
 
-            if (i < local_variable_type_table.length - 1) {
+            if (i < localVariableTypeTable.length - 1) {
                 buf.append('\n');
             }
         }
@@ -138,9 +138,9 @@
     public Attribute copy(final ConstantPool constant_pool) {
         final LocalVariableTypeTable c = (LocalVariableTypeTable) clone();
 
-        c.local_variable_type_table = new LocalVariable[local_variable_type_table.length];
-        for (int i = 0; i < local_variable_type_table.length; i++) {
-            c.local_variable_type_table[i] = local_variable_type_table[i].copy();
+        c.localVariableTypeTable = new LocalVariable[localVariableTypeTable.length];
+        for (int i = 0; i < localVariableTypeTable.length; i++) {
+            c.localVariableTypeTable[i] = localVariableTypeTable[i].copy();
         }
 
         c.setConstantPool(constant_pool);
@@ -148,6 +148,6 @@
     }
 
     public final int getTableLength() {
-        return local_variable_type_table == null ? 0 : local_variable_type_table.length;
+        return localVariableTypeTable == null ? 0 : localVariableTypeTable.length;
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameter.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameter.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameter.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameter.java	2022-04-19 19:38:30.000000000 +0000
@@ -30,17 +30,17 @@
 /**
  * Entry of the parameters table.
  *
- * @see 
+ * @see 
  * The class File Format : The MethodParameters Attribute
  * @since 6.0
  */
 public class MethodParameter implements Cloneable {
 
     /** Index of the CONSTANT_Utf8_info structure in the constant_pool table representing the name of the parameter */
-    private int name_index;
+    private int nameIndex;
 
     /** The access flags */
-    private int access_flags;
+    private int accessFlags;
 
     public MethodParameter() {
     }
@@ -53,46 +53,46 @@
      * @throws ClassFormatException
      */
     MethodParameter(final DataInput input) throws IOException {
-        name_index = input.readUnsignedShort();
-        access_flags = input.readUnsignedShort();
+        nameIndex = input.readUnsignedShort();
+        accessFlags = input.readUnsignedShort();
     }
 
     public int getNameIndex() {
-        return name_index;
+        return nameIndex;
     }
 
     public void setNameIndex(final int name_index) {
-        this.name_index = name_index;
+        this.nameIndex = name_index;
     }
 
     /**
      * Returns the name of the parameter.
      */
     public String getParameterName(final ConstantPool constant_pool) {
-        if (name_index == 0) {
+        if (nameIndex == 0) {
             return null;
         }
-        return ((ConstantUtf8) constant_pool.getConstant(name_index, Const.CONSTANT_Utf8)).getBytes();
+        return ((ConstantUtf8) constant_pool.getConstant(nameIndex, Const.CONSTANT_Utf8)).getBytes();
        }
 
     public int getAccessFlags() {
-        return access_flags;
+        return accessFlags;
     }
 
     public void setAccessFlags(final int access_flags) {
-        this.access_flags = access_flags;
+        this.accessFlags = access_flags;
     }
 
     public boolean isFinal() {
-        return (access_flags & Const.ACC_FINAL) != 0;
+        return (accessFlags & Const.ACC_FINAL) != 0;
     }
 
     public boolean isSynthetic() {
-        return (access_flags & Const.ACC_SYNTHETIC) != 0;
+        return (accessFlags & Const.ACC_SYNTHETIC) != 0;
     }
 
     public boolean isMandated() {
-        return (access_flags & Const.ACC_MANDATED) != 0;
+        return (accessFlags & Const.ACC_MANDATED) != 0;
     }
 
     public void accept(final Visitor v) {
@@ -106,8 +106,8 @@
      * @throws IOException
      */
     public final void dump(final DataOutputStream file) throws IOException {
-        file.writeShort(name_index);
-        file.writeShort(access_flags);
+        file.writeShort(nameIndex);
+        file.writeShort(accessFlags);
     }
 
     /**
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameters.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameters.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameters.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameters.java	2022-04-19 19:38:30.000000000 +0000
@@ -30,7 +30,7 @@
 /**
  * This class represents a MethodParameters attribute.
  *
- * @see 
+ * @see 
  * The class File Format : The MethodParameters Attribute
  * @since 6.0
  */
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Module.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Module.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Module.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Module.java	2022-04-19 19:38:30.000000000 +0000
@@ -28,7 +28,8 @@
 import com.sun.org.apache.bcel.internal.Const;
 
 /**
- * This class is derived from Attribute and represents the list of modules required, exported, opened or provided by a module.
+ * This class is derived from Attribute and represents the list of
+ * modules required, exported, opened or provided by a module.
  * There may be at most one Module attribute in a ClassFile structure.
  *
  * @see   Attribute
@@ -36,16 +37,16 @@
  */
 public final class Module extends Attribute {
 
-    private final int module_name_index;
-    private final int module_flags;
-    private final int module_version_index;
-
-    private ModuleRequires[] requires_table;
-    private ModuleExports[] exports_table;
-    private ModuleOpens[] opens_table;
-    private final int uses_count;
-    private final int[] uses_index;
-    private ModuleProvides[] provides_table;
+    private final int moduleNameIndex;
+    private final int moduleFlags;
+    private final int moduleVersionIndex;
+
+    private ModuleRequires[] requiresTable;
+    private ModuleExports[] exportsTable;
+    private ModuleOpens[] opensTable;
+    private final int usesCount;
+    private final int[] usesIndex;
+    private ModuleProvides[] providesTable;
 
     /**
      * Construct object from input stream.
@@ -58,38 +59,38 @@
     Module(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool) throws IOException {
         super(Const.ATTR_MODULE, name_index, length, constant_pool);
 
-        module_name_index = input.readUnsignedShort();
-        module_flags = input.readUnsignedShort();
-        module_version_index = input.readUnsignedShort();
+        moduleNameIndex = input.readUnsignedShort();
+        moduleFlags = input.readUnsignedShort();
+        moduleVersionIndex = input.readUnsignedShort();
 
         final int requires_count = input.readUnsignedShort();
-        requires_table = new ModuleRequires[requires_count];
+        requiresTable = new ModuleRequires[requires_count];
         for (int i = 0; i < requires_count; i++) {
-            requires_table[i] = new ModuleRequires(input);
+            requiresTable[i] = new ModuleRequires(input);
         }
 
         final int exports_count = input.readUnsignedShort();
-        exports_table = new ModuleExports[exports_count];
+        exportsTable = new ModuleExports[exports_count];
         for (int i = 0; i < exports_count; i++) {
-            exports_table[i] = new ModuleExports(input);
+            exportsTable[i] = new ModuleExports(input);
         }
 
         final int opens_count = input.readUnsignedShort();
-        opens_table = new ModuleOpens[opens_count];
+        opensTable = new ModuleOpens[opens_count];
         for (int i = 0; i < opens_count; i++) {
-            opens_table[i] = new ModuleOpens(input);
+            opensTable[i] = new ModuleOpens(input);
         }
 
-        uses_count = input.readUnsignedShort();
-        uses_index = new int[uses_count];
-        for (int i = 0; i < uses_count; i++) {
-            uses_index[i] = input.readUnsignedShort();
+        usesCount = input.readUnsignedShort();
+        usesIndex = new int[usesCount];
+        for (int i = 0; i < usesCount; i++) {
+            usesIndex[i] = input.readUnsignedShort();
         }
 
         final int provides_count = input.readUnsignedShort();
-        provides_table = new ModuleProvides[provides_count];
+        providesTable = new ModuleProvides[provides_count];
         for (int i = 0; i < provides_count; i++) {
-            provides_table[i] = new ModuleProvides(input);
+            providesTable[i] = new ModuleProvides(input);
         }
     }
 
@@ -113,7 +114,7 @@
      * @see ModuleRequires
      */
     public ModuleRequires[] getRequiresTable() {
-        return requires_table;
+        return requiresTable;
     }
 
 
@@ -122,7 +123,7 @@
      * @see ModuleExports
      */
     public ModuleExports[] getExportsTable() {
-        return exports_table;
+        return exportsTable;
     }
 
 
@@ -131,7 +132,7 @@
      * @see ModuleOpens
      */
     public ModuleOpens[] getOpensTable() {
-        return opens_table;
+        return opensTable;
     }
 
 
@@ -140,7 +141,7 @@
      * @see ModuleProvides
      */
     public ModuleProvides[] getProvidesTable() {
-        return provides_table;
+        return providesTable;
     }
 
 
@@ -154,32 +155,32 @@
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
 
-        file.writeShort(module_name_index);
-        file.writeShort(module_flags);
-        file.writeShort(module_version_index);
+        file.writeShort(moduleNameIndex);
+        file.writeShort(moduleFlags);
+        file.writeShort(moduleVersionIndex);
 
-        file.writeShort(requires_table.length);
-        for (final ModuleRequires entry : requires_table) {
+        file.writeShort(requiresTable.length);
+        for (final ModuleRequires entry : requiresTable) {
             entry.dump(file);
         }
 
-        file.writeShort(exports_table.length);
-        for (final ModuleExports entry : exports_table) {
+        file.writeShort(exportsTable.length);
+        for (final ModuleExports entry : exportsTable) {
             entry.dump(file);
         }
 
-        file.writeShort(opens_table.length);
-        for (final ModuleOpens entry : opens_table) {
+        file.writeShort(opensTable.length);
+        for (final ModuleOpens entry : opensTable) {
             entry.dump(file);
         }
 
-        file.writeShort(uses_index.length);
-        for (final int entry : uses_index) {
+        file.writeShort(usesIndex.length);
+        for (final int entry : usesIndex) {
             file.writeShort(entry);
         }
 
-        file.writeShort(provides_table.length);
-        for (final ModuleProvides entry : provides_table) {
+        file.writeShort(providesTable.length);
+        for (final ModuleProvides entry : providesTable) {
             entry.dump(file);
         }
     }
@@ -193,34 +194,34 @@
         final ConstantPool cp = super.getConstantPool();
         final StringBuilder buf = new StringBuilder();
         buf.append("Module:\n");
-        buf.append("  name:    ") .append(cp.getConstantString(module_name_index, Const.CONSTANT_Module).replace('/', '.')).append("\n");
-        buf.append("  flags:   ") .append(String.format("%04x", module_flags)).append("\n");
-        final String version = module_version_index == 0 ? "0" : cp.getConstantString(module_version_index, Const.CONSTANT_Utf8);
+        buf.append("  name:    ") .append(cp.getConstantString(moduleNameIndex, Const.CONSTANT_Module).replace('/', '.')).append("\n");
+        buf.append("  flags:   ") .append(String.format("%04x", moduleFlags)).append("\n");
+        final String version = moduleVersionIndex == 0 ? "0" : cp.getConstantString(moduleVersionIndex, Const.CONSTANT_Utf8);
         buf.append("  version: ") .append(version).append("\n");
 
-        buf.append("  requires(").append(requires_table.length).append("):\n");
-        for (final ModuleRequires module : requires_table) {
+        buf.append("  requires(").append(requiresTable.length).append("):\n");
+        for (final ModuleRequires module : requiresTable) {
             buf.append("    ").append(module.toString(cp)).append("\n");
         }
 
-        buf.append("  exports(").append(exports_table.length).append("):\n");
-        for (final ModuleExports module : exports_table) {
+        buf.append("  exports(").append(exportsTable.length).append("):\n");
+        for (final ModuleExports module : exportsTable) {
             buf.append("    ").append(module.toString(cp)).append("\n");
         }
 
-        buf.append("  opens(").append(opens_table.length).append("):\n");
-        for (final ModuleOpens module : opens_table) {
+        buf.append("  opens(").append(opensTable.length).append("):\n");
+        for (final ModuleOpens module : opensTable) {
             buf.append("    ").append(module.toString(cp)).append("\n");
         }
 
-        buf.append("  uses(").append(uses_index.length).append("):\n");
-        for (final int index : uses_index) {
+        buf.append("  uses(").append(usesIndex.length).append("):\n");
+        for (final int index : usesIndex) {
             final String class_name = cp.getConstantString(index, Const.CONSTANT_Class);
             buf.append("    ").append(Utility.compactClassName(class_name, false)).append("\n");
         }
 
-        buf.append("  provides(").append(provides_table.length).append("):\n");
-        for (final ModuleProvides module : provides_table) {
+        buf.append("  provides(").append(providesTable.length).append("):\n");
+        for (final ModuleProvides module : providesTable) {
             buf.append("    ").append(module.toString(cp)).append("\n");
         }
 
@@ -235,24 +236,24 @@
     public Attribute copy( final ConstantPool _constant_pool ) {
         final Module c = (Module) clone();
 
-        c.requires_table = new ModuleRequires[requires_table.length];
-        for (int i = 0; i < requires_table.length; i++) {
-            c.requires_table[i] = requires_table[i].copy();
+        c.requiresTable = new ModuleRequires[requiresTable.length];
+        for (int i = 0; i < requiresTable.length; i++) {
+            c.requiresTable[i] = requiresTable[i].copy();
         }
 
-        c.exports_table = new ModuleExports[exports_table.length];
-        for (int i = 0; i < exports_table.length; i++) {
-            c.exports_table[i] = exports_table[i].copy();
+        c.exportsTable = new ModuleExports[exportsTable.length];
+        for (int i = 0; i < exportsTable.length; i++) {
+            c.exportsTable[i] = exportsTable[i].copy();
         }
 
-        c.opens_table = new ModuleOpens[opens_table.length];
-        for (int i = 0; i < opens_table.length; i++) {
-            c.opens_table[i] = opens_table[i].copy();
+        c.opensTable = new ModuleOpens[opensTable.length];
+        for (int i = 0; i < opensTable.length; i++) {
+            c.opensTable[i] = opensTable[i].copy();
         }
 
-        c.provides_table = new ModuleProvides[provides_table.length];
-        for (int i = 0; i < provides_table.length; i++) {
-            c.provides_table[i] = provides_table[i].copy();
+        c.providesTable = new ModuleProvides[providesTable.length];
+        for (int i = 0; i < providesTable.length; i++) {
+            c.providesTable[i] = providesTable[i].copy();
         }
 
         c.setConstantPool(_constant_pool);
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleExports.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleExports.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleExports.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleExports.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,10 +36,10 @@
  */
 public final class ModuleExports implements Cloneable, Node {
 
-    private final int exports_index;  // points to CONSTANT_Package_info
-    private final int exports_flags;
-    private final int exports_to_count;
-    private final int[] exports_to_index;  // points to CONSTANT_Module_info
+    private final int exportsIndex;  // points to CONSTANT_Package_info
+    private final int exportsFlags;
+    private final int exportsToCount;
+    private final int[] exportsToIndex;  // points to CONSTANT_Module_info
 
 
     /**
@@ -49,12 +49,12 @@
      * @throws IOException if an I/O Exception occurs in readUnsignedShort
      */
     ModuleExports(final DataInput file) throws IOException {
-        exports_index = file.readUnsignedShort();
-        exports_flags = file.readUnsignedShort();
-        exports_to_count = file.readUnsignedShort();
-        exports_to_index = new int[exports_to_count];
-        for (int i = 0; i < exports_to_count; i++) {
-            exports_to_index[i] = file.readUnsignedShort();
+        exportsIndex = file.readUnsignedShort();
+        exportsFlags = file.readUnsignedShort();
+        exportsToCount = file.readUnsignedShort();
+        exportsToIndex = new int[exportsToCount];
+        for (int i = 0; i < exportsToCount; i++) {
+            exportsToIndex[i] = file.readUnsignedShort();
         }
     }
 
@@ -80,10 +80,10 @@
      * @throws IOException if an I/O Exception occurs in writeShort
      */
     public void dump( final DataOutputStream file ) throws IOException {
-        file.writeShort(exports_index);
-        file.writeShort(exports_flags);
-        file.writeShort(exports_to_count);
-        for (final int entry : exports_to_index) {
+        file.writeShort(exportsIndex);
+        file.writeShort(exportsFlags);
+        file.writeShort(exportsToCount);
+        for (final int entry : exportsToIndex) {
             file.writeShort(entry);
         }
     }
@@ -94,7 +94,7 @@
      */
     @Override
     public String toString() {
-        return "exports(" + exports_index + ", " + exports_flags + ", " + exports_to_count + ", ...)";
+        return "exports(" + exportsIndex + ", " + exportsFlags + ", " + exportsToCount + ", ...)";
     }
 
 
@@ -103,11 +103,11 @@
      */
     public String toString( final ConstantPool constant_pool ) {
         final StringBuilder buf = new StringBuilder();
-        final String package_name = constant_pool.constantToString(exports_index, Const.CONSTANT_Package);
+        final String package_name = constant_pool.constantToString(exportsIndex, Const.CONSTANT_Package);
         buf.append(Utility.compactClassName(package_name, false));
-        buf.append(", ").append(String.format("%04x", exports_flags));
-        buf.append(", to(").append(exports_to_count).append("):\n");
-        for (final int index : exports_to_index) {
+        buf.append(", ").append(String.format("%04x", exportsFlags));
+        buf.append(", to(").append(exportsToCount).append("):\n");
+        for (final int index : exportsToIndex) {
             final String module_name = constant_pool.getConstantString(index, Const.CONSTANT_Module);
             buf.append("      ").append(Utility.compactClassName(module_name, false)).append("\n");
         }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleMainClass.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleMainClass.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleMainClass.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleMainClass.java	2022-04-19 19:38:30.000000000 +0000
@@ -35,7 +35,7 @@
  */
 public final class ModuleMainClass extends Attribute {
 
-    private int main_class_index;
+    private int mainClassIndex;
 
 
     /**
@@ -50,27 +50,27 @@
     /**
      * @param name_index Index in constant pool
      * @param length Content length in bytes
-     * @param main_class_index Host class index
-     * @param constant_pool Array of constants
+     * @param mainClassIndex Host class index
+     * @param constantPool Array of constants
      */
-    public ModuleMainClass(final int name_index, final int length, final int main_class_index,
-            final ConstantPool constant_pool) {
-        super(Const.ATTR_NEST_MEMBERS, name_index, length, constant_pool);
-        this.main_class_index = main_class_index;
+    public ModuleMainClass(final int name_index, final int length, final int mainClassIndex,
+            final ConstantPool constantPool) {
+        super(Const.ATTR_NEST_MEMBERS, name_index, length, constantPool);
+        this.mainClassIndex = mainClassIndex;
     }
 
 
     /**
      * Construct object from input stream.
-     * @param name_index Index in constant pool
+     * @param nameIndex Index in constant pool
      * @param length Content length in bytes
      * @param input Input stream
-     * @param constant_pool Array of constants
+     * @param constantPool Array of constants
      * @throws IOException
      */
-    ModuleMainClass(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool) throws IOException {
-        this(name_index, length, 0, constant_pool);
-        main_class_index = input.readUnsignedShort();
+    ModuleMainClass(final int nameIndex, final int length, final DataInput input, final ConstantPool constantPool) throws IOException {
+        this(nameIndex, length, 0, constantPool);
+        mainClassIndex = input.readUnsignedShort();
     }
 
 
@@ -96,7 +96,7 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(main_class_index);
+        file.writeShort(mainClassIndex);
     }
 
 
@@ -104,15 +104,15 @@
      * @return index into constant pool of host class name.
      */
     public int getHostClassIndex() {
-        return main_class_index;
+        return mainClassIndex;
     }
 
 
     /**
-     * @param main_class_index the host class index
+     * @param mainClassIndex the host class index
      */
-    public void setHostClassIndex( final int main_class_index ) {
-        this.main_class_index = main_class_index;
+    public void setHostClassIndex( final int mainClassIndex ) {
+        this.mainClassIndex = mainClassIndex;
     }
 
 
@@ -123,7 +123,7 @@
     public String toString() {
         final StringBuilder buf = new StringBuilder();
         buf.append("ModuleMainClass: ");
-        final String class_name = super.getConstantPool().getConstantString(main_class_index, Const.CONSTANT_Class);
+        final String class_name = super.getConstantPool().getConstantString(mainClassIndex, Const.CONSTANT_Class);
         buf.append(Utility.compactClassName(class_name, false));
         return buf.toString();
     }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleOpens.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleOpens.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleOpens.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleOpens.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,10 +36,10 @@
  */
 public final class ModuleOpens implements Cloneable, Node {
 
-    private final int opens_index;  // points to CONSTANT_Package_info
-    private final int opens_flags;
-    private final int opens_to_count;
-    private final int[] opens_to_index;  // points to CONSTANT_Module_info
+    private final int opensIndex;  // points to CONSTANT_Package_info
+    private final int opensFlags;
+    private final int opensToCount;
+    private final int[] opensToIndex;  // points to CONSTANT_Module_info
 
 
     /**
@@ -49,12 +49,12 @@
      * @throws IOException if an I/O Exception occurs in readUnsignedShort
      */
     ModuleOpens(final DataInput file) throws IOException {
-        opens_index = file.readUnsignedShort();
-        opens_flags = file.readUnsignedShort();
-        opens_to_count = file.readUnsignedShort();
-        opens_to_index = new int[opens_to_count];
-        for (int i = 0; i < opens_to_count; i++) {
-            opens_to_index[i] = file.readUnsignedShort();
+        opensIndex = file.readUnsignedShort();
+        opensFlags = file.readUnsignedShort();
+        opensToCount = file.readUnsignedShort();
+        opensToIndex = new int[opensToCount];
+        for (int i = 0; i < opensToCount; i++) {
+            opensToIndex[i] = file.readUnsignedShort();
         }
     }
 
@@ -80,10 +80,10 @@
      * @throws IOException if an I/O Exception occurs in writeShort
      */
     public void dump( final DataOutputStream file ) throws IOException {
-        file.writeShort(opens_index);
-        file.writeShort(opens_flags);
-        file.writeShort(opens_to_count);
-        for (final int entry : opens_to_index) {
+        file.writeShort(opensIndex);
+        file.writeShort(opensFlags);
+        file.writeShort(opensToCount);
+        for (final int entry : opensToIndex) {
             file.writeShort(entry);
         }
     }
@@ -94,7 +94,7 @@
      */
     @Override
     public String toString() {
-        return "opens(" + opens_index + ", " + opens_flags + ", " + opens_to_count + ", ...)";
+        return "opens(" + opensIndex + ", " + opensFlags + ", " + opensToCount + ", ...)";
     }
 
 
@@ -103,11 +103,11 @@
      */
     public String toString( final ConstantPool constant_pool ) {
         final StringBuilder buf = new StringBuilder();
-        final String package_name = constant_pool.constantToString(opens_index, Const.CONSTANT_Package);
+        final String package_name = constant_pool.constantToString(opensIndex, Const.CONSTANT_Package);
         buf.append(Utility.compactClassName(package_name, false));
-        buf.append(", ").append(String.format("%04x", opens_flags));
-        buf.append(", to(").append(opens_to_count).append("):\n");
-        for (final int index : opens_to_index) {
+        buf.append(", ").append(String.format("%04x", opensFlags));
+        buf.append(", to(").append(opensToCount).append("):\n");
+        for (final int index : opensToIndex) {
             final String module_name = constant_pool.getConstantString(index, Const.CONSTANT_Module);
             buf.append("      ").append(Utility.compactClassName(module_name, false)).append("\n");
         }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModulePackages.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModulePackages.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModulePackages.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModulePackages.java	2022-04-19 19:38:30.000000000 +0000
@@ -35,7 +35,7 @@
  */
 public final class ModulePackages extends Attribute {
 
-    private int[] package_index_table;
+    private int[] packageIndexTable;
 
 
     /**
@@ -48,15 +48,15 @@
 
 
     /**
-     * @param name_index Index in constant pool
+     * @param nameIndex Index in constant pool
      * @param length Content length in bytes
-     * @param package_index_table Table of indices in constant pool
-     * @param constant_pool Array of constants
+     * @param packageIndexTable Table of indices in constant pool
+     * @param constantPool Array of constants
      */
-    public ModulePackages(final int name_index, final int length, final int[] package_index_table,
-            final ConstantPool constant_pool) {
-        super(Const.ATTR_MODULE_PACKAGES, name_index, length, constant_pool);
-        this.package_index_table = package_index_table != null ? package_index_table : new int[0];
+    public ModulePackages(final int nameIndex, final int length, final int[] packageIndexTable,
+            final ConstantPool constantPool) {
+        super(Const.ATTR_MODULE_PACKAGES, nameIndex, length, constantPool);
+        this.packageIndexTable = packageIndexTable != null ? packageIndexTable : new int[0];
     }
 
 
@@ -71,9 +71,9 @@
     ModulePackages(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool) throws IOException {
         this(name_index, length, (int[]) null, constant_pool);
         final int number_of_packages = input.readUnsignedShort();
-        package_index_table = new int[number_of_packages];
+        packageIndexTable = new int[number_of_packages];
         for (int i = 0; i < number_of_packages; i++) {
-            package_index_table[i] = input.readUnsignedShort();
+            packageIndexTable[i] = input.readUnsignedShort();
         }
     }
 
@@ -100,8 +100,8 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(package_index_table.length);
-        for (final int index : package_index_table) {
+        file.writeShort(packageIndexTable.length);
+        for (final int index : packageIndexTable) {
             file.writeShort(index);
         }
     }
@@ -111,7 +111,7 @@
      * @return array of indices into constant pool of package names.
      */
     public int[] getPackageIndexTable() {
-        return package_index_table;
+        return packageIndexTable;
     }
 
 
@@ -119,7 +119,7 @@
      * @return Length of package table.
      */
     public int getNumberOfPackages() {
-        return package_index_table == null ? 0 : package_index_table.length;
+        return packageIndexTable == null ? 0 : packageIndexTable.length;
     }
 
 
@@ -127,9 +127,9 @@
      * @return string array of package names
      */
     public String[] getPackageNames() {
-        final String[] names = new String[package_index_table.length];
-        for (int i = 0; i < package_index_table.length; i++) {
-            names[i] = super.getConstantPool().getConstantString(package_index_table[i],
+        final String[] names = new String[packageIndexTable.length];
+        for (int i = 0; i < packageIndexTable.length; i++) {
+            names[i] = super.getConstantPool().getConstantString(packageIndexTable[i],
                     Const.CONSTANT_Package).replace('/', '.');
         }
         return names;
@@ -137,11 +137,11 @@
 
 
     /**
-     * @param package_index_table the list of package indexes
+     * @param packageIndexTable the list of package indexes
      * Also redefines number_of_packages according to table length.
      */
-    public void setPackageIndexTable( final int[] package_index_table ) {
-        this.package_index_table = package_index_table != null ? package_index_table : new int[0];
+    public void setPackageIndexTable( final int[] packageIndexTable ) {
+        this.packageIndexTable = packageIndexTable != null ? packageIndexTable : new int[0];
     }
 
 
@@ -152,9 +152,9 @@
     public String toString() {
         final StringBuilder buf = new StringBuilder();
         buf.append("ModulePackages(");
-        buf.append(package_index_table.length);
+        buf.append(packageIndexTable.length);
         buf.append("):\n");
-        for (final int index : package_index_table) {
+        for (final int index : packageIndexTable) {
             final String package_name = super.getConstantPool().getConstantString(index, Const.CONSTANT_Package);
             buf.append("  ").append(Utility.compactClassName(package_name, false)).append("\n");
         }
@@ -168,10 +168,10 @@
     @Override
     public Attribute copy( final ConstantPool _constant_pool ) {
         final ModulePackages c = (ModulePackages) clone();
-        if (package_index_table != null) {
-            c.package_index_table = new int[package_index_table.length];
-            System.arraycopy(package_index_table, 0, c.package_index_table, 0,
-                    package_index_table.length);
+        if (packageIndexTable != null) {
+            c.packageIndexTable = new int[packageIndexTable.length];
+            System.arraycopy(packageIndexTable, 0, c.packageIndexTable, 0,
+                    packageIndexTable.length);
         }
         c.setConstantPool(_constant_pool);
         return c;
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleProvides.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleProvides.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleProvides.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleProvides.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,9 +36,9 @@
  */
 public final class ModuleProvides implements Cloneable, Node {
 
-    private final int provides_index;  // points to CONSTANT_Class_info
-    private final int provides_with_count;
-    private final int[] provides_with_index;  // points to CONSTANT_Class_info
+    private final int providesIndex;  // points to CONSTANT_Class_info
+    private final int providesWithCount;
+    private final int[] providesWithIndex;  // points to CONSTANT_Class_info
 
 
     /**
@@ -48,11 +48,11 @@
      * @throws IOException if an I/O Exception occurs in readUnsignedShort
      */
     ModuleProvides(final DataInput file) throws IOException {
-        provides_index = file.readUnsignedShort();
-        provides_with_count = file.readUnsignedShort();
-        provides_with_index = new int[provides_with_count];
-        for (int i = 0; i < provides_with_count; i++) {
-            provides_with_index[i] = file.readUnsignedShort();
+        providesIndex = file.readUnsignedShort();
+        providesWithCount = file.readUnsignedShort();
+        providesWithIndex = new int[providesWithCount];
+        for (int i = 0; i < providesWithCount; i++) {
+            providesWithIndex[i] = file.readUnsignedShort();
         }
     }
 
@@ -78,9 +78,9 @@
      * @throws IOException if an I/O Exception occurs in writeShort
      */
     public void dump( final DataOutputStream file ) throws IOException {
-        file.writeShort(provides_index);
-        file.writeShort(provides_with_count);
-        for (final int entry : provides_with_index) {
+        file.writeShort(providesIndex);
+        file.writeShort(providesWithCount);
+        for (final int entry : providesWithIndex) {
             file.writeShort(entry);
         }
     }
@@ -91,7 +91,7 @@
      */
     @Override
     public String toString() {
-        return "provides(" + provides_index + ", " + provides_with_count + ", ...)";
+        return "provides(" + providesIndex + ", " + providesWithCount + ", ...)";
     }
 
 
@@ -100,10 +100,10 @@
      */
     public String toString( final ConstantPool constant_pool ) {
         final StringBuilder buf = new StringBuilder();
-        final String interface_name = constant_pool.constantToString(provides_index, Const.CONSTANT_Class);
+        final String interface_name = constant_pool.constantToString(providesIndex, Const.CONSTANT_Class);
         buf.append(Utility.compactClassName(interface_name, false));
-        buf.append(", with(").append(provides_with_count).append("):\n");
-        for (final int index : provides_with_index) {
+        buf.append(", with(").append(providesWithCount).append("):\n");
+        for (final int index : providesWithIndex) {
             final String class_name = constant_pool.getConstantString(index, Const.CONSTANT_Class);
             buf.append("      ").append(Utility.compactClassName(class_name, false)).append("\n");
         }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleRequires.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleRequires.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleRequires.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleRequires.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,9 +36,9 @@
  */
 public final class ModuleRequires implements Cloneable, Node {
 
-    private final int requires_index;  // points to CONSTANT_Module_info
-    private final int requires_flags;
-    private final int requires_version_index;  // either 0 or points to CONSTANT_Utf8_info
+    private final int requiresIndex;  // points to CONSTANT_Module_info
+    private final int requiresFlags;
+    private final int requiresVersionIndex;  // either 0 or points to CONSTANT_Utf8_info
 
 
     /**
@@ -48,9 +48,9 @@
      * @throws IOException if an I/O Exception occurs in readUnsignedShort
      */
     ModuleRequires(final DataInput file) throws IOException {
-        requires_index = file.readUnsignedShort();
-        requires_flags = file.readUnsignedShort();
-        requires_version_index = file.readUnsignedShort();
+        requiresIndex = file.readUnsignedShort();
+        requiresFlags = file.readUnsignedShort();
+        requiresVersionIndex = file.readUnsignedShort();
     }
 
 
@@ -75,9 +75,9 @@
      * @throws IOException if an I/O Exception occurs in writeShort
      */
     public void dump( final DataOutputStream file ) throws IOException {
-        file.writeShort(requires_index);
-        file.writeShort(requires_flags);
-        file.writeShort(requires_version_index);
+        file.writeShort(requiresIndex);
+        file.writeShort(requiresFlags);
+        file.writeShort(requiresVersionIndex);
     }
 
 
@@ -86,7 +86,7 @@
      */
     @Override
     public String toString() {
-        return "requires(" + requires_index + ", " + String.format("%04x", requires_flags) + ", " + requires_version_index + ")";
+        return "requires(" + requiresIndex + ", " + String.format("%04x", requiresFlags) + ", " + requiresVersionIndex + ")";
     }
 
 
@@ -95,10 +95,10 @@
      */
     public String toString( final ConstantPool constant_pool ) {
         final StringBuilder buf = new StringBuilder();
-        final String module_name = constant_pool.constantToString(requires_index, Const.CONSTANT_Module);
+        final String module_name = constant_pool.constantToString(requiresIndex, Const.CONSTANT_Module);
         buf.append(Utility.compactClassName(module_name, false));
-        buf.append(", ").append(String.format("%04x", requires_flags));
-        final String version = requires_version_index == 0 ? "0" : constant_pool.getConstantString(requires_version_index, Const.CONSTANT_Utf8);
+        buf.append(", ").append(String.format("%04x", requiresFlags));
+        final String version = requiresVersionIndex == 0 ? "0" : constant_pool.getConstantString(requiresVersionIndex, Const.CONSTANT_Utf8);
         buf.append(", ").append(version);
         return buf.toString();
     }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/NestHost.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/NestHost.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/NestHost.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/NestHost.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,7 +36,7 @@
  */
 public final class NestHost extends Attribute {
 
-    private int host_class_index;
+    private int hostClassIndex;
 
 
     /**
@@ -49,15 +49,15 @@
 
 
     /**
-     * @param name_index Index in constant pool
+     * @param nameIndex Index in constant pool
      * @param length Content length in bytes
-     * @param host_class_index Host class index
-     * @param constant_pool Array of constants
+     * @param hostClassIndex Host class index
+     * @param constantPool Array of constants
      */
-    public NestHost(final int name_index, final int length, final int host_class_index,
-            final ConstantPool constant_pool) {
-        super(Const.ATTR_NEST_MEMBERS, name_index, length, constant_pool);
-        this.host_class_index = host_class_index;
+    public NestHost(final int nameIndex, final int length, final int hostClassIndex,
+            final ConstantPool constantPool) {
+        super(Const.ATTR_NEST_MEMBERS, nameIndex, length, constantPool);
+        this.hostClassIndex = hostClassIndex;
     }
 
 
@@ -71,7 +71,7 @@
      */
     NestHost(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool) throws IOException {
         this(name_index, length, 0, constant_pool);
-        host_class_index = input.readUnsignedShort();
+        hostClassIndex = input.readUnsignedShort();
     }
 
 
@@ -97,7 +97,7 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(host_class_index);
+        file.writeShort(hostClassIndex);
     }
 
 
@@ -105,15 +105,15 @@
      * @return index into constant pool of host class name.
      */
     public int getHostClassIndex() {
-        return host_class_index;
+        return hostClassIndex;
     }
 
 
     /**
-     * @param host_class_index the host class index
+     * @param hostClassIndex the host class index
      */
-    public void setHostClassIndex( final int host_class_index ) {
-        this.host_class_index = host_class_index;
+    public void setHostClassIndex( final int hostClassIndex ) {
+        this.hostClassIndex = hostClassIndex;
     }
 
 
@@ -124,7 +124,7 @@
     public String toString() {
         final StringBuilder buf = new StringBuilder();
         buf.append("NestHost: ");
-        final String class_name = super.getConstantPool().getConstantString(host_class_index, Const.CONSTANT_Class);
+        final String class_name = super.getConstantPool().getConstantString(hostClassIndex, Const.CONSTANT_Class);
         buf.append(Utility.compactClassName(class_name, false));
         return buf.toString();
     }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java	2022-04-19 19:38:30.000000000 +0000
@@ -35,17 +35,17 @@
  */
 public final class PMGClass extends Attribute {
 
-    private int pmg_class_index;
-    private int pmg_index;
+    private int pmgClassIndex;
+    private int pmgIndex;
 
 
     /**
      * Initialize from another object. Note that both objects use the same
      * references (shallow copy). Use copy() for a physical copy.
      */
-    public PMGClass(final PMGClass c) {
-        this(c.getNameIndex(), c.getLength(), c.getPMGIndex(), c.getPMGClassIndex(), c
-                .getConstantPool());
+    public PMGClass(final PMGClass pgmClass) {
+        this(pgmClass.getNameIndex(), pgmClass.getLength(), pgmClass.getPMGIndex(), pgmClass.getPMGClassIndex(),
+            pgmClass.getConstantPool());
     }
 
 
@@ -66,15 +66,15 @@
     /**
      * @param name_index Index in constant pool to CONSTANT_Utf8
      * @param length Content length in bytes
-     * @param pmg_index index in constant pool for source file name
-     * @param pmg_class_index Index in constant pool to CONSTANT_Utf8
-     * @param constant_pool Array of constants
-     */
-    public PMGClass(final int name_index, final int length, final int pmg_index, final int pmg_class_index,
-            final ConstantPool constant_pool) {
-        super(Const.ATTR_PMG, name_index, length, constant_pool);
-        this.pmg_index = pmg_index;
-        this.pmg_class_index = pmg_class_index;
+     * @param pmgIndex index in constant pool for source file name
+     * @param pmgClassIndex Index in constant pool to CONSTANT_Utf8
+     * @param constantPool Array of constants
+     */
+    public PMGClass(final int name_index, final int length, final int pmgIndex, final int pmgClassIndex,
+            final ConstantPool constantPool) {
+        super(Const.ATTR_PMG, name_index, length, constantPool);
+        this.pmgIndex = pmgIndex;
+        this.pmgClassIndex = pmgClassIndex;
     }
 
 
@@ -100,8 +100,8 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(pmg_index);
-        file.writeShort(pmg_class_index);
+        file.writeShort(pmgIndex);
+        file.writeShort(pmgClassIndex);
     }
 
 
@@ -109,15 +109,15 @@
      * @return Index in constant pool of source file name.
      */
     public int getPMGClassIndex() {
-        return pmg_class_index;
+        return pmgClassIndex;
     }
 
 
     /**
-     * @param pmg_class_index
+     * @param pmgClassIndex
      */
-    public void setPMGClassIndex( final int pmg_class_index ) {
-        this.pmg_class_index = pmg_class_index;
+    public void setPMGClassIndex( final int pmgClassIndex ) {
+        this.pmgClassIndex = pmgClassIndex;
     }
 
 
@@ -125,15 +125,15 @@
      * @return Index in constant pool of source file name.
      */
     public int getPMGIndex() {
-        return pmg_index;
+        return pmgIndex;
     }
 
 
     /**
-     * @param pmg_index
+     * @param pmgIndex
      */
-    public void setPMGIndex( final int pmg_index ) {
-        this.pmg_index = pmg_index;
+    public void setPMGIndex( final int pmgIndex ) {
+        this.pmgIndex = pmgIndex;
     }
 
 
@@ -141,7 +141,7 @@
      * @return PMG name.
      */
     public String getPMGName() {
-        final ConstantUtf8 c = (ConstantUtf8) super.getConstantPool().getConstant(pmg_index,
+        final ConstantUtf8 c = (ConstantUtf8) super.getConstantPool().getConstant(pmgIndex,
                 Const.CONSTANT_Utf8);
         return c.getBytes();
     }
@@ -151,7 +151,7 @@
      * @return PMG class name.
      */
     public String getPMGClassName() {
-        final ConstantUtf8 c = (ConstantUtf8) super.getConstantPool().getConstant(pmg_class_index,
+        final ConstantUtf8 c = (ConstantUtf8) super.getConstantPool().getConstant(pmgClassIndex,
                 Const.CONSTANT_Utf8);
         return c.getBytes();
     }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotationEntry.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotationEntry.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotationEntry.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotationEntry.java	2022-04-19 19:38:30.000000000 +0000
@@ -35,7 +35,7 @@
  */
 public class ParameterAnnotationEntry implements Node {
 
-    private final AnnotationEntry[] annotation_table;
+    private final AnnotationEntry[] annotationTable;
 
 
     /**
@@ -46,10 +46,10 @@
      */
     ParameterAnnotationEntry(final DataInput input, final ConstantPool constant_pool) throws IOException {
         final int annotation_table_length = input.readUnsignedShort();
-        annotation_table = new AnnotationEntry[annotation_table_length];
+        annotationTable = new AnnotationEntry[annotation_table_length];
         for (int i = 0; i < annotation_table_length; i++) {
             // TODO isRuntimeVisible
-            annotation_table[i] = AnnotationEntry.read(input, constant_pool, false);
+            annotationTable[i] = AnnotationEntry.read(input, constant_pool, false);
         }
     }
 
@@ -70,12 +70,12 @@
      * returns the array of annotation entries in this annotation
      */
     public AnnotationEntry[] getAnnotationEntries() {
-        return annotation_table;
+        return annotationTable;
     }
 
     public void dump(final DataOutputStream dos) throws IOException {
-        dos.writeShort(annotation_table.length);
-        for (final AnnotationEntry entry : annotation_table) {
+        dos.writeShort(annotationTable.length);
+        for (final AnnotationEntry entry : annotationTable) {
             entry.dump(dos);
         }
     }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotations.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotations.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotations.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotations.java	2022-04-19 19:38:30.000000000 +0000
@@ -33,7 +33,7 @@
 public abstract class ParameterAnnotations extends Attribute {
 
     /** Table of parameter annotations */
-    private ParameterAnnotationEntry[] parameter_annotation_table;
+    private ParameterAnnotationEntry[] parameterAnnotationTable;
 
     /**
      * @param parameter_annotation_type the subclass type of the parameter annotation
@@ -47,24 +47,24 @@
         this(parameter_annotation_type, name_index, length, (ParameterAnnotationEntry[]) null,
                 constant_pool);
         final int num_parameters = input.readUnsignedByte();
-        parameter_annotation_table = new ParameterAnnotationEntry[num_parameters];
+        parameterAnnotationTable = new ParameterAnnotationEntry[num_parameters];
         for (int i = 0; i < num_parameters; i++) {
-            parameter_annotation_table[i] = new ParameterAnnotationEntry(input, constant_pool);
+            parameterAnnotationTable[i] = new ParameterAnnotationEntry(input, constant_pool);
         }
     }
 
 
     /**
-     * @param parameter_annotation_type the subclass type of the parameter annotation
-     * @param name_index Index pointing to the name Code
+     * @param parameterAnnotationType the subclass type of the parameter annotation
+     * @param nameIndex Index pointing to the name Code
      * @param length Content length in bytes
-     * @param parameter_annotation_table the actual parameter annotations
-     * @param constant_pool Array of constants
+     * @param parameterAnnotationTable the actual parameter annotations
+     * @param constantPool Array of constants
      */
-    public ParameterAnnotations(final byte parameter_annotation_type, final int name_index, final int length,
-            final ParameterAnnotationEntry[] parameter_annotation_table, final ConstantPool constant_pool) {
-        super(parameter_annotation_type, name_index, length, constant_pool);
-        this.parameter_annotation_table = parameter_annotation_table;
+    public ParameterAnnotations(final byte parameterAnnotationType, final int nameIndex, final int length,
+            final ParameterAnnotationEntry[] parameterAnnotationTable, final ConstantPool constantPool) {
+        super(parameterAnnotationType, nameIndex, length, constantPool);
+        this.parameterAnnotationTable = parameterAnnotationTable;
     }
 
 
@@ -82,10 +82,10 @@
 
 
     /**
-     * @param parameter_annotation_table the entries to set in this parameter annotation
+     * @param parameterAnnotationTable the entries to set in this parameter annotation
      */
-    public final void setParameterAnnotationTable(final ParameterAnnotationEntry[] parameter_annotation_table ) {
-        this.parameter_annotation_table = parameter_annotation_table;
+    public final void setParameterAnnotationTable(final ParameterAnnotationEntry[] parameterAnnotationTable ) {
+        this.parameterAnnotationTable = parameterAnnotationTable;
     }
 
 
@@ -93,7 +93,7 @@
      * @return the parameter annotation entry table
      */
     public final ParameterAnnotationEntry[] getParameterAnnotationTable() {
-        return parameter_annotation_table;
+        return parameterAnnotationTable;
     }
 
 
@@ -101,16 +101,16 @@
      * returns the array of parameter annotation entries in this parameter annotation
      */
     public ParameterAnnotationEntry[] getParameterAnnotationEntries() {
-        return parameter_annotation_table;
+        return parameterAnnotationTable;
     }
 
     @Override
     public void dump(final DataOutputStream dos) throws IOException
     {
         super.dump(dos);
-        dos.writeByte(parameter_annotation_table.length);
+        dos.writeByte(parameterAnnotationTable.length);
 
-        for (final ParameterAnnotationEntry element : parameter_annotation_table) {
+        for (final ParameterAnnotationEntry element : parameterAnnotationTable) {
             element.dump(dos);
         }
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java	2022-04-19 19:38:30.000000000 +0000
@@ -36,7 +36,7 @@
  */
 public final class Signature extends Attribute {
 
-    private int signature_index;
+    private int signatureIndex;
 
 
     /**
@@ -65,12 +65,12 @@
     /**
      * @param name_index Index in constant pool to CONSTANT_Utf8
      * @param length Content length in bytes
-     * @param signature_index Index in constant pool to CONSTANT_Utf8
+     * @param signatureIndex Index in constant pool to CONSTANT_Utf8
      * @param constant_pool Array of constants
      */
-    public Signature(final int name_index, final int length, final int signature_index, final ConstantPool constant_pool) {
+    public Signature(final int name_index, final int length, final int signatureIndex, final ConstantPool constant_pool) {
         super(Const.ATTR_SIGNATURE, name_index, length, constant_pool);
-        this.signature_index = signature_index;
+        this.signatureIndex = signatureIndex;
     }
 
 
@@ -97,7 +97,7 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(signature_index);
+        file.writeShort(signatureIndex);
     }
 
 
@@ -105,15 +105,15 @@
      * @return Index in constant pool of source file name.
      */
     public int getSignatureIndex() {
-        return signature_index;
+        return signatureIndex;
     }
 
 
     /**
-     * @param signature_index the index info the constant pool of this signature
+     * @param signatureIndex the index info the constant pool of this signature
      */
-    public void setSignatureIndex( final int signature_index ) {
-        this.signature_index = signature_index;
+    public void setSignatureIndex( final int signatureIndex ) {
+        this.signatureIndex = signatureIndex;
     }
 
 
@@ -121,7 +121,7 @@
      * @return GJ signature.
      */
     public String getSignature() {
-        final ConstantUtf8 c = (ConstantUtf8) super.getConstantPool().getConstant(signature_index,
+        final ConstantUtf8 c = (ConstantUtf8) super.getConstantPool().getConstant(signatureIndex,
                 Const.CONSTANT_Utf8);
         return c.getBytes();
     }
@@ -157,7 +157,7 @@
     private static void matchIdent( final MyByteArrayInputStream in, final StringBuilder buf ) {
         int ch;
         if ((ch = in.read()) == -1) {
-            throw new RuntimeException("Illegal signature: " + in.getData()
+            throw new IllegalArgumentException("Illegal signature: " + in.getData()
                     + " no ident, reaching EOF");
         }
         //System.out.println("return from ident:" + (char)ch);
@@ -207,7 +207,7 @@
             matchGJIdent(in, buf);
             while (((ch = in.read()) != '>') && (ch != ')')) { // List of parameters
                 if (ch == -1) {
-                    throw new RuntimeException("Illegal signature: " + in.getData()
+                    throw new IllegalArgumentException("Illegal signature: " + in.getData()
                             + " reaching EOF");
                 }
                 //System.out.println("Still no >");
@@ -228,7 +228,7 @@
             in.unread();
             return;
         } else if (ch != ';') {
-            throw new RuntimeException("Illegal signature: " + in.getData() + " read " + (char) ch);
+            throw new IllegalArgumentException("Illegal signature: " + in.getData() + " read " + (char) ch);
         }
     }
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SimpleElementValue.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SimpleElementValue.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SimpleElementValue.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SimpleElementValue.java	2022-04-19 19:38:30.000000000 +0000
@@ -55,7 +55,7 @@
     public String getValueString()
     {
         if (super.getType() != STRING) {
-            throw new RuntimeException(
+            throw new IllegalStateException(
                     "Dont call getValueString() on a non STRING ElementValue");
         }
         final ConstantUtf8 c = (ConstantUtf8) super.getConstantPool().getConstant(getIndex(),
@@ -66,7 +66,7 @@
     public int getValueInt()
     {
         if (super.getType() != PRIMITIVE_INT) {
-            throw new RuntimeException(
+            throw new IllegalStateException(
                     "Dont call getValueString() on a non STRING ElementValue");
         }
         final ConstantInteger c = (ConstantInteger) super.getConstantPool().getConstant(getIndex(),
@@ -77,7 +77,7 @@
     public byte getValueByte()
     {
         if (super.getType() != PRIMITIVE_BYTE) {
-            throw new RuntimeException(
+            throw new IllegalStateException(
                     "Dont call getValueByte() on a non BYTE ElementValue");
         }
         final ConstantInteger c = (ConstantInteger) super.getConstantPool().getConstant(getIndex(),
@@ -88,7 +88,7 @@
     public char getValueChar()
     {
         if (super.getType() != PRIMITIVE_CHAR) {
-            throw new RuntimeException(
+            throw new IllegalStateException(
                     "Dont call getValueChar() on a non CHAR ElementValue");
         }
         final ConstantInteger c = (ConstantInteger) super.getConstantPool().getConstant(getIndex(),
@@ -99,7 +99,7 @@
     public long getValueLong()
     {
         if (super.getType() != PRIMITIVE_LONG) {
-            throw new RuntimeException(
+            throw new IllegalStateException(
                     "Dont call getValueLong() on a non LONG ElementValue");
         }
         final ConstantLong j = (ConstantLong) super.getConstantPool().getConstant(getIndex());
@@ -109,7 +109,7 @@
     public float getValueFloat()
     {
         if (super.getType() != PRIMITIVE_FLOAT) {
-            throw new RuntimeException(
+            throw new IllegalStateException(
                     "Dont call getValueFloat() on a non FLOAT ElementValue");
         }
         final ConstantFloat f = (ConstantFloat) super.getConstantPool().getConstant(getIndex());
@@ -119,7 +119,7 @@
     public double getValueDouble()
     {
         if (super.getType() != PRIMITIVE_DOUBLE) {
-            throw new RuntimeException(
+            throw new IllegalStateException(
                     "Dont call getValueDouble() on a non DOUBLE ElementValue");
         }
         final ConstantDouble d = (ConstantDouble) super.getConstantPool().getConstant(getIndex());
@@ -129,7 +129,7 @@
     public boolean getValueBoolean()
     {
         if (super.getType() != PRIMITIVE_BOOLEAN) {
-            throw new RuntimeException(
+            throw new IllegalStateException(
                     "Dont call getValueBoolean() on a non BOOLEAN ElementValue");
         }
         final ConstantInteger bo = (ConstantInteger) super.getConstantPool().getConstant(getIndex());
@@ -139,7 +139,7 @@
     public short getValueShort()
     {
         if (super.getType() != PRIMITIVE_SHORT) {
-            throw new RuntimeException(
+            throw new IllegalStateException(
                     "Dont call getValueShort() on a non SHORT ElementValue");
         }
         final ConstantInteger s = (ConstantInteger) super.getConstantPool().getConstant(getIndex());
@@ -200,7 +200,7 @@
                     Const.CONSTANT_Utf8);
             return cu8.getBytes();
         default:
-            throw new RuntimeException("SimpleElementValue class does not know how to stringify type " + _type);
+            throw new IllegalStateException("SimpleElementValue class does not know how to stringify type " + _type);
         }
     }
 
@@ -223,7 +223,7 @@
             dos.writeShort(getIndex());
             break;
         default:
-            throw new RuntimeException("SimpleElementValue doesnt know how to write out type " + _type);
+            throw new IllegalStateException("SimpleElementValue doesnt know how to write out type " + _type);
         }
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java	2022-04-19 19:38:30.000000000 +0000
@@ -37,7 +37,7 @@
  */
 public final class SourceFile extends Attribute {
 
-    private int sourcefile_index;
+    private int sourceFileIndex;
 
 
     /**
@@ -67,18 +67,18 @@
      * @param name_index Index in constant pool to CONSTANT_Utf8, which
      * should represent the string "SourceFile".
      * @param length Content length in bytes, the value should be 2.
-     * @param constant_pool The constant pool that this attribute is
+     * @param constantPool The constant pool that this attribute is
      * associated with.
-     * @param sourcefile_index Index in constant pool to CONSTANT_Utf8.  This
+     * @param sourceFileIndex Index in constant pool to CONSTANT_Utf8.  This
      * string will be interpreted as the name of the file from which this
      * class was compiled.  It will not be interpreted as indicating the name
      * of the directory contqining the file or an absolute path; this
      * information has to be supplied the consumer of this attribute - in
      * many cases, the JVM.
      */
-    public SourceFile(final int name_index, final int length, final int sourcefile_index, final ConstantPool constant_pool) {
-        super(Const.ATTR_SOURCE_FILE, name_index, length, constant_pool);
-        this.sourcefile_index = sourcefile_index;
+    public SourceFile(final int name_index, final int length, final int sourceFileIndex, final ConstantPool constantPool) {
+        super(Const.ATTR_SOURCE_FILE, name_index, length, constantPool);
+        this.sourceFileIndex = sourceFileIndex;
     }
 
 
@@ -104,7 +104,7 @@
     @Override
     public void dump( final DataOutputStream file ) throws IOException {
         super.dump(file);
-        file.writeShort(sourcefile_index);
+        file.writeShort(sourceFileIndex);
     }
 
 
@@ -112,15 +112,15 @@
      * @return Index in constant pool of source file name.
      */
     public int getSourceFileIndex() {
-        return sourcefile_index;
+        return sourceFileIndex;
     }
 
 
     /**
-     * @param sourcefile_index
+     * @param sourceFileIndex
      */
-    public void setSourceFileIndex( final int sourcefile_index ) {
-        this.sourcefile_index = sourcefile_index;
+    public void setSourceFileIndex( final int sourceFileIndex ) {
+        this.sourceFileIndex = sourceFileIndex;
     }
 
 
@@ -128,7 +128,7 @@
      * @return Source file name.
      */
     public String getSourceFileName() {
-        final ConstantUtf8 c = (ConstantUtf8) super.getConstantPool().getConstant(sourcefile_index,
+        final ConstantUtf8 c = (ConstantUtf8) super.getConstantPool().getConstant(sourceFileIndex,
                 Const.CONSTANT_Utf8);
         return c.getBytes();
     }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -39,6 +38,7 @@
  * @see     Code
  * @see     StackMapEntry
  * @see     StackMapType
+ * @LastModified: Oct 2020
  */
 public final class StackMap extends Attribute {
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java	2022-04-19 19:38:30.000000000 +0000
@@ -37,11 +37,11 @@
 public final class StackMapEntry implements Node, Cloneable
 {
 
-    private int frame_type;
-    private int byte_code_offset;
-    private StackMapType[] types_of_locals;
-    private StackMapType[] types_of_stack_items;
-    private ConstantPool constant_pool;
+    private int frameType;
+    private int byteCodeOffset;
+    private StackMapType[] typesOfLocals;
+    private StackMapType[] typesOfStackItems;
+    private ConstantPool constantPool;
 
 
     /**
@@ -53,43 +53,43 @@
     StackMapEntry(final DataInput input, final ConstantPool constantPool) throws IOException {
         this(input.readByte() & 0xFF, -1, null, null, constantPool);
 
-        if (frame_type >= Const.SAME_FRAME && frame_type <= Const.SAME_FRAME_MAX) {
-            byte_code_offset = frame_type - Const.SAME_FRAME;
-        } else if (frame_type >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
-                   frame_type <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
-            byte_code_offset = frame_type - Const.SAME_LOCALS_1_STACK_ITEM_FRAME;
-            types_of_stack_items = new StackMapType[1];
-            types_of_stack_items[0] = new StackMapType(input, constantPool);
-        } else if (frame_type == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
-            byte_code_offset = input.readShort();
-            types_of_stack_items = new StackMapType[1];
-            types_of_stack_items[0] = new StackMapType(input, constantPool);
-        } else if (frame_type >= Const.CHOP_FRAME && frame_type <= Const.CHOP_FRAME_MAX) {
-            byte_code_offset = input.readShort();
-        } else if (frame_type == Const.SAME_FRAME_EXTENDED) {
-            byte_code_offset = input.readShort();
-        } else if (frame_type >= Const.APPEND_FRAME && frame_type <= Const.APPEND_FRAME_MAX) {
-            byte_code_offset = input.readShort();
-            final int number_of_locals = frame_type - 251;
-            types_of_locals = new StackMapType[number_of_locals];
+        if (frameType >= Const.SAME_FRAME && frameType <= Const.SAME_FRAME_MAX) {
+            byteCodeOffset = frameType - Const.SAME_FRAME;
+        } else if (frameType >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
+                   frameType <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
+            byteCodeOffset = frameType - Const.SAME_LOCALS_1_STACK_ITEM_FRAME;
+            typesOfStackItems = new StackMapType[1];
+            typesOfStackItems[0] = new StackMapType(input, constantPool);
+        } else if (frameType == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
+            byteCodeOffset = input.readShort();
+            typesOfStackItems = new StackMapType[1];
+            typesOfStackItems[0] = new StackMapType(input, constantPool);
+        } else if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX) {
+            byteCodeOffset = input.readShort();
+        } else if (frameType == Const.SAME_FRAME_EXTENDED) {
+            byteCodeOffset = input.readShort();
+        } else if (frameType >= Const.APPEND_FRAME && frameType <= Const.APPEND_FRAME_MAX) {
+            byteCodeOffset = input.readShort();
+            final int number_of_locals = frameType - 251;
+            typesOfLocals = new StackMapType[number_of_locals];
             for (int i = 0; i < number_of_locals; i++) {
-                types_of_locals[i] = new StackMapType(input, constantPool);
+                typesOfLocals[i] = new StackMapType(input, constantPool);
             }
-        } else if (frame_type == Const.FULL_FRAME) {
-            byte_code_offset = input.readShort();
+        } else if (frameType == Const.FULL_FRAME) {
+            byteCodeOffset = input.readShort();
             final int number_of_locals = input.readShort();
-            types_of_locals = new StackMapType[number_of_locals];
+            typesOfLocals = new StackMapType[number_of_locals];
             for (int i = 0; i < number_of_locals; i++) {
-                types_of_locals[i] = new StackMapType(input, constantPool);
+                typesOfLocals[i] = new StackMapType(input, constantPool);
             }
             final int number_of_stack_items = input.readShort();
-            types_of_stack_items = new StackMapType[number_of_stack_items];
+            typesOfStackItems = new StackMapType[number_of_stack_items];
             for (int i = 0; i < number_of_stack_items; i++) {
-                types_of_stack_items[i] = new StackMapType(input, constantPool);
+                typesOfStackItems[i] = new StackMapType(input, constantPool);
             }
         } else {
             /* Can't happen */
-            throw new ClassFormatException ("Invalid frame type found while parsing stack map table: " + frame_type);
+            throw new ClassFormatException ("Invalid frame type found while parsing stack map table: " + frameType);
         }
     }
 
@@ -109,16 +109,16 @@
     public StackMapEntry(final int byteCodeOffset, final int numberOfLocals,
             final StackMapType[] typesOfLocals, final int numberOfStackItems,
             final StackMapType[] typesOfStackItems, final ConstantPool constantPool) {
-        this.byte_code_offset = byteCodeOffset;
-        this.types_of_locals = typesOfLocals != null ? typesOfLocals : new StackMapType[0];
-        this.types_of_stack_items = typesOfStackItems != null ? typesOfStackItems : new StackMapType[0];
-        this.constant_pool = constantPool;
+        this.byteCodeOffset = byteCodeOffset;
+        this.typesOfLocals = typesOfLocals != null ? typesOfLocals : new StackMapType[0];
+        this.typesOfStackItems = typesOfStackItems != null ? typesOfStackItems : new StackMapType[0];
+        this.constantPool = constantPool;
     }
 
     /**
      * Create an instance
      *
-     * @param tag the frame_type to use
+     * @param tag the frameType to use
      * @param byteCodeOffset
      * @param typesOfLocals array of {@link StackMapType}s of locals
      * @param typesOfStackItems array ot {@link StackMapType}s of stack items
@@ -127,11 +127,11 @@
     public StackMapEntry(final int tag, final int byteCodeOffset,
             final StackMapType[] typesOfLocals,
             final StackMapType[] typesOfStackItems, final ConstantPool constantPool) {
-        this.frame_type = tag;
-        this.byte_code_offset = byteCodeOffset;
-        this.types_of_locals = typesOfLocals != null ? typesOfLocals : new StackMapType[0];
-        this.types_of_stack_items = typesOfStackItems != null ? typesOfStackItems : new StackMapType[0];
-        this.constant_pool = constantPool;
+        this.frameType = tag;
+        this.byteCodeOffset = byteCodeOffset;
+        this.typesOfLocals = typesOfLocals != null ? typesOfLocals : new StackMapType[0];
+        this.typesOfStackItems = typesOfStackItems != null ? typesOfStackItems : new StackMapType[0];
+        this.constantPool = constantPool;
     }
 
 
@@ -142,37 +142,37 @@
      * @throws IOException
      */
     public void dump( final DataOutputStream file ) throws IOException {
-        file.write(frame_type);
-        if (frame_type >= Const.SAME_FRAME && frame_type <= Const.SAME_FRAME_MAX) {
+        file.write(frameType);
+        if (frameType >= Const.SAME_FRAME && frameType <= Const.SAME_FRAME_MAX) {
             // nothing to be done
-        } else if (frame_type >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
-                   frame_type <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
-            types_of_stack_items[0].dump(file);
-        } else if (frame_type == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
-            file.writeShort(byte_code_offset);
-            types_of_stack_items[0].dump(file);
-        } else if (frame_type >= Const.CHOP_FRAME && frame_type <= Const.CHOP_FRAME_MAX) {
-            file.writeShort(byte_code_offset);
-        } else if (frame_type == Const.SAME_FRAME_EXTENDED) {
-            file.writeShort(byte_code_offset);
-        } else if (frame_type >= Const.APPEND_FRAME && frame_type <= Const.APPEND_FRAME_MAX) {
-            file.writeShort(byte_code_offset);
-            for (final StackMapType type : types_of_locals) {
+        } else if (frameType >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
+                   frameType <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
+            typesOfStackItems[0].dump(file);
+        } else if (frameType == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
+            file.writeShort(byteCodeOffset);
+            typesOfStackItems[0].dump(file);
+        } else if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX) {
+            file.writeShort(byteCodeOffset);
+        } else if (frameType == Const.SAME_FRAME_EXTENDED) {
+            file.writeShort(byteCodeOffset);
+        } else if (frameType >= Const.APPEND_FRAME && frameType <= Const.APPEND_FRAME_MAX) {
+            file.writeShort(byteCodeOffset);
+            for (final StackMapType type : typesOfLocals) {
                 type.dump(file);
             }
-        } else if (frame_type == Const.FULL_FRAME) {
-            file.writeShort(byte_code_offset);
-            file.writeShort(types_of_locals.length);
-            for (final StackMapType type : types_of_locals) {
+        } else if (frameType == Const.FULL_FRAME) {
+            file.writeShort(byteCodeOffset);
+            file.writeShort(typesOfLocals.length);
+            for (final StackMapType type : typesOfLocals) {
                 type.dump(file);
             }
-            file.writeShort(types_of_stack_items.length);
-            for (final StackMapType type : types_of_stack_items) {
+            file.writeShort(typesOfStackItems.length);
+            for (final StackMapType type : typesOfStackItems) {
                 type.dump(file);
             }
         } else {
             /* Can't happen */
-            throw new ClassFormatException ("Invalid Stack map table tag: " + frame_type);
+            throw new ClassFormatException ("Invalid Stack map table tag: " + frameType);
         }
     }
 
@@ -184,40 +184,40 @@
     public String toString() {
         final StringBuilder buf = new StringBuilder(64);
         buf.append("(");
-        if (frame_type >= Const.SAME_FRAME && frame_type <= Const.SAME_FRAME_MAX) {
+        if (frameType >= Const.SAME_FRAME && frameType <= Const.SAME_FRAME_MAX) {
             buf.append("SAME");
-        } else if (frame_type >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
-                  frame_type <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
+        } else if (frameType >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
+                  frameType <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
             buf.append("SAME_LOCALS_1_STACK");
-        } else if (frame_type == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
+        } else if (frameType == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
             buf.append("SAME_LOCALS_1_STACK_EXTENDED");
-        } else if (frame_type >= Const.CHOP_FRAME && frame_type <= Const.CHOP_FRAME_MAX) {
-            buf.append("CHOP ").append(String.valueOf(251-frame_type));
-        } else if (frame_type == Const.SAME_FRAME_EXTENDED) {
+        } else if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX) {
+            buf.append("CHOP ").append(String.valueOf(251-frameType));
+        } else if (frameType == Const.SAME_FRAME_EXTENDED) {
             buf.append("SAME_EXTENDED");
-        } else if (frame_type >= Const.APPEND_FRAME && frame_type <= Const.APPEND_FRAME_MAX) {
-            buf.append("APPEND ").append(String.valueOf(frame_type-251));
-        } else if (frame_type == Const.FULL_FRAME) {
+        } else if (frameType >= Const.APPEND_FRAME && frameType <= Const.APPEND_FRAME_MAX) {
+            buf.append("APPEND ").append(String.valueOf(frameType-251));
+        } else if (frameType == Const.FULL_FRAME) {
             buf.append("FULL");
         } else {
-            buf.append("UNKNOWN (").append(frame_type).append(")");
+            buf.append("UNKNOWN (").append(frameType).append(")");
         }
-        buf.append(", offset delta=").append(byte_code_offset);
-        if (types_of_locals.length > 0) {
+        buf.append(", offset delta=").append(byteCodeOffset);
+        if (typesOfLocals.length > 0) {
             buf.append(", locals={");
-            for (int i = 0; i < types_of_locals.length; i++) {
-                buf.append(types_of_locals[i]);
-                if (i < types_of_locals.length - 1) {
+            for (int i = 0; i < typesOfLocals.length; i++) {
+                buf.append(typesOfLocals[i]);
+                if (i < typesOfLocals.length - 1) {
                     buf.append(", ");
                 }
             }
             buf.append("}");
         }
-        if (types_of_stack_items.length > 0) {
+        if (typesOfStackItems.length > 0) {
             buf.append(", stack items={");
-            for (int i = 0; i < types_of_stack_items.length; i++) {
-                buf.append(types_of_stack_items[i]);
-                if (i < types_of_stack_items.length - 1) {
+            for (int i = 0; i < typesOfStackItems.length; i++) {
+                buf.append(typesOfStackItems[i]);
+                if (i < typesOfStackItems.length - 1) {
                     buf.append(", ");
                 }
             }
@@ -233,91 +233,91 @@
      *
      */
     int getMapEntrySize() {
-        if (frame_type >= Const.SAME_FRAME && frame_type <= Const.SAME_FRAME_MAX) {
+        if (frameType >= Const.SAME_FRAME && frameType <= Const.SAME_FRAME_MAX) {
             return 1;
-        } else if (frame_type >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
-                   frame_type <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
-            return 1 + (types_of_stack_items[0].hasIndex() ? 3 : 1);
-        } else if (frame_type == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
-            return 3 + (types_of_stack_items[0].hasIndex() ? 3 : 1);
-        } else if (frame_type >= Const.CHOP_FRAME && frame_type <= Const.CHOP_FRAME_MAX) {
+        } else if (frameType >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
+                   frameType <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
+            return 1 + (typesOfStackItems[0].hasIndex() ? 3 : 1);
+        } else if (frameType == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
+            return 3 + (typesOfStackItems[0].hasIndex() ? 3 : 1);
+        } else if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX) {
             return 3;
-        } else if (frame_type == Const.SAME_FRAME_EXTENDED) {
+        } else if (frameType == Const.SAME_FRAME_EXTENDED) {
             return 3;
-        } else if (frame_type >= Const.APPEND_FRAME && frame_type <= Const.APPEND_FRAME_MAX) {
+        } else if (frameType >= Const.APPEND_FRAME && frameType <= Const.APPEND_FRAME_MAX) {
             int len = 3;
-            for (final StackMapType types_of_local : types_of_locals) {
+            for (final StackMapType types_of_local : typesOfLocals) {
                 len += types_of_local.hasIndex() ? 3 : 1;
             }
             return len;
-        } else if (frame_type == Const.FULL_FRAME) {
+        } else if (frameType == Const.FULL_FRAME) {
             int len = 7;
-            for (final StackMapType types_of_local : types_of_locals) {
+            for (final StackMapType types_of_local : typesOfLocals) {
                 len += types_of_local.hasIndex() ? 3 : 1;
             }
-            for (final StackMapType types_of_stack_item : types_of_stack_items) {
+            for (final StackMapType types_of_stack_item : typesOfStackItems) {
                 len += types_of_stack_item.hasIndex() ? 3 : 1;
             }
             return len;
         } else {
-            throw new RuntimeException("Invalid StackMap frame_type: " + frame_type);
+            throw new IllegalStateException("Invalid StackMap frameType: " + frameType);
         }
     }
 
 
     public void setFrameType( final int f ) {
         if (f >= Const.SAME_FRAME && f <= Const.SAME_FRAME_MAX) {
-            byte_code_offset = f - Const.SAME_FRAME;
+            byteCodeOffset = f - Const.SAME_FRAME;
         } else if (f >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
                    f <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
-            byte_code_offset = f - Const.SAME_LOCALS_1_STACK_ITEM_FRAME;
+            byteCodeOffset = f - Const.SAME_LOCALS_1_STACK_ITEM_FRAME;
         } else if (f == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) { // CHECKSTYLE IGNORE EmptyBlock
         } else if (f >= Const.CHOP_FRAME && f <= Const.CHOP_FRAME_MAX) { // CHECKSTYLE IGNORE EmptyBlock
         } else if (f == Const.SAME_FRAME_EXTENDED) { // CHECKSTYLE IGNORE EmptyBlock
         } else if (f >= Const.APPEND_FRAME && f <= Const.APPEND_FRAME_MAX) { // CHECKSTYLE IGNORE EmptyBlock
         } else if (f == Const.FULL_FRAME) { // CHECKSTYLE IGNORE EmptyBlock
         } else {
-            throw new RuntimeException("Invalid StackMap frame_type");
+            throw new IllegalArgumentException("Invalid StackMap frameType");
         }
-        frame_type = f;
+        frameType = f;
     }
 
 
     public int getFrameType() {
-        return frame_type;
+        return frameType;
     }
 
 
     public void setByteCodeOffset( final int new_offset ) {
         if (new_offset < 0 || new_offset > 32767) {
-            throw new RuntimeException("Invalid StackMap offset: " + new_offset);
+            throw new IllegalArgumentException("Invalid StackMap offset: " + new_offset);
         }
 
-        if (frame_type >= Const.SAME_FRAME &&
-            frame_type <= Const.SAME_FRAME_MAX) {
+        if (frameType >= Const.SAME_FRAME &&
+            frameType <= Const.SAME_FRAME_MAX) {
             if (new_offset > Const.SAME_FRAME_MAX) {
-                frame_type = Const.SAME_FRAME_EXTENDED;
+                frameType = Const.SAME_FRAME_EXTENDED;
             } else {
-                frame_type = new_offset;
+                frameType = new_offset;
             }
-        } else if (frame_type >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
-                   frame_type <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
+        } else if (frameType >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME &&
+                   frameType <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
             if (new_offset > Const.SAME_FRAME_MAX) {
-                frame_type = Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED;
+                frameType = Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED;
             } else {
-                frame_type = Const.SAME_LOCALS_1_STACK_ITEM_FRAME + new_offset;
+                frameType = Const.SAME_LOCALS_1_STACK_ITEM_FRAME + new_offset;
             }
-        } else if (frame_type == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) { // CHECKSTYLE IGNORE EmptyBlock
-        } else if (frame_type >= Const.CHOP_FRAME &&
-                   frame_type <= Const.CHOP_FRAME_MAX) { // CHECKSTYLE IGNORE EmptyBlock
-        } else if (frame_type == Const.SAME_FRAME_EXTENDED) { // CHECKSTYLE IGNORE EmptyBlock
-        } else if (frame_type >= Const.APPEND_FRAME &&
-                   frame_type <= Const.APPEND_FRAME_MAX) { // CHECKSTYLE IGNORE EmptyBlock
-        } else if (frame_type == Const.FULL_FRAME) { // CHECKSTYLE IGNORE EmptyBlock
+        } else if (frameType == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) { // CHECKSTYLE IGNORE EmptyBlock
+        } else if (frameType >= Const.CHOP_FRAME &&
+                   frameType <= Const.CHOP_FRAME_MAX) { // CHECKSTYLE IGNORE EmptyBlock
+        } else if (frameType == Const.SAME_FRAME_EXTENDED) { // CHECKSTYLE IGNORE EmptyBlock
+        } else if (frameType >= Const.APPEND_FRAME &&
+                   frameType <= Const.APPEND_FRAME_MAX) { // CHECKSTYLE IGNORE EmptyBlock
+        } else if (frameType == Const.FULL_FRAME) { // CHECKSTYLE IGNORE EmptyBlock
         } else {
-            throw new RuntimeException("Invalid StackMap frame_type: " + frame_type);
+            throw new IllegalStateException("Invalid StackMap frameType: " + frameType);
         }
-        byte_code_offset = new_offset;
+        byteCodeOffset = new_offset;
     }
 
 
@@ -329,12 +329,12 @@
      * @param delta offset delta
      */
     public void updateByteCodeOffset(final int delta) {
-        setByteCodeOffset(byte_code_offset + delta);
+        setByteCodeOffset(byteCodeOffset + delta);
     }
 
 
     public int getByteCodeOffset() {
-        return byte_code_offset;
+        return byteCodeOffset;
     }
 
 
@@ -348,17 +348,17 @@
 
 
     public int getNumberOfLocals() {
-        return types_of_locals.length;
+        return typesOfLocals.length;
     }
 
 
     public void setTypesOfLocals( final StackMapType[] types ) {
-        types_of_locals = types != null ? types : new StackMapType[0];
+        typesOfLocals = types != null ? types : new StackMapType[0];
     }
 
 
     public StackMapType[] getTypesOfLocals() {
-        return types_of_locals;
+        return typesOfLocals;
     }
 
 
@@ -372,17 +372,17 @@
 
 
     public int getNumberOfStackItems() {
-        return types_of_stack_items.length;
+        return typesOfStackItems.length;
     }
 
 
     public void setTypesOfStackItems( final StackMapType[] types ) {
-        types_of_stack_items = types != null ? types : new StackMapType[0];
+        typesOfStackItems = types != null ? types : new StackMapType[0];
     }
 
 
     public StackMapType[] getTypesOfStackItems() {
-        return types_of_stack_items;
+        return typesOfStackItems;
     }
 
 
@@ -397,13 +397,13 @@
             throw new Error("Clone Not Supported");
         }
 
-        e.types_of_locals = new StackMapType[types_of_locals.length];
-        for (int i = 0; i < types_of_locals.length; i++) {
-            e.types_of_locals[i] = types_of_locals[i].copy();
-        }
-        e.types_of_stack_items = new StackMapType[types_of_stack_items.length];
-        for (int i = 0; i < types_of_stack_items.length; i++) {
-            e.types_of_stack_items[i] = types_of_stack_items[i].copy();
+        e.typesOfLocals = new StackMapType[typesOfLocals.length];
+        for (int i = 0; i < typesOfLocals.length; i++) {
+            e.typesOfLocals[i] = typesOfLocals[i].copy();
+        }
+        e.typesOfStackItems = new StackMapType[typesOfStackItems.length];
+        for (int i = 0; i < typesOfStackItems.length; i++) {
+            e.typesOfStackItems[i] = typesOfStackItems[i].copy();
         }
         return e;
     }
@@ -426,14 +426,14 @@
      * @return Constant pool used by this object.
      */
     public ConstantPool getConstantPool() {
-        return constant_pool;
+        return constantPool;
     }
 
 
     /**
-     * @param constant_pool Constant pool to be used for this object.
+     * @param constantPool Constant pool to be used for this object.
      */
-    public void setConstantPool( final ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
+    public void setConstantPool( final ConstantPool constantPool ) {
+        this.constantPool = constantPool;
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java	2022-04-19 19:38:30.000000000 +0000
@@ -39,7 +39,7 @@
 
     private byte type;
     private int index = -1; // Index to CONSTANT_Class or offset
-    private ConstantPool constant_pool;
+    private ConstantPool constantPool;
 
 
     /**
@@ -52,7 +52,7 @@
         if (hasIndex()) {
             this.index = file.readShort();
         }
-        this.constant_pool = constant_pool;
+        this.constantPool = constant_pool;
     }
 
 
@@ -62,17 +62,17 @@
      */
     public StackMapType(final byte type, final int index, final ConstantPool constant_pool) {
         if ((type < Const.ITEM_Bogus) || (type > Const.ITEM_NewObject)) {
-            throw new RuntimeException("Illegal type for StackMapType: " + type);
+            throw new IllegalArgumentException("Illegal type for StackMapType: " + type);
         }
         this.type = type;
         this.index = index;
-        this.constant_pool = constant_pool;
+        this.constantPool = constant_pool;
     }
 
 
     public void setType( final byte t ) {
         if ((t < Const.ITEM_Bogus) || (t > Const.ITEM_NewObject)) {
-            throw new RuntimeException("Illegal type for StackMapType: " + t);
+            throw new IllegalArgumentException("Illegal type for StackMapType: " + t);
         }
         type = t;
     }
@@ -122,7 +122,7 @@
             if (index < 0) {
                 return ", class=";
             }
-            return ", class=" + constant_pool.constantToString(index, Const.CONSTANT_Class);
+            return ", class=" + constantPool.constantToString(index, Const.CONSTANT_Class);
         } else if (type == Const.ITEM_NewObject) {
             return ", offset=" + index;
         } else {
@@ -157,14 +157,14 @@
      * @return Constant pool used by this object.
      */
     public ConstantPool getConstantPool() {
-        return constant_pool;
+        return constantPool;
     }
 
 
     /**
-     * @param constant_pool Constant pool to be used for this object.
+     * @param constantPool Constant pool to be used for this object.
      */
-    public void setConstantPool( final ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
+    public void setConstantPool( final ConstantPool constantPool ) {
+        this.constantPool = constantPool;
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Unknown.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Unknown.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Unknown.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Unknown.java	2022-04-19 19:38:30.000000000 +0000
@@ -45,15 +45,15 @@
 
     private byte[] bytes;
     private final String name;
-    private static final Map unknown_attributes = new HashMap<>();
+    private static final Map unknownAttributes = new HashMap<>();
 
 
     /** @return array of unknown attributes, but just one for each kind.
      */
     static Unknown[] getUnknownAttributes() {
-        final Unknown[] unknowns = new Unknown[unknown_attributes.size()];
-        unknown_attributes.values().toArray(unknowns);
-        unknown_attributes.clear();
+        final Unknown[] unknowns = new Unknown[unknownAttributes.size()];
+        unknownAttributes.values().toArray(unknowns);
+        unknownAttributes.clear();
         return unknowns;
     }
 
@@ -80,7 +80,7 @@
         this.bytes = bytes;
         name = ((ConstantUtf8) constant_pool.getConstant(name_index, Const.CONSTANT_Utf8))
                 .getBytes();
-        unknown_attributes.put(name, this);
+        unknownAttributes.put(name, this);
     }
 
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -42,7 +42,7 @@
 /**
  * Utility functions that do not really belong to any class in particular.
  *
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 // @since 6.0 methods are no longer final
 public abstract class Utility {
@@ -772,10 +772,10 @@
      * There is some nomenclature confusion through much of the BCEL code base with
      * respect to the terms Descriptor and Signature.  For the offical definitions see:
      *
-     * @see 
+     * @see 
      * Descriptors in The Java Virtual Machine Specification
      *
-     * @see 
+     * @see 
      * Signatures in The Java Virtual Machine Specification
      *
      * In brief, a descriptor is a string representing the type of a field or method.
@@ -835,30 +835,29 @@
             index += unwrap(consumed_chars); // update position
             // ignore any throws information in the signature
             return type;
-        } else {
-            // Could be Class or Type...
-            type = typeSignatureToString(signature.substring(index), chopit);
+        }
+        // Could be Class or Type...
+        type = typeSignatureToString(signature.substring(index), chopit);
+        index += unwrap(consumed_chars); // update position
+        if ((typeParams.length() == 0) && (index == signature.length())) {
+            // We have a Type signature.
+            return type;
+        }
+        // We have a Class signature.
+        final StringBuilder typeClass = new StringBuilder(typeParams);
+        typeClass.append(" extends ");
+        typeClass.append(type);
+        if (index < signature.length()) {
+            typeClass.append(" implements ");
+            typeClass.append(typeSignatureToString(signature.substring(index), chopit));
+            index += unwrap(consumed_chars); // update position
+        }
+        while (index < signature.length()) {
+            typeClass.append(", ");
+            typeClass.append(typeSignatureToString(signature.substring(index), chopit));
             index += unwrap(consumed_chars); // update position
-            if ((typeParams.length() == 0) && (index == signature.length())) {
-                // We have a Type signature.
-                return type;
-            }
-            // We have a Class signature.
-            final StringBuilder typeClass = new StringBuilder(typeParams);
-            typeClass.append(" extends ");
-            typeClass.append(type);
-            if (index < signature.length()) {
-                typeClass.append(" implements ");
-                typeClass.append(typeSignatureToString(signature.substring(index), chopit));
-                index += unwrap(consumed_chars); // update position
-            }
-            while (index < signature.length()) {
-                typeClass.append(", ");
-                typeClass.append(typeSignatureToString(signature.substring(index), chopit));
-                index += unwrap(consumed_chars); // update position
-            }
-            return typeClass.toString();
         }
+        return typeClass.toString();
     }
 
 
@@ -1149,7 +1148,7 @@
                     break;
                 case '[':
                     if (!char_found) {
-                        throw new RuntimeException("Illegal type: " + type);
+                        throw new IllegalArgumentException("Illegal type: " + type);
                     }
                     index = i;
                     break loop;
@@ -1191,13 +1190,13 @@
             switch (c) {
                 case '[':
                     if (open) {
-                        throw new RuntimeException("Illegally nested brackets:" + brackets);
+                        throw new IllegalArgumentException("Illegally nested brackets:" + brackets);
                     }
                     open = true;
                     break;
                 case ']':
                     if (!open) {
-                        throw new RuntimeException("Illegally nested brackets:" + brackets);
+                        throw new IllegalArgumentException("Illegally nested brackets:" + brackets);
                     }
                     open = false;
                     count++;
@@ -1208,7 +1207,7 @@
             }
         }
         if (open) {
-            throw new RuntimeException("Illegally nested brackets:" + brackets);
+            throw new IllegalArgumentException("Illegally nested brackets:" + brackets);
         }
         return count;
     }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AnnotationElementValueGen.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AnnotationElementValueGen.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AnnotationElementValueGen.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AnnotationElementValueGen.java	2022-04-19 19:38:30.000000000 +0000
@@ -46,7 +46,7 @@
     {
         super(type, cpool);
         if (type != ANNOTATION) {
-            throw new RuntimeException(
+            throw new IllegalArgumentException(
                     "Only element values of type annotation can be built with this ctor - type specified: " + type);
         }
         this.a = annotation;
@@ -69,7 +69,7 @@
     @Override
     public String stringifyValue()
     {
-        throw new RuntimeException("Not implemented yet");
+        throw new UnsupportedOperationException("Not implemented yet");
     }
 
     /**
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayElementValueGen.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayElementValueGen.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayElementValueGen.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayElementValueGen.java	2022-04-19 19:38:30.000000000 +0000
@@ -49,7 +49,7 @@
     {
         super(type, cpool);
         if (type != ARRAY) {
-            throw new RuntimeException(
+            throw new IllegalArgumentException(
                     "Only element values of type array can be built with this ctor - type specified: " + type);
         }
         this.evalues = new ArrayList<>();
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayInstruction.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayInstruction.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayInstruction.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayInstruction.java	2022-04-19 19:38:30.000000000 +0000
@@ -83,7 +83,7 @@
             case com.sun.org.apache.bcel.internal.Const.AASTORE:
                 return Type.OBJECT;
             default:
-                throw new ClassGenException("Oops: unknown case in switch" + _opcode);
+                throw new ClassGenException("Unknown case in switch" + _opcode);
         }
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java	2022-04-19 19:38:30.000000000 +0000
@@ -29,7 +29,7 @@
 public final class ArrayType extends ReferenceType {
 
     private int dimensions;
-    private Type basic_type;
+    private Type basicType;
 
 
     /**
@@ -66,20 +66,20 @@
             case Const.T_ARRAY:
                 final ArrayType array = (ArrayType) type;
                 this.dimensions = dimensions + array.dimensions;
-                basic_type = array.basic_type;
+                basicType = array.basicType;
                 break;
             case Const.T_VOID:
                 throw new ClassGenException("Invalid type: void[]");
             default: // Basic type or reference
                 this.dimensions = dimensions;
-                basic_type = type;
+                basicType = type;
                 break;
         }
         final StringBuilder buf = new StringBuilder();
         for (int i = 0; i < this.dimensions; i++) {
             buf.append('[');
         }
-        buf.append(basic_type.getSignature());
+        buf.append(basicType.getSignature());
         super.setSignature(buf.toString());
     }
 
@@ -88,7 +88,7 @@
      * @return basic type of array, i.e., for int[][][] the basic type is int
      */
     public Type getBasicType() {
-        return basic_type;
+        return basicType;
     }
 
 
@@ -97,9 +97,9 @@
      */
     public Type getElementType() {
         if (dimensions == 1) {
-            return basic_type;
+            return basicType;
         }
-        return new ArrayType(basic_type, dimensions - 1);
+        return new ArrayType(basicType, dimensions - 1);
     }
 
 
@@ -114,7 +114,7 @@
      */
     @Override
     public int hashCode() {
-        return basic_type.hashCode() ^ dimensions;
+        return basicType.hashCode() ^ dimensions;
     }
 
 
@@ -124,7 +124,7 @@
     public boolean equals( final Object _type ) {
         if (_type instanceof ArrayType) {
             final ArrayType array = (ArrayType) _type;
-            return (array.dimensions == dimensions) && array.basic_type.equals(basic_type);
+            return (array.dimensions == dimensions) && array.basicType.equals(basicType);
         }
         return false;
     }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -42,28 +42,28 @@
  * existing java class (file).
  *
  * @see JavaClass
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public class ClassGen extends AccessFlags implements Cloneable {
 
     /* Corresponds to the fields found in a JavaClass object.
      */
-    private String class_name;
-    private String super_class_name;
-    private final String file_name;
-    private int class_name_index = -1;
+    private String className;
+    private String superClassName;
+    private final String fileName;
+    private int classNameIndex = -1;
     private int superclass_name_index = -1;
-    private int major = Const.MAJOR;
-    private int minor = Const.MINOR;
+    private int major = Const.MAJOR_1_1;
+    private int minor = Const.MINOR_1_1;
     private ConstantPoolGen cp; // Template for building up constant pool
     // ArrayLists instead of arrays to gather fields, methods, etc.
-    private final List field_vec = new ArrayList<>();
-    private final List method_vec = new ArrayList<>();
-    private final List attribute_vec = new ArrayList<>();
-    private final List interface_vec = new ArrayList<>();
-    private final List annotation_vec = new ArrayList<>();
+    private final List fieldList = new ArrayList<>();
+    private final List methodList = new ArrayList<>();
+    private final List attributeList = new ArrayList<>();
+    private final List interfaceList = new ArrayList<>();
+    private final List annotationList = new ArrayList<>();
 
-    private static BCELComparator _cmp = new BCELComparator() {
+    private static BCELComparator bcelComparator = new BCELComparator() {
 
         @Override
         public boolean equals( final Object o1, final Object o2 ) {
@@ -83,27 +83,27 @@
 
     /** Convenience constructor to set up some important values initially.
      *
-     * @param class_name fully qualified class name
-     * @param super_class_name fully qualified superclass name
-     * @param file_name source file name
-     * @param access_flags access qualifiers
+     * @param className fully qualified class name
+     * @param superClassName fully qualified superclass name
+     * @param fileName source file name
+     * @param accessFlags access qualifiers
      * @param interfaces implemented interfaces
      * @param cp constant pool to use
      */
-    public ClassGen(final String class_name, final String super_class_name, final String file_name, final int access_flags,
+    public ClassGen(final String className, final String superClassName, final String fileName, final int accessFlags,
             final String[] interfaces, final ConstantPoolGen cp) {
-        super(access_flags);
-        this.class_name = class_name;
-        this.super_class_name = super_class_name;
-        this.file_name = file_name;
+        super(accessFlags);
+        this.className = className;
+        this.superClassName = superClassName;
+        this.fileName = fileName;
         this.cp = cp;
         // Put everything needed by default into the constant pool and the vectors
-        if (file_name != null) {
-            addAttribute(new SourceFile(cp.addUtf8("SourceFile"), 2, cp.addUtf8(file_name), cp
+        if (fileName != null) {
+            addAttribute(new SourceFile(cp.addUtf8("SourceFile"), 2, cp.addUtf8(fileName), cp
                     .getConstantPool()));
         }
-        class_name_index = cp.addClass(class_name);
-        superclass_name_index = cp.addClass(super_class_name);
+        classNameIndex = cp.addClass(className);
+        superclass_name_index = cp.addClass(superClassName);
         if (interfaces != null) {
             for (final String interface1 : interfaces) {
                 addInterface(interface1);
@@ -114,15 +114,15 @@
 
     /** Convenience constructor to set up some important values initially.
      *
-     * @param class_name fully qualified class name
-     * @param super_class_name fully qualified superclass name
-     * @param file_name source file name
-     * @param access_flags access qualifiers
+     * @param className fully qualified class name
+     * @param superClassName fully qualified superclass name
+     * @param fileName source file name
+     * @param accessFlags access qualifiers
      * @param interfaces implemented interfaces
      */
-    public ClassGen(final String class_name, final String super_class_name, final String file_name, final int access_flags,
+    public ClassGen(final String className, final String superClassName, final String fileName, final int accessFlags,
             final String[] interfaces) {
-        this(class_name, super_class_name, file_name, access_flags, interfaces,
+        this(className, superClassName, fileName, accessFlags, interfaces,
                 new ConstantPoolGen());
     }
 
@@ -133,11 +133,11 @@
      */
     public ClassGen(final JavaClass clazz) {
         super(clazz.getAccessFlags());
-        class_name_index = clazz.getClassNameIndex();
+        classNameIndex = clazz.getClassNameIndex();
         superclass_name_index = clazz.getSuperclassNameIndex();
-        class_name = clazz.getClassName();
-        super_class_name = clazz.getSuperclassName();
-        file_name = clazz.getSourceFileName();
+        className = clazz.getClassName();
+        superClassName = clazz.getSuperclassName();
+        fileName = clazz.getSourceFileName();
         cp = new ConstantPoolGen(clazz.getConstantPool());
         major = clazz.getMajor();
         minor = clazz.getMinor();
@@ -205,18 +205,18 @@
         final Field[] fields = getFields();
         final Method[] methods = getMethods();
         Attribute[] attributes = null;
-        if (annotation_vec.isEmpty()) {
+        if (annotationList.isEmpty()) {
             attributes = getAttributes();
         } else {
             // TODO: Sometime later, trash any attributes called 'RuntimeVisibleAnnotations' or 'RuntimeInvisibleAnnotations'
             final Attribute[] annAttributes  = AnnotationEntryGen.getAnnotationAttributes(cp, getAnnotationEntries());
-            attributes = new Attribute[attribute_vec.size()+annAttributes.length];
-            attribute_vec.toArray(attributes);
-            System.arraycopy(annAttributes,0,attributes,attribute_vec.size(),annAttributes.length);
+            attributes = new Attribute[attributeList.size()+annAttributes.length];
+            attributeList.toArray(attributes);
+            System.arraycopy(annAttributes,0,attributes,attributeList.size(),annAttributes.length);
         }
         // Must be last since the above calls may still add something to it
         final ConstantPool _cp = this.cp.getFinalConstantPool();
-        return new JavaClass(class_name_index, superclass_name_index, file_name, major, minor,
+        return new JavaClass(classNameIndex, superclass_name_index, fileName, major, minor,
                 super.getAccessFlags(), _cp, interfaces, fields, methods, attributes);
     }
 
@@ -226,7 +226,7 @@
      * @param name interface to implement (fully qualified class name)
      */
     public void addInterface( final String name ) {
-        interface_vec.add(name);
+        interfaceList.add(name);
     }
 
 
@@ -235,7 +235,7 @@
      * @param name interface to remove (fully qualified name)
      */
     public void removeInterface( final String name ) {
-        interface_vec.remove(name);
+        interfaceList.remove(name);
     }
 
 
@@ -275,11 +275,11 @@
      * @param a attribute to add
      */
     public void addAttribute( final Attribute a ) {
-        attribute_vec.add(a);
+        attributeList.add(a);
     }
 
     public void addAnnotationEntry(final AnnotationEntryGen a) {
-        annotation_vec.add(a);
+        annotationList.add(a);
     }
 
 
@@ -288,7 +288,7 @@
      * @param m method to add
      */
     public void addMethod( final Method m ) {
-        method_vec.add(m);
+        methodList.add(m);
     }
 
 
@@ -301,10 +301,10 @@
     public void addEmptyConstructor( final int access_flags ) {
         final InstructionList il = new InstructionList();
         il.append(InstructionConst.THIS); // Push `this'
-        il.append(new INVOKESPECIAL(cp.addMethodref(super_class_name, "", "()V")));
+        il.append(new INVOKESPECIAL(cp.addMethodref(superClassName, "", "()V")));
         il.append(InstructionConst.RETURN);
         final MethodGen mg = new MethodGen(access_flags, Type.VOID, Type.NO_ARGS, null, "",
-                class_name, il, cp);
+                className, il, cp);
         mg.setMaxStack(1);
         addMethod(mg.getMethod());
     }
@@ -315,19 +315,19 @@
      * @param f field to add
      */
     public void addField( final Field f ) {
-        field_vec.add(f);
+        fieldList.add(f);
     }
 
 
     public boolean containsField( final Field f ) {
-        return field_vec.contains(f);
+        return fieldList.contains(f);
     }
 
 
     /** @return field object with given name, or null
      */
     public Field containsField( final String name ) {
-        for (final Field f : field_vec) {
+        for (final Field f : fieldList) {
             if (f.getName().equals(name)) {
                 return f;
             }
@@ -339,7 +339,7 @@
     /** @return method object with given name and signature, or null
      */
     public Method containsMethod( final String name, final String signature ) {
-        for (final Method m : method_vec) {
+        for (final Method m : methodList) {
             if (m.getName().equals(name) && m.getSignature().equals(signature)) {
                 return m;
             }
@@ -353,7 +353,7 @@
      * @param a attribute to remove
      */
     public void removeAttribute( final Attribute a ) {
-        attribute_vec.remove(a);
+        attributeList.remove(a);
     }
 
 
@@ -362,7 +362,7 @@
      * @param m method to remove
      */
     public void removeMethod( final Method m ) {
-        method_vec.remove(m);
+        methodList.remove(m);
     }
 
 
@@ -373,11 +373,11 @@
         if (new_ == null) {
             throw new ClassGenException("Replacement method must not be null");
         }
-        final int i = method_vec.indexOf(old);
+        final int i = methodList.indexOf(old);
         if (i < 0) {
-            method_vec.add(new_);
+            methodList.add(new_);
         } else {
-            method_vec.set(i, new_);
+            methodList.set(i, new_);
         }
     }
 
@@ -389,11 +389,11 @@
         if (new_ == null) {
             throw new ClassGenException("Replacement method must not be null");
         }
-        final int i = field_vec.indexOf(old);
+        final int i = fieldList.indexOf(old);
         if (i < 0) {
-            field_vec.add(new_);
+            fieldList.add(new_);
         } else {
-            field_vec.set(i, new_);
+            fieldList.set(i, new_);
         }
     }
 
@@ -403,44 +403,44 @@
      * @param f field to remove
      */
     public void removeField( final Field f ) {
-        field_vec.remove(f);
+        fieldList.remove(f);
     }
 
 
     public String getClassName() {
-        return class_name;
+        return className;
     }
 
 
     public String getSuperclassName() {
-        return super_class_name;
+        return superClassName;
     }
 
 
     public String getFileName() {
-        return file_name;
+        return fileName;
     }
 
 
     public void setClassName( final String name ) {
-        class_name = name.replace('/', '.');
-        class_name_index = cp.addClass(name);
+        className = name.replace('/', '.');
+        classNameIndex = cp.addClass(name);
     }
 
 
     public void setSuperclassName( final String name ) {
-        super_class_name = name.replace('/', '.');
+        superClassName = name.replace('/', '.');
         superclass_name_index = cp.addClass(name);
     }
 
 
     public Method[] getMethods() {
-        return method_vec.toArray(new Method[method_vec.size()]);
+        return methodList.toArray(new Method[methodList.size()]);
     }
 
 
     public void setMethods( final Method[] methods ) {
-        method_vec.clear();
+        methodList.clear();
         for (final Method method : methods) {
             addMethod(method);
         }
@@ -448,45 +448,45 @@
 
 
     public void setMethodAt( final Method method, final int pos ) {
-        method_vec.set(pos, method);
+        methodList.set(pos, method);
     }
 
 
     public Method getMethodAt( final int pos ) {
-        return method_vec.get(pos);
+        return methodList.get(pos);
     }
 
 
     public String[] getInterfaceNames() {
-        final int size = interface_vec.size();
+        final int size = interfaceList.size();
         final String[] interfaces = new String[size];
-        interface_vec.toArray(interfaces);
+        interfaceList.toArray(interfaces);
         return interfaces;
     }
 
 
     public int[] getInterfaces() {
-        final int size = interface_vec.size();
+        final int size = interfaceList.size();
         final int[] interfaces = new int[size];
         for (int i = 0; i < size; i++) {
-            interfaces[i] = cp.addClass(interface_vec.get(i));
+            interfaces[i] = cp.addClass(interfaceList.get(i));
         }
         return interfaces;
     }
 
 
     public Field[] getFields() {
-        return field_vec.toArray(new Field[field_vec.size()]);
+        return fieldList.toArray(new Field[fieldList.size()]);
     }
 
 
     public Attribute[] getAttributes() {
-        return attribute_vec.toArray(new Attribute[attribute_vec.size()]);
+        return attributeList.toArray(new Attribute[attributeList.size()]);
     }
 
     //  J5TODO: Should we make calling unpackAnnotations() lazy and put it in here?
     public AnnotationEntryGen[] getAnnotationEntries() {
-        return annotation_vec.toArray(new AnnotationEntryGen[annotation_vec.size()]);
+        return annotationList.toArray(new AnnotationEntryGen[annotationList.size()]);
     }
 
 
@@ -501,15 +501,15 @@
 
 
     public void setClassNameIndex( final int class_name_index ) {
-        this.class_name_index = class_name_index;
-        class_name = cp.getConstantPool().getConstantString(class_name_index,
+        this.classNameIndex = class_name_index;
+        className = cp.getConstantPool().getConstantString(class_name_index,
                 Const.CONSTANT_Class).replace('/', '.');
     }
 
 
     public void setSuperclassNameIndex( final int superclass_name_index ) {
         this.superclass_name_index = superclass_name_index;
-        super_class_name = cp.getConstantPool().getConstantString(superclass_name_index,
+        superClassName = cp.getConstantPool().getConstantString(superclass_name_index,
                 Const.CONSTANT_Class).replace('/', '.');
     }
 
@@ -520,7 +520,7 @@
 
 
     public int getClassNameIndex() {
-        return class_name_index;
+        return classNameIndex;
     }
 
     private List observers;
@@ -572,7 +572,7 @@
      * @return Comparison strategy object
      */
     public static BCELComparator getComparator() {
-        return _cmp;
+        return bcelComparator;
     }
 
 
@@ -580,7 +580,7 @@
      * @param comparator Comparison strategy object
      */
     public static void setComparator( final BCELComparator comparator ) {
-        _cmp = comparator;
+        bcelComparator = comparator;
     }
 
 
@@ -593,7 +593,7 @@
      */
     @Override
     public boolean equals( final Object obj ) {
-        return _cmp.equals(this, obj);
+        return bcelComparator.equals(this, obj);
     }
 
 
@@ -605,6 +605,6 @@
      */
     @Override
     public int hashCode() {
-        return _cmp.hashCode(this);
+        return bcelComparator.hashCode(this);
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java	2022-04-19 19:38:30.000000000 +0000
@@ -37,27 +37,27 @@
  */
 public final class CodeExceptionGen implements InstructionTargeter, Cloneable {
 
-    private InstructionHandle start_pc;
-    private InstructionHandle end_pc;
-    private InstructionHandle handler_pc;
-    private ObjectType catch_type;
+    private InstructionHandle startPc;
+    private InstructionHandle endPc;
+    private InstructionHandle handlerPc;
+    private ObjectType catchType;
 
 
     /**
      * Add an exception handler, i.e., specify region where a handler is active and an
      * instruction where the actual handling is done.
      *
-     * @param start_pc Start of handled region (inclusive)
-     * @param end_pc End of handled region (inclusive)
-     * @param handler_pc Where handling is done
-     * @param catch_type which exception is handled, null for ANY
-     */
-    public CodeExceptionGen(final InstructionHandle start_pc, final InstructionHandle end_pc,
-            final InstructionHandle handler_pc, final ObjectType catch_type) {
-        setStartPC(start_pc);
-        setEndPC(end_pc);
-        setHandlerPC(handler_pc);
-        this.catch_type = catch_type;
+     * @param startPc Start of handled region (inclusive)
+     * @param endPc End of handled region (inclusive)
+     * @param handlerPc Where handling is done
+     * @param catchType which exception is handled, null for ANY
+     */
+    public CodeExceptionGen(final InstructionHandle startPc, final InstructionHandle endPc,
+            final InstructionHandle handlerPc, final ObjectType catchType) {
+        setStartPC(startPc);
+        setEndPC(endPc);
+        setHandlerPC(handlerPc);
+        this.catchType = catchType;
     }
 
 
@@ -71,36 +71,36 @@
      * @param cp constant pool
      */
     public CodeException getCodeException( final ConstantPoolGen cp ) {
-        return new CodeException(start_pc.getPosition(), end_pc.getPosition()
-                + end_pc.getInstruction().getLength(), handler_pc.getPosition(),
-                (catch_type == null) ? 0 : cp.addClass(catch_type));
+        return new CodeException(startPc.getPosition(), endPc.getPosition()
+                + endPc.getInstruction().getLength(), handlerPc.getPosition(),
+                (catchType == null) ? 0 : cp.addClass(catchType));
     }
 
 
     /* Set start of handler
-     * @param start_pc Start of handled region (inclusive)
+     * @param startPc Start of handled region (inclusive)
      */
     public void setStartPC( final InstructionHandle start_pc ) { // TODO could be package-protected?
-        BranchInstruction.notifyTarget(this.start_pc, start_pc, this);
-        this.start_pc = start_pc;
+        BranchInstruction.notifyTarget(this.startPc, start_pc, this);
+        this.startPc = start_pc;
     }
 
 
     /* Set end of handler
-     * @param end_pc End of handled region (inclusive)
+     * @param endPc End of handled region (inclusive)
      */
     public void setEndPC( final InstructionHandle end_pc ) { // TODO could be package-protected?
-        BranchInstruction.notifyTarget(this.end_pc, end_pc, this);
-        this.end_pc = end_pc;
+        BranchInstruction.notifyTarget(this.endPc, end_pc, this);
+        this.endPc = end_pc;
     }
 
 
     /* Set handler code
-     * @param handler_pc Start of handler
+     * @param handlerPc Start of handler
      */
     public void setHandlerPC( final InstructionHandle handler_pc ) { // TODO could be package-protected?
-        BranchInstruction.notifyTarget(this.handler_pc, handler_pc, this);
-        this.handler_pc = handler_pc;
+        BranchInstruction.notifyTarget(this.handlerPc, handler_pc, this);
+        this.handlerPc = handler_pc;
     }
 
 
@@ -111,21 +111,21 @@
     @Override
     public void updateTarget( final InstructionHandle old_ih, final InstructionHandle new_ih ) {
         boolean targeted = false;
-        if (start_pc == old_ih) {
+        if (startPc == old_ih) {
             targeted = true;
             setStartPC(new_ih);
         }
-        if (end_pc == old_ih) {
+        if (endPc == old_ih) {
             targeted = true;
             setEndPC(new_ih);
         }
-        if (handler_pc == old_ih) {
+        if (handlerPc == old_ih) {
             targeted = true;
             setHandlerPC(new_ih);
         }
         if (!targeted) {
-            throw new ClassGenException("Not targeting " + old_ih + ", but {" + start_pc + ", "
-                    + end_pc + ", " + handler_pc + "}");
+            throw new ClassGenException("Not targeting " + old_ih + ", but {" + startPc + ", "
+                    + endPc + ", " + handlerPc + "}");
         }
     }
 
@@ -135,46 +135,46 @@
      */
     @Override
     public boolean containsTarget( final InstructionHandle ih ) {
-        return (start_pc == ih) || (end_pc == ih) || (handler_pc == ih);
+        return (startPc == ih) || (endPc == ih) || (handlerPc == ih);
     }
 
 
     /** Sets the type of the Exception to catch. Set 'null' for ANY. */
-    public void setCatchType( final ObjectType catch_type ) {
-        this.catch_type = catch_type;
+    public void setCatchType( final ObjectType catchType ) {
+        this.catchType = catchType;
     }
 
 
     /** Gets the type of the Exception to catch, 'null' for ANY. */
     public ObjectType getCatchType() {
-        return catch_type;
+        return catchType;
     }
 
 
     /** @return start of handled region (inclusive)
      */
     public InstructionHandle getStartPC() {
-        return start_pc;
+        return startPc;
     }
 
 
     /** @return end of handled region (inclusive)
      */
     public InstructionHandle getEndPC() {
-        return end_pc;
+        return endPc;
     }
 
 
     /** @return start of handler
      */
     public InstructionHandle getHandlerPC() {
-        return handler_pc;
+        return handlerPc;
     }
 
 
     @Override
     public String toString() {
-        return "CodeExceptionGen(" + start_pc + ", " + end_pc + ", " + handler_pc + ")";
+        return "CodeExceptionGen(" + startPc + ", " + endPc + ", " + handlerPc + ")";
     }
 
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPoolGen.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPoolGen.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPoolGen.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPoolGen.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -50,7 +50,7 @@
  * JVM and that Double and Long constants need two slots.
  *
  * @see Constant
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public class ConstantPoolGen {
 
@@ -98,15 +98,15 @@
                 final ConstantString s = (ConstantString) c;
                 final ConstantUtf8 u8 = (ConstantUtf8) constants[s.getStringIndex()];
                 final String key = u8.getBytes();
-                if (!string_table.containsKey(key)) {
-                    string_table.put(key, new Index(i));
+                if (!stringTable.containsKey(key)) {
+                    stringTable.put(key, new Index(i));
                 }
             } else if (c instanceof ConstantClass) {
                 final ConstantClass s = (ConstantClass) c;
                 final ConstantUtf8 u8 = (ConstantUtf8) constants[s.getNameIndex()];
                 final String key = u8.getBytes();
-                if (!class_table.containsKey(key)) {
-                    class_table.put(key, new Index(i));
+                if (!classTable.containsKey(key)) {
+                    classTable.put(key, new Index(i));
                 }
             } else if (c instanceof ConstantNameAndType) {
                 final ConstantNameAndType n = (ConstantNameAndType) c;
@@ -119,14 +119,14 @@
                 final String key = sb.toString();
                 sb.delete(0, sb.length());
 
-                if (!n_a_t_table.containsKey(key)) {
-                    n_a_t_table.put(key, new Index(i));
+                if (!natTable.containsKey(key)) {
+                    natTable.put(key, new Index(i));
                 }
             } else if (c instanceof ConstantUtf8) {
                 final ConstantUtf8 u = (ConstantUtf8) c;
                 final String key = u.getBytes();
-                if (!utf8_table.containsKey(key)) {
-                    utf8_table.put(key, new Index(i));
+                if (!utf8Table.containsKey(key)) {
+                    utf8Table.put(key, new Index(i));
                 }
             } else if (c instanceof ConstantCP) {
                 final ConstantCP m = (ConstantCP) c;
@@ -164,8 +164,8 @@
                 final String key = sb.toString();
                 sb.delete(0, sb.length());
 
-                if (!cp_table.containsKey(key)) {
-                    cp_table.put(key, new Index(i));
+                if (!cpTable.containsKey(key)) {
+                    cpTable.put(key, new Index(i));
                 }
             } else if (c == null) { // entries may be null
                 // nothing to do
@@ -220,7 +220,7 @@
         }
     }
 
-    private final Map string_table = new HashMap<>();
+    private final Map stringTable = new HashMap<>();
 
 
     /**
@@ -230,7 +230,7 @@
      * @return index on success, -1 otherwise
      */
     public int lookupString( final String str ) {
-        final Index index = string_table.get(str);
+        final Index index = stringTable.get(str);
         return (index != null) ? index.index : -1;
     }
 
@@ -251,13 +251,13 @@
         final ConstantString s = new ConstantString(utf8);
         ret = index;
         constants[index++] = s;
-        if (!string_table.containsKey(str)) {
-            string_table.put(str, new Index(ret));
+        if (!stringTable.containsKey(str)) {
+            stringTable.put(str, new Index(ret));
         }
         return ret;
     }
 
-    private final Map class_table = new HashMap<>();
+    private final Map classTable = new HashMap<>();
 
 
     /**
@@ -267,7 +267,7 @@
      * @return index on success, -1 otherwise
      */
     public int lookupClass( final String str ) {
-        final Index index = class_table.get(str.replace('.', '/'));
+        final Index index = classTable.get(str.replace('.', '/'));
         return (index != null) ? index.index : -1;
     }
 
@@ -281,8 +281,8 @@
         final ConstantClass c = new ConstantClass(addUtf8(clazz));
         ret = index;
         constants[index++] = c;
-        if (!class_table.containsKey(clazz)) {
-            class_table.put(clazz, new Index(ret));
+        if (!classTable.containsKey(clazz)) {
+            classTable.put(clazz, new Index(ret));
         }
         return ret;
     }
@@ -396,7 +396,7 @@
         return ret;
     }
 
-    private final Map utf8_table = new HashMap<>();
+    private final Map utf8Table = new HashMap<>();
 
 
     /**
@@ -406,7 +406,7 @@
      * @return index on success, -1 otherwise
      */
     public int lookupUtf8( final String n ) {
-        final Index index = utf8_table.get(n);
+        final Index index = utf8Table.get(n);
         return (index != null) ? index.index : -1;
     }
 
@@ -425,8 +425,8 @@
         adjustSize();
         ret = index;
         constants[index++] = new ConstantUtf8(n);
-        if (!utf8_table.containsKey(n)) {
-            utf8_table.put(n, new Index(ret));
+        if (!utf8Table.containsKey(n)) {
+            utf8Table.put(n, new Index(ret));
         }
         return ret;
     }
@@ -508,7 +508,7 @@
         return ret;
     }
 
-    private final Map n_a_t_table = new HashMap<>();
+    private final Map natTable = new HashMap<>();
 
 
     /**
@@ -519,7 +519,7 @@
      * @return index on success, -1 otherwise
      */
     public int lookupNameAndType( final String name, final String signature ) {
-        final Index _index = n_a_t_table.get(name + NAT_DELIM + signature);
+        final Index _index = natTable.get(name + NAT_DELIM + signature);
         return (_index != null) ? _index.index : -1;
     }
 
@@ -545,13 +545,13 @@
         ret = index;
         constants[index++] = new ConstantNameAndType(name_index, signature_index);
         final String key = name + NAT_DELIM + signature;
-        if (!n_a_t_table.containsKey(key)) {
-            n_a_t_table.put(key, new Index(ret));
+        if (!natTable.containsKey(key)) {
+            natTable.put(key, new Index(ret));
         }
         return ret;
     }
 
-    private final Map cp_table = new HashMap<>();
+    private final Map cpTable = new HashMap<>();
 
 
     /**
@@ -563,7 +563,7 @@
      * @return index on success, -1 otherwise
      */
     public int lookupMethodref( final String class_name, final String method_name, final String signature ) {
-        final Index index = cp_table.get(class_name + METHODREF_DELIM + method_name
+        final Index index = cpTable.get(class_name + METHODREF_DELIM + method_name
                 + METHODREF_DELIM + signature);
         return (index != null) ? index.index : -1;
     }
@@ -596,8 +596,8 @@
         ret = index;
         constants[index++] = new ConstantMethodref(class_index, name_and_type_index);
         final String key = class_name + METHODREF_DELIM + method_name + METHODREF_DELIM + signature;
-        if (!cp_table.containsKey(key)) {
-            cp_table.put(key, new Index(ret));
+        if (!cpTable.containsKey(key)) {
+            cpTable.put(key, new Index(ret));
         }
         return ret;
     }
@@ -617,7 +617,7 @@
      * @return index on success, -1 otherwise
      */
     public int lookupInterfaceMethodref( final String class_name, final String method_name, final String signature ) {
-        final Index index = cp_table.get(class_name + IMETHODREF_DELIM + method_name
+        final Index index = cpTable.get(class_name + IMETHODREF_DELIM + method_name
                 + IMETHODREF_DELIM + signature);
         return (index != null) ? index.index : -1;
     }
@@ -651,8 +651,8 @@
         ret = index;
         constants[index++] = new ConstantInterfaceMethodref(class_index, name_and_type_index);
         final String key = class_name + IMETHODREF_DELIM + method_name + IMETHODREF_DELIM + signature;
-        if (!cp_table.containsKey(key)) {
-            cp_table.put(key, new Index(ret));
+        if (!cpTable.containsKey(key)) {
+            cpTable.put(key, new Index(ret));
         }
         return ret;
     }
@@ -672,7 +672,7 @@
      * @return index on success, -1 otherwise
      */
     public int lookupFieldref( final String class_name, final String field_name, final String signature ) {
-        final Index index = cp_table.get(class_name + FIELDREF_DELIM + field_name
+        final Index index = cpTable.get(class_name + FIELDREF_DELIM + field_name
                 + FIELDREF_DELIM + signature);
         return (index != null) ? index.index : -1;
     }
@@ -700,8 +700,8 @@
         ret = index;
         constants[index++] = new ConstantFieldref(class_index, name_and_type_index);
         final String key = class_name + FIELDREF_DELIM + field_name + FIELDREF_DELIM + signature;
-        if (!cp_table.containsKey(key)) {
-            cp_table.put(key, new Index(ret));
+        if (!cpTable.containsKey(key)) {
+            cpTable.put(key, new Index(ret));
         }
         return ret;
     }
@@ -817,11 +817,11 @@
                     case Const.CONSTANT_Fieldref:
                         return addFieldref(class_name, name, signature);
                     default: // Never reached
-                        throw new RuntimeException("Unknown constant type " + c);
+                        throw new IllegalArgumentException("Unknown constant type " + c);
                 }
             }
             default: // Never reached
-                throw new RuntimeException("Unknown constant type " + c);
+                throw new IllegalArgumentException("Unknown constant type " + c);
         }
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValueGen.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValueGen.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValueGen.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValueGen.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -34,7 +34,7 @@
 
 /**
  * @since 6.0
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public abstract class ElementValueGen
 {
@@ -141,7 +141,7 @@
             }
             return new ArrayElementValueGen(ARRAY, evalues, cpGen);
         default:
-            throw new RuntimeException("Unexpected element value kind in annotation: " + type);
+            throw new IllegalArgumentException("Unexpected element value kind in annotation: " + type);
         }
     }
 
@@ -183,7 +183,7 @@
             return new ClassElementValueGen((ClassElementValue) value, cpool,
                     copyPoolEntries);
         default:
-            throw new RuntimeException("Not implemented yet! (" + value.getElementValueType() + ")");
+            throw new UnsupportedOperationException("Not implemented yet! (" + value.getElementValueType() + ")");
         }
     }
 }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValuePairGen.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValuePairGen.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValuePairGen.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValuePairGen.java	2022-04-19 19:38:30.000000000 +0000
@@ -37,19 +37,19 @@
 
     private final ElementValueGen value;
 
-    private final ConstantPoolGen cpool;
+    private final ConstantPoolGen constantPoolGen;
 
     public ElementValuePairGen(final ElementValuePair nvp, final ConstantPoolGen cpool,
             final boolean copyPoolEntries)
     {
-        this.cpool = cpool;
+        this.constantPoolGen = cpool;
         // J5ASSERT:
         // Could assert nvp.getNameString() points to the same thing as
-        // cpool.getConstant(nvp.getNameIndex())
+        // constantPoolGen.getConstant(nvp.getNameIndex())
         // if
-        // (!nvp.getNameString().equals(((ConstantUtf8)cpool.getConstant(nvp.getNameIndex())).getBytes()))
+        // (!nvp.getNameString().equals(((ConstantUtf8)constantPoolGen.getConstant(nvp.getNameIndex())).getBytes()))
         // {
-        // throw new RuntimeException("envp buggered");
+        // throw new IllegalArgumentException("envp buggered");
         // }
         if (copyPoolEntries)
         {
@@ -68,7 +68,7 @@
     public ElementValuePair getElementNameValuePair()
     {
         final ElementValue immutableValue = value.getElementValue();
-        return new ElementValuePair(nameIdx, immutableValue, cpool
+        return new ElementValuePair(nameIdx, immutableValue, constantPoolGen
                 .getConstantPool());
     }
 
@@ -77,7 +77,7 @@
     {
         this.nameIdx = idx;
         this.value = value;
-        this.cpool = cpool;
+        this.constantPoolGen = cpool;
     }
 
     public ElementValuePairGen(final String name, final ElementValueGen value,
@@ -85,7 +85,7 @@
     {
         this.nameIdx = cpool.addUtf8(name);
         this.value = value;
-        this.cpool = cpool;
+        this.constantPoolGen = cpool;
     }
 
     protected void dump(final DataOutputStream dos) throws IOException
@@ -101,8 +101,8 @@
 
     public final String getNameString()
     {
-        // ConstantString cu8 = (ConstantString)cpool.getConstant(nameIdx);
-        return ((ConstantUtf8) cpool.getConstant(nameIdx)).getBytes();
+        // ConstantString cu8 = (ConstantString)constantPoolGen.getConstant(nameIdx);
+        return ((ConstantUtf8) constantPoolGen.getConstant(nameIdx)).getBytes();
     }
 
     public final ElementValueGen getValue()
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EnumElementValueGen.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EnumElementValueGen.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EnumElementValueGen.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EnumElementValueGen.java	2022-04-19 19:38:30.000000000 +0000
@@ -48,7 +48,7 @@
     {
         super(ElementValueGen.ENUM_CONSTANT, cpool);
         if (super.getElementValueType() != ENUM_CONSTANT) {
-            throw new RuntimeException(
+            throw new IllegalArgumentException(
                     "Only element values of type enum can be built with this ctor - type specified: "
                             + super.getElementValueType());
         }
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -41,7 +41,7 @@
  * course be compatible with to the declared type).
  *
  * @see Field
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public class FieldGen extends FieldGenOrMethodGen {
 
@@ -255,7 +255,7 @@
             case Const.T_REFERENCE:
                 return super.getConstantPool().addString((String) value);
             default:
-                throw new RuntimeException("Oops: Unhandled : " + super.getType().getType()); // sic
+                throw new IllegalStateException("Unhandled : " + super.getType().getType()); // sic
         }
     }
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -30,7 +30,7 @@
  * Super class for FieldGen and MethodGen objects, since they have
  * some methods in common!
  *
- * @LastModified: Jun 2020
+ * @LastModified: May 2021
  */
 public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAndTyped, Cloneable {
 
@@ -38,10 +38,10 @@
     private Type type;
     private ConstantPoolGen cp;
 
-    private final List attribute_vec = new ArrayList<>();
+    private final List attributeList = new ArrayList<>();
 
     // @since 6.0
-    private final List       annotation_vec= new ArrayList<>();
+    private final List annotationList = new ArrayList<>();
 
 
     protected FieldGenOrMethodGen() {
@@ -103,15 +103,15 @@
      * @param a attribute to be added
      */
     public void addAttribute( final Attribute a ) {
-        attribute_vec.add(a);
+        attributeList.add(a);
     }
 
     /**
      * @since 6.0
      */
-    protected void addAnnotationEntry(final AnnotationEntryGen ag) // TODO could this be package protected?
+    public void addAnnotationEntry(final AnnotationEntryGen ag)
     {
-        annotation_vec.add(ag);
+        annotationList.add(ag);
     }
 
 
@@ -119,15 +119,15 @@
      * Remove an attribute.
      */
     public void removeAttribute( final Attribute a ) {
-        attribute_vec.remove(a);
+        attributeList.remove(a);
     }
 
     /**
      * @since 6.0
      */
-    protected void removeAnnotationEntry(final AnnotationEntryGen ag) // TODO could this be package protected?
+    public void removeAnnotationEntry(final AnnotationEntryGen ag)
     {
-        annotation_vec.remove(ag);
+        annotationList.remove(ag);
     }
 
 
@@ -135,15 +135,15 @@
      * Remove all attributes.
      */
     public void removeAttributes() {
-        attribute_vec.clear();
+        attributeList.clear();
     }
 
     /**
      * @since 6.0
      */
-    protected void removeAnnotationEntries() // TODO could this be package protected?
+    public void removeAnnotationEntries()
     {
-        annotation_vec.clear();
+        annotationList.clear();
     }
 
 
@@ -151,15 +151,11 @@
      * @return all attributes of this method.
      */
     public Attribute[] getAttributes() {
-        final Attribute[] attributes = new Attribute[attribute_vec.size()];
-        attribute_vec.toArray(attributes);
-        return attributes;
+        return attributeList.toArray(new Attribute[0]);
     }
 
     public AnnotationEntryGen[] getAnnotationEntries() {
-        final AnnotationEntryGen[] annotations = new AnnotationEntryGen[annotation_vec.size()];
-          annotation_vec.toArray(annotations);
-          return annotations;
+        return annotationList.toArray(new AnnotationEntryGen[0]);
       }
 
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEDYNAMIC.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEDYNAMIC.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEDYNAMIC.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEDYNAMIC.java	2022-04-19 19:38:30.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -36,10 +36,10 @@
  * mechanism entirely.
  *
  * @see
- * 
+ * 
  * The invokedynamic instruction in The Java Virtual Machine Specification
  * @since 6.0
- * @LastModified: Jan 2020
+ * @LastModified: May 2021
  */
 public class INVOKEDYNAMIC extends InvokeInstruction {
 
diff -Nru openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEINTERFACE.java openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEINTERFACE.java
--- openjdk-11-11.0.14+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEINTERFACE.java	2022-01-13 21:56:25.000000000 +0000
+++ openjdk-11-11.0.15+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEINTERFACE.java	2022-04-19 19:38:30.000000000 +0000
@@ -34,7 +34,7 @@
  * 
Stack: ..., objectref, [arg1, [arg2 ...]] -> ...
* * @see - * + * * The invokeinterface instruction in The Java Virtual Machine Specification */ public final class INVOKEINTERFACE extends InvokeIn