1 /*
   2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * This file fuzzes the class name #15 to have a leading 'L' and ending ';'.
  26  */
  27 
  28 class BadHelloWorld {
  29   0xCAFEBABE;
  30   0; // minor version
  31   52; // version
  32   [31] { // Constant Pool
  33     ; // first element is empty
  34     Utf8 "BadHelloWorld"; // #1     at 0x0A
  35     class #1; // #2     at 0x1A
  36     Utf8 "java/lang/Object"; // #3     at 0x1D
  37     class #3; // #4     at 0x30
  38     Utf8 "<init>"; // #5     at 0x33
  39     Utf8 "()V"; // #6     at 0x3C
  40     NameAndType #5 #6; // #7     at 0x42
  41     Method #4 #7; // #8     at 0x47
  42     Utf8 "toString"; // #9     at 0x4C
  43     Utf8 "()Ljava/lang/String;"; // #10     at 0x57
  44     Utf8 "Hello, world!"; // #11     at 0x6E
  45     String #11; // #12     at 0x7E
  46     Utf8 "main"; // #13     at 0x81
  47     Utf8 "([Ljava/lang/String;)V"; // #14     at 0x88
  48     Utf8 "LBadHelloWorld;"; // #15     at 0xA1
  49     class #15; // #16     at 0xB3
  50     Method #16 #7; // #17     at 0xB6
  51     Utf8 "java/lang/System"; // #18     at 0xBB
  52     class #18; // #19     at 0xCE
  53     Utf8 "out"; // #20     at 0xD1
  54     Utf8 "Ljava/io/PrintStream;"; // #21     at 0xD7
  55     NameAndType #20 #21; // #22     at 0xEF
  56     Field #19 #22; // #23     at 0xF4
  57     Utf8 "java/io/PrintStream"; // #24     at 0xF9
  58     class #24; // #25     at 0x010F
  59     Utf8 "println"; // #26     at 0x0112
  60     Utf8 "(Ljava/lang/Object;)V"; // #27     at 0x011C
  61     NameAndType #26 #27; // #28     at 0x0134
  62     Method #25 #28; // #29     at 0x0139
  63     Utf8 "Code"; // #30     at 0x013E
  64   } // Constant Pool
  65 
  66   0x0021; // access
  67   #2;// this_cpx
  68   #4;// super_cpx
  69 
  70   [0] { // Interfaces
  71   } // Interfaces
  72 
  73   [0] { // fields
  74   } // fields
  75 
  76   [3] { // methods
  77     { // Member at 0x0151
  78       0x0001; // access
  79       #5; // name_cpx
  80       #6; // sig_cpx
  81       [1] { // Attributes
  82         Attr(#30, 17) { // Code at 0x0159
  83           1; // max_stack
  84           1; // max_locals
  85           Bytes[5]{
  86             0x2AB70008B1;
  87           };
  88           [0] { // Traps
  89           } // end Traps
  90           [0] { // Attributes
  91           } // Attributes
  92         } // end Code
  93       } // Attributes
  94     } // Member
  95     ;
  96     { // Member at 0x0170
  97       0x0001; // access
  98       #9; // name_cpx
  99       #10; // sig_cpx
 100       [1] { // Attributes
 101         Attr(#30, 15) { // Code at 0x0178
 102           1; // max_stack
 103           1; // max_locals
 104           Bytes[3]{
 105             0x120CB0;
 106           };
 107           [0] { // Traps
 108           } // end Traps
 109           [0] { // Attributes
 110           } // Attributes
 111         } // end Code
 112       } // Attributes
 113     } // Member
 114     ;
 115     { // Member at 0x018D
 116       0x0089; // access
 117       #13; // name_cpx
 118       #14; // sig_cpx
 119       [1] { // Attributes
 120         Attr(#30, 28) { // Code at 0x0195
 121           2; // max_stack
 122           2; // max_locals
 123           Bytes[16]{
 124             0xBB001059B700114C;
 125             0xB200172BB6001DB1;
 126           };
 127           [0] { // Traps
 128           } // end Traps
 129           [0] { // Attributes
 130           } // Attributes
 131         } // end Code
 132       } // Attributes
 133     } // Member
 134   } // methods
 135 
 136   [0] { // Attributes
 137   } // Attributes
 138 } // end class BadHelloWorld