test/hotspot/jtreg/runtime/classFileParserBug/p1/BadInterface1.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:
39218
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
     1
/*
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
     4
 *
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
     7
 * published by the Free Software Foundation.
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
     8
 *
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    13
 * accompanied this code).
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    14
 *
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    18
 *
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    21
 * questions.
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    22
 *
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    23
 */
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    24
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    25
// Interface that should get a ClassFormatException for the "//" in the name
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    26
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    27
// package p1;
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    28
// public interface cls1 {}
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    29
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    30
class p1//BadInterface1 {
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    31
  0xCAFEBABE;
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    32
  0; // minor version
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    33
  53; // version
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    34
  [] { // Constant Pool
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    35
    ; // first element is empty
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    36
    class #5; // #1    
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    37
    class #6; // #2    
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    38
    Utf8 "SourceFile"; // #3    
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    39
    Utf8 "BadInterface1.java"; // #4    
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    40
    Utf8 "p1//BadInterface1"; // #5    
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    41
    Utf8 "java/lang/Object"; // #6    
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    42
  } // Constant Pool
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    43
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    44
  0x0601; // access
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    45
  #1;// this_cpx
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    46
  #2;// super_cpx
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    47
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    48
  [] { // Interfaces
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    49
  } // Interfaces
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    50
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    51
  [] { // fields
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    52
  } // fields
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    53
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    54
  [] { // methods
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    55
  } // methods
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    56
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    57
  [] { // Attributes
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    58
    Attr(#3) { // SourceFile
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    59
      #4;
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    60
    } // end SourceFile
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    61
  } // Attributes
43ac06a5ee4f 8158297: Lack of proper checking of non-well formed elements in CONSTANT_Utf8_info's structure
coleenp
parents:
diff changeset
    62
} // end class p1//BadInterface1