test/hotspot/jtreg/runtime/classFileParserBug/BadAccModInrClss.jcod
author ssahoo
Wed, 04 Jul 2018 03:44:32 -0700
changeset 50936 00b16d0457e4
parent 47216 71c04702a3d5
permissions -rw-r--r--
8205653: test/jdk/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java and RmiSslBootstrapTest.sh fail with handshake_failure Summary: Test failure due to unsupported DSA keys Reviewed-by: dfuchs, xuelei
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43977
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
     1
/*
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
     2
 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
     4
 *
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
     7
 * published by the Free Software Foundation.
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
     8
 *
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    13
 * accompanied this code).
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    14
 *
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    18
 *
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    21
 * questions.
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    22
 */
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    23
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    24
/*
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    25
 * This tests that a class in an InnerClasses attribute with ACC_MODULE set
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    26
 * causes a NoClassDefFoundError exception to get thrown.
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    27
 */
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    28
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    29
class BadAccModInrClss {
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    30
  0xCAFEBABE;
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    31
  0; // minor version
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    32
  53; // version
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    33
  [22] { // Constant Pool
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    34
    ; // first element is empty
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    35
    Field #3 #14; // #1     at 0x0A
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    36
    Method #4 #15; // #2     at 0x0F
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    37
    class #16; // #3     at 0x14
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    38
    class #19; // #4     at 0x17
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    39
    Utf8 "this$0"; // #5     at 0x1A
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    40
    Utf8 "La;"; // #6     at 0x23
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    41
    Utf8 "Synthetic"; // #7     at 0x29
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    42
    Utf8 "<init>"; // #8     at 0x35
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    43
    Utf8 "(Ljava/lang/Object;)V"; // #9     at 0x3E
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    44
    Utf8 "Code"; // #10     at 0x56
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    45
    Utf8 "LineNumberTable"; // #11     at 0x5D
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    46
    Utf8 "SourceFile"; // #12     at 0x6F
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    47
    Utf8 "a.java"; // #13     at 0x7C
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    48
    NameAndType #5 #6; // #14     at 0x85
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    49
    NameAndType #8 #20; // #15     at 0x8A
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    50
    Utf8 "BadAccModInrClss"; // #16     at 0x8F
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    51
    Utf8 "Loc"; // #17     at 0x9E
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    52
    Utf8 "InnerClasses"; // #18     at 0xA4
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    53
    Utf8 "java/lang/Object"; // #19     at 0xB3
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    54
    Utf8 "()V"; // #20     at 0xC6
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    55
    Utf8 "EnclosingMethod"; // #21     at 0xCC
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    56
  } // Constant Pool
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    57
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    58
  0x0000; // access
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    59
  #3;// this_cpx
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    60
  #4;// super_cpx
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    61
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    62
  [0] { // Interfaces
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    63
  } // Interfaces
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    64
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    65
  [1] { // fields
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    66
    { // Member at 0xE8
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    67
      0x0000; // access
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    68
      #5; // name_cpx
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    69
      #6; // sig_cpx
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    70
      [1] { // Attributes
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    71
        Attr(#7, 0) { // Synthetic at 0xF0
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    72
        } // end Synthetic
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    73
      } // Attributes
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    74
    } // Member
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    75
  } // fields
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    76
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    77
  [1] { // methods
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    78
    { // Member at 0xF8
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    79
      0x0001; // access
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    80
      #8; // name_cpx
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    81
      #20; // sig_cpx
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    82
      [1] { // Attributes
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    83
        Attr(#10, 17) { // Code at 0x0100
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    84
          2; // max_stack
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    85
          2; // max_locals
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    86
          Bytes[5]{
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    87
            0x2AB70002B1;
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    88
          };
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    89
          [0] { // Traps
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    90
          } // end Traps
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    91
          [0] { // Attributes
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    92
          } // Attributes
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    93
        } // end Code
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    94
      } // Attributes
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    95
    } // Member
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    96
  } // methods
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    97
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    98
  [3] { // Attributes
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
    99
    Attr(#12, 2) { // SourceFile at 0x0119
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   100
      #13;
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   101
    } // end SourceFile
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   102
    ;
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   103
    Attr(#18, 10) { // InnerClasses at 0x0121
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   104
      [1] { // InnerClasses
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   105
        #3 #0 #17 0x8000; //  at 0x0131
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   106
      }
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   107
    } // end InnerClasses
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   108
    ;
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   109
    Attr(#21, 4) { // EnclosingMethod at 0x0131
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   110
      0x0004000F;
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   111
    } // end EnclosingMethod
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   112
  } // Attributes
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents:
diff changeset
   113
} // end class BadAccModInrClss