hotspot/test/runtime/classFileParserBug/badAnnotTag.jcod
author jprovino
Wed, 11 Nov 2015 23:47:42 +0000
changeset 33911 af2cff5bd523
parent 31366 67eccccbb2ca
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31366
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
     1
/*
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
     4
 *
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
     7
 * published by the Free Software Foundation.
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
     8
 *
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    13
 * accompanied this code).
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    14
 *
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    18
 *
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    21
 * questions.
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    22
 *
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    23
 */
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    24
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    25
// This class contains a bad element_tag in an element_value structure for a
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    26
// RuntimeVisibleAnnotation at line 91.  The bad element tag should be ignored
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    27
// by the class file parser.
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    28
class badAnnotTag {
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    29
  0xCAFEBABE;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    30
  0; // minor version
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    31
  52; // version
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    32
  [19] { // Constant Pool
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    33
    ; // first element is empty
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    34
    class #16; // #1     at 0x0A
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    35
    class #17; // #2     at 0x0D
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    36
    class #18; // #3     at 0x10
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    37
    Utf8 "value"; // #4     at 0x13
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    38
    Utf8 "()Ljava/lang/String;"; // #5     at 0x1B
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    39
    Utf8 "SourceFile"; // #6     at 0x32
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    40
    Utf8 "badAnnotTag.java"; // #7     at 0x3F
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    41
    Utf8 "RuntimeVisibleAnnotations"; // #8     at 0x50
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    42
    Utf8 "Ljava/lang/annotation/Target;"; // #9     at 0x6C
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    43
    Utf8 "Ljava/lang/annotation/ElementType;"; // #10     at 0x8C
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    44
    Utf8 "TYPE_USE"; // #11     at 0xB1
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    45
    Utf8 "TYPE_PARAMETER"; // #12     at 0xBC
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    46
    Utf8 "Ljava/lang/annotation/Retention;"; // #13     at 0xCD
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    47
    Utf8 "Ljava/lang/annotation/RetentionPolicy;"; // #14     at 0xF0
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    48
    Utf8 "RUNTIME"; // #15     at 0x0119
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    49
    Utf8 "badAnnotTag"; // #16     at 0x0123
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    50
    Utf8 "java/lang/Object"; // #17     at 0x0127
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    51
    Utf8 "java/lang/annotation/Annotation"; // #18     at 0x013A
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    52
  } // Constant Pool
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    53
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    54
  0x2600; // access
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    55
  #1;// this_cpx
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    56
  #2;// super_cpx
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    57
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    58
  [1] { // Interfaces
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    59
    #3;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    60
  } // Interfaces
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    61
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    62
  [0] { // fields
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    63
  } // fields
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    64
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    65
  [1] { // methods
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    66
    { // Member at 0x016A
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    67
      0x0401; // access
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    68
      #4; // name_cpx
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    69
      #5; // sig_cpx
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    70
      [0] { // Attributes
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    71
      } // Attributes
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    72
    } // Member
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    73
  } // methods
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    74
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    75
  [2] { // Attributes
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    76
    Attr(#6, 2) { // SourceFile at 0x0174
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    77
      #7;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    78
    } // end SourceFile
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    79
    ;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    80
    Attr(#8, 32) { // RuntimeVisibleAnnotations at 0x017C
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    81
      [2] { // annotations
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    82
        {  //  annotation
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    83
          #9;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    84
          [1] { // element_value_pairs
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    85
            {  //  element value pair
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    86
              #4;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    87
              {  //  element_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    88
                '[';
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    89
                [2] { // array_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    90
                  {  //  element_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    91
                    'd'; // * illegal value *, correct value is 'e'
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    92
                    {  //  enum_const_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    93
                      #10;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    94
                      #11;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    95
                    }  //  enum_const_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    96
                  }  //  element_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    97
                  ;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    98
                  {  //  element_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
    99
                    'e';
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   100
                    {  //  enum_const_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   101
                      #10;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   102
                      #12;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   103
                    }  //  enum_const_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   104
                  }  //  element_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   105
                }  //  array_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   106
              }  //  element_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   107
            }  //  element value pair
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   108
          }  //  element_value_pairs
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   109
        }  //  annotation
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   110
        ;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   111
        {  //  annotation
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   112
          #13;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   113
          [1] { // element_value_pairs
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   114
            {  //  element value pair
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   115
              #4;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   116
              {  //  element_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   117
                'e';
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   118
                {  //  enum_const_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   119
                  #14;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   120
                  #15;
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   121
                }  //  enum_const_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   122
              }  //  element_value
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   123
            }  //  element value pair
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   124
          }  //  element_value_pairs
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   125
        }  //  annotation
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   126
      }
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   127
    } // end RuntimeVisibleAnnotations
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   128
  } // Attributes
67eccccbb2ca 8042041: https://bugs.openjdk.java.net/browse/JDK-8042041
hseigel
parents:
diff changeset
   129
} // end class badAnnotTag