Mercurial > hg > release > icedtea6-1.12
view patches/openjdk/6843013-missing_experimental.patch @ 3029:dfef77966f7c
Add 2013/10/15 security fixes.
2013-10-29 Andrew John Hughes <gnu.andrew@redhat.com>
* Makefile.am:
(SECURITY_PATCHES): Add security update.
* NEWS: Updated.
* patches/jtreg-LastErrorString.patch,
* patches/use-idx_t.patch,
* patches/openjdk/7162902-corba_fixes.patch,
* patches/openjdk/7196533-timezone_bottleneck.patch,
* patches/openjdk/8010727-empty_logger_name.patch,
* patches/openjdk/8010939-logmanager_deadlock.patch,
* patches/openjdk/8012617-arrayindexoutofbounds_linebreakmeasurer.patch,
* patches/openjdk/8014718-remove_logging_suntoolkit.patch:
Regenerated.
* patches/nss-config.patch: Fix path to java.security.
* patches/openjdk/4075303-javap_update.patch,
* patches/openjdk/4111861-static_fields.patch,
* patches/openjdk/4501661-disallow_mixing.patch,
* patches/openjdk/4884240-javap_additional_option.patch,
* patches/openjdk/6708729-javap_makefile_update.patch,
* patches/openjdk/6715767-javap_crash.patch,
* patches/openjdk/6819246-javap_instruction_decoding.patch,
* patches/openjdk/6824493-experimental.patch,
* patches/openjdk/6841419-classfile_iterator.patch,
* patches/openjdk/6841420-classfile_methods.patch,
* patches/openjdk/6843013-missing_experimental.patch,
* patches/openjdk/6852856-javap_subclasses.patch,
* patches/openjdk/6867671-javap_whitespace.patch,
* patches/openjdk/6868539-constant_pool_tags.patch,
* patches/openjdk/6902264-fix_indentation.patch,
* patches/openjdk/6954275-big_xml_signatures.patch,
* patches/openjdk/7146431-java.security_files.patch,
* patches/openjdk/8000450-restrict_access.patch,
* patches/openjdk/8002070-remove_logger_stack_search.patch,
* patches/openjdk/8003992-embedded_nulls.patch,
* patches/openjdk/8004188-rename_java.security.patch,
* patches/openjdk/8006882-jmockit.patch,
* patches/openjdk/8006900-new_date_time.patch,
* patches/openjdk/8008589-better_mbean_permission_validation.patch,
* patches/openjdk/8010118-caller_sensitive.patch,
* patches/openjdk/8011071-better_crypto_provider_handling.patch,
* patches/openjdk/8011081-improve_jhat.patch,
* patches/openjdk/8011139-revise_checking_getenclosingclass.patch,
* patches/openjdk/8011157-improve_corba_portability-jdk.patch,
* patches/openjdk/8011157-improve_corba_portability.patch,
* patches/openjdk/8011990-logger_test_urls.patch,
* patches/openjdk/8012071-better_bean_building.patch,
* patches/openjdk/8012147-improve_tool.patch,
* patches/openjdk/8012243-serial_regression.patch,
* patches/openjdk/8012277-improve_dataflavour.patch,
* patches/openjdk/8012425-transform_transformfactory.patch,
* patches/openjdk/8012453-runtime.exec.patch,
* patches/openjdk/8013380-logger_stack_walk_glassfish.patch,
* patches/openjdk/8013503-improve_stream_factories.patch,
* patches/openjdk/8013506-better_pack200.patch,
* patches/openjdk/8013510-augment_image_writing.patch,
* patches/openjdk/8013514-improve_cmap_stability.patch,
* patches/openjdk/8013739-better_ldap_resource_management.patch,
* patches/openjdk/8013744-better_tabling.patch,
* patches/openjdk/8013827-createtempfile_hang.patch,
* patches/openjdk/8014085-better_serialization.patch,
* patches/openjdk/8014093-improve_image_parsing.patch,
* patches/openjdk/8014102-improve_image_conversion.patch,
* patches/openjdk/8014341-better_kerberos_service.patch,
* patches/openjdk/8014349-getdeclaredclass_fix.patch,
* patches/openjdk/8014530-better_dsp.patch,
* patches/openjdk/8014534-better_profiling.patch,
* patches/openjdk/8014745-logger_stack_walk_switch.patch,
* patches/openjdk/8014987-augment_serialization.patch,
* patches/openjdk/8015144-performance_regression.patch,
* patches/openjdk/8015614-update_build.patch,
* patches/openjdk/8015731-auth_improvements.patch,
* patches/openjdk/8015743-address_internet_addresses.patch,
* patches/openjdk/8015965-typo_in_property_name.patch,
* patches/openjdk/8015978-incorrect_transformation.patch,
* patches/openjdk/8016256-finalization_final.patch,
* patches/openjdk/8016357-update_hs_diagnostic_class.patch,
* patches/openjdk/8016653-ignoreable_characters.patch,
* patches/openjdk/8016675-robust_javadoc.patch,
* patches/openjdk/8017196-ensure_proxies_are_handled_appropriately-jdk.patch,
* patches/openjdk/8017196-ensure_proxies_are_handled_appropriately.patch,
* patches/openjdk/8017287-better_resource_disposal.patch,
* patches/openjdk/8017291-cast_proxies_aside.patch,
* patches/openjdk/8017298-better_xml_support.patch,
* patches/openjdk/8017300-improve_interface_implementation.patch,
* patches/openjdk/8017505-better_client_service.patch,
* patches/openjdk/8017566-backout_part_of_8000450.patch,
* patches/openjdk/8019292-better_attribute_value_exceptions.patch,
* patches/openjdk/8019584-invalid_notification_fix.patch,
* patches/openjdk/8019617-better_view_of_objects.patch,
* patches/openjdk/8019969-inet6_test_case_fix.patch,
* patches/openjdk/8019979-better_access_test.patch,
* patches/openjdk/8020293-jvm_crash.patch,
* patches/openjdk/8021290-signature_validation.patch,
* patches/openjdk/8021355-splashscreen_regression.patch,
* patches/openjdk/8021366-jaxp_test_fix-01.patch,
* patches/openjdk/8021577-bean_serialization_fix.patch,
* patches/openjdk/8021933-jaxp_test_fix-02.patch,
* patches/openjdk/8021969-jnlp_load_failure.patch,
* patches/openjdk/8022661-writeobject_flush.patch,
* patches/openjdk/8022682-supporting_xom.patch,
* patches/openjdk/8022940-enhance_corba_translations.patch,
* patches/openjdk/8023683-enhance_class_file_parsing.patch,
* patches/openjdk/8023964-ignore_test.patch,
* patches/openjdk/8024914-swapped_usage.patch,
* patches/openjdk/8025128-createtempfile_absolute_prefix.patch,
* patches/openjdk/oj6-19-fix_8010118_test_cases.patch,
* patches/openjdk/oj6-20-merge.patch,
* patches/openjdk/oj6-21-overrides.patch: Added.
author | Andrew John Hughes <gnu.andrew@redhat.com> |
---|---|
date | Wed, 20 Nov 2013 22:56:43 +0000 |
parents | |
children |
line wrap: on
line source
# HG changeset patch # User jjg # Date 1242766380 25200 # Tue May 19 13:53:00 2009 -0700 # Node ID a7567fdabf3eae2c495726e6c25e2364e175261f # Parent 4b55db11179d066331b829ca5c4722c33287deea 6843013: missing files in fix for 6824493 Reviewed-by: darcy diff -r 4b55db11179d -r a7567fdabf3e src/share/classes/com/sun/tools/javap/LocalVariableTableWriter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ openjdk/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTableWriter.java Tue May 19 13:53:00 2009 -0700 @@ -0,0 +1,158 @@ +/* + * Copyright 2009 Sun Microsystems, 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. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.tools.javap; + +import com.sun.tools.classfile.Attribute; +import com.sun.tools.classfile.Code_attribute; +import com.sun.tools.classfile.ConstantPool; +import com.sun.tools.classfile.ConstantPoolException; +import com.sun.tools.classfile.Descriptor; +import com.sun.tools.classfile.Descriptor.InvalidDescriptor; +import com.sun.tools.classfile.Instruction; +import com.sun.tools.classfile.LocalVariableTable_attribute; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.ListIterator; +import java.util.Map; + +/** + * Annotate instructions with details about local variables. + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. If + * you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> + */ +public class LocalVariableTableWriter extends InstructionDetailWriter { + public enum NoteKind { + START("start") { + public boolean match(LocalVariableTable_attribute.Entry entry, int pc) { + return (pc == entry.start_pc); + } + }, + END("end") { + public boolean match(LocalVariableTable_attribute.Entry entry, int pc) { + return (pc == entry.start_pc + entry.length); + } + }; + NoteKind(String text) { + this.text = text; + } + public abstract boolean match(LocalVariableTable_attribute.Entry entry, int pc); + public final String text; + }; + + static LocalVariableTableWriter instance(Context context) { + LocalVariableTableWriter instance = context.get(LocalVariableTableWriter.class); + if (instance == null) + instance = new LocalVariableTableWriter(context); + return instance; + } + + protected LocalVariableTableWriter(Context context) { + super(context); + context.put(LocalVariableTableWriter.class, this); + classWriter = ClassWriter.instance(context); + } + + public void reset(Code_attribute attr) { + codeAttr = attr; + pcMap = new HashMap<Integer, List<LocalVariableTable_attribute.Entry>>(); + LocalVariableTable_attribute lvt = + (LocalVariableTable_attribute) (attr.attributes.get(Attribute.LocalVariableTable)); + if (lvt == null) + return; + + for (int i = 0; i < lvt.local_variable_table.length; i++) { + LocalVariableTable_attribute.Entry entry = lvt.local_variable_table[i]; + put(entry.start_pc, entry); + put(entry.start_pc + entry.length, entry); + } + } + + public void writeDetails(Instruction instr) { + int pc = instr.getPC(); + writeLocalVariables(pc, NoteKind.END); + writeLocalVariables(pc, NoteKind.START); + } + + @Override + public void flush() { + int pc = codeAttr.code_length; + writeLocalVariables(pc, NoteKind.END); + } + + public void writeLocalVariables(int pc, NoteKind kind) { + ConstantPool constant_pool = classWriter.getClassFile().constant_pool; + String indent = space(2); // get from Options? + List<LocalVariableTable_attribute.Entry> entries = pcMap.get(pc); + if (entries != null) { + for (ListIterator<LocalVariableTable_attribute.Entry> iter = + entries.listIterator(kind == NoteKind.END ? entries.size() : 0); + kind == NoteKind.END ? iter.hasPrevious() : iter.hasNext() ; ) { + LocalVariableTable_attribute.Entry entry = + kind == NoteKind.END ? iter.previous() : iter.next(); + if (kind.match(entry, pc)) { + print(indent); + print(kind.text); + print(" local "); + print(entry.index); + print(" // "); + Descriptor d = new Descriptor(entry.descriptor_index); + try { + print(d.getFieldType(constant_pool)); + } catch (InvalidDescriptor e) { + print(report(e)); + } catch (ConstantPoolException e) { + print(report(e)); + } + print(" "); + try { + print(constant_pool.getUTF8Value(entry.name_index)); + } catch (ConstantPoolException e) { + print(report(e)); + } + println(); + } + } + } + } + + private void put(int pc, LocalVariableTable_attribute.Entry entry) { + List<LocalVariableTable_attribute.Entry> list = pcMap.get(pc); + if (list == null) { + list = new ArrayList<LocalVariableTable_attribute.Entry>(); + pcMap.put(pc, list); + } + if (!list.contains(entry)) + list.add(entry); + } + + private ClassWriter classWriter; + private Code_attribute codeAttr; + private Map<Integer, List<LocalVariableTable_attribute.Entry>> pcMap; +} diff -r 4b55db11179d -r a7567fdabf3e src/share/classes/com/sun/tools/javap/LocalVariableTypeTableWriter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ openjdk/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTypeTableWriter.java Tue May 19 13:53:00 2009 -0700 @@ -0,0 +1,159 @@ +/* + * Copyright 2009 Sun Microsystems, 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. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.tools.javap; + +import com.sun.tools.classfile.Attribute; +import com.sun.tools.classfile.Code_attribute; +import com.sun.tools.classfile.ConstantPool; +import com.sun.tools.classfile.ConstantPoolException; +import com.sun.tools.classfile.Descriptor; +import com.sun.tools.classfile.Descriptor.InvalidDescriptor; +import com.sun.tools.classfile.Instruction; +import com.sun.tools.classfile.LocalVariableTypeTable_attribute; +import com.sun.tools.classfile.Signature; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.ListIterator; +import java.util.Map; + +/** + * Annotate instructions with details about local variables. + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. If + * you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> + */ +public class LocalVariableTypeTableWriter extends InstructionDetailWriter { + public enum NoteKind { + START("start") { + public boolean match(LocalVariableTypeTable_attribute.Entry entry, int pc) { + return (pc == entry.start_pc); + } + }, + END("end") { + public boolean match(LocalVariableTypeTable_attribute.Entry entry, int pc) { + return (pc == entry.start_pc + entry.length); + } + }; + NoteKind(String text) { + this.text = text; + } + public abstract boolean match(LocalVariableTypeTable_attribute.Entry entry, int pc); + public final String text; + }; + + static LocalVariableTypeTableWriter instance(Context context) { + LocalVariableTypeTableWriter instance = context.get(LocalVariableTypeTableWriter.class); + if (instance == null) + instance = new LocalVariableTypeTableWriter(context); + return instance; + } + + protected LocalVariableTypeTableWriter(Context context) { + super(context); + context.put(LocalVariableTypeTableWriter.class, this); + classWriter = ClassWriter.instance(context); + } + + public void reset(Code_attribute attr) { + codeAttr = attr; + pcMap = new HashMap<Integer, List<LocalVariableTypeTable_attribute.Entry>>(); + LocalVariableTypeTable_attribute lvt = + (LocalVariableTypeTable_attribute) (attr.attributes.get(Attribute.LocalVariableTypeTable)); + if (lvt == null) + return; + + for (int i = 0; i < lvt.local_variable_table.length; i++) { + LocalVariableTypeTable_attribute.Entry entry = lvt.local_variable_table[i]; + put(entry.start_pc, entry); + put(entry.start_pc + entry.length, entry); + } + } + + public void writeDetails(Instruction instr) { + int pc = instr.getPC(); + writeLocalVariables(pc, NoteKind.END); + writeLocalVariables(pc, NoteKind.START); + } + + @Override + public void flush() { + int pc = codeAttr.code_length; + writeLocalVariables(pc, NoteKind.END); + } + + public void writeLocalVariables(int pc, NoteKind kind) { + ConstantPool constant_pool = classWriter.getClassFile().constant_pool; + String indent = space(2); // get from Options? + List<LocalVariableTypeTable_attribute.Entry> entries = pcMap.get(pc); + if (entries != null) { + for (ListIterator<LocalVariableTypeTable_attribute.Entry> iter = + entries.listIterator(kind == NoteKind.END ? entries.size() : 0); + kind == NoteKind.END ? iter.hasPrevious() : iter.hasNext() ; ) { + LocalVariableTypeTable_attribute.Entry entry = + kind == NoteKind.END ? iter.previous() : iter.next(); + if (kind.match(entry, pc)) { + print(indent); + print(kind.text); + print(" generic local "); + print(entry.index); + print(" // "); + Descriptor d = new Signature(entry.signature_index); + try { + print(d.getFieldType(constant_pool)); + } catch (InvalidDescriptor e) { + print(report(e)); + } catch (ConstantPoolException e) { + print(report(e)); + } + print(" "); + try { + print(constant_pool.getUTF8Value(entry.name_index)); + } catch (ConstantPoolException e) { + print(report(e)); + } + println(); + } + } + } + } + + private void put(int pc, LocalVariableTypeTable_attribute.Entry entry) { + List<LocalVariableTypeTable_attribute.Entry> list = pcMap.get(pc); + if (list == null) { + list = new ArrayList<LocalVariableTypeTable_attribute.Entry>(); + pcMap.put(pc, list); + } + if (!list.contains(entry)) + list.add(entry); + } + + private ClassWriter classWriter; + private Code_attribute codeAttr; + private Map<Integer, List<LocalVariableTypeTable_attribute.Entry>> pcMap; +}