1 /*
   2  * Copyright (c) 2018, 2024, 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 // Many of the jcod classes in this file were derived from this Java inline type:
  26 //
  27 // final inline class Value {
  28 //     static final Value VT = makeValue(0x01234567);
  29 //     final int int_v;
  30 //     Value() {
  31 //         int_v = 1;
  32 //     }
  33 //     static Value makeValue(int x) {
  34 //         Value v = Value.default;
  35 //         v = __WithField(v.int_v, x);
  36 //         return v;
  37 //     }
  38 // }
  39 //
  40 // The changes for each test were made to the bytecodes for method makeValue(int x).
  41 // Its bytecodes are:
  42 //
  43 //  static Value makeValue(int); descriptor: (I)LValue; flags: (0x0008) ACC_STATIC
  44 //    Code:
  45 //      stack=2, locals=2, args_size=1
  46 //         0: aconst_init   #3                  // class Value
  47 //         3: astore_1
  48 //         4: aload_1
  49 //         5: iload_0
  50 //         6: withfield     #2                  // Field int_v:I
  51 //         9: astore_1
  52 //        10: aload_1
  53 //        11: areturn
  54 
  55 
  56 // The constant pool index of the aconst_init opcode (0xCB) in the Code
  57 // attribute was changed to 0x93.  Since this index is outside the range of
  58 // the constant pool, a VerifyError exception should get thrown.
  59 //
  60 class defValBadCP {
  61   0xCAFEBABE;
  62   0; // minor version
  63   66; // version
  64   [27] { // Constant Pool
  65     ; // first element is empty
  66     Method #7 #21; // #1     at 0x0A
  67     Field #3 #22; // #2     at 0x0F
  68     class #23; // #3     at 0x14
  69     int 0x01234567; // #4     at 0x17
  70     Method #3 #24; // #5     at 0x1C
  71     Field #3 #25; // #6     at 0x21
  72     class #26; // #7     at 0x26
  73     Utf8 "VT"; // #8     at 0x29
  74     Utf8 "LdefValBadCP;"; // #9     at 0x2E
  75     Utf8 "int_v"; // #10     at 0x38
  76     Utf8 "I"; // #11     at 0x40
  77     Utf8 "<vnew>"; // #12     at 0x44
  78     Utf8 "()V"; // #13     at 0x4D
  79     Utf8 "Code"; // #14     at 0x53
  80     Utf8 "LineNumberTable"; // #15     at 0x5A
  81     Utf8 "makeValue"; // #16     at 0x6C
  82     Utf8 "(I)LdefValBadCP;"; // #17     at 0x78
  83     Utf8 "<clinit>"; // #18     at 0x85
  84     Utf8 "SourceFile"; // #19     at 0x90
  85     Utf8 "defValBadCP.java"; // #20     at 0x9D
  86     NameAndType #12 #13; // #21     at 0xAA
  87     NameAndType #10 #11; // #22     at 0xAF
  88     Utf8 "defValBadCP"; // #23     at 0xB4
  89     NameAndType #16 #17; // #24     at 0xBC
  90     NameAndType #8 #9; // #25     at 0xC1
  91     Utf8 "java/lang/Object"; // #26     at 0xC6
  92   } // Constant Pool
  93 
  94   0x0850; // access [ ACC_VALUE ACC_PRIMITIVE ACC_FINAL ]
  95   #3;// this_cpx
  96   #7;// super_cpx
  97 
  98   [0] { // Interfaces
  99   } // Interfaces
 100 
 101   [2] { // fields
 102     { // Member at 0xE3
 103       0x0018; // access
 104       #8; // name_cpx
 105       #9; // sig_cpx
 106       [0] { // Attributes
 107       } // Attributes
 108     } // Member
 109     ;
 110     { // Member at 0xEB
 111       0x0010; // access
 112       #10; // name_cpx
 113       #11; // sig_cpx
 114       [0] { // Attributes
 115       } // Attributes
 116     } // Member
 117   } // fields
 118 
 119   [1] { // methods
 120     { // Member at 0x012D
 121       0x0008; // access
 122       #16; // name_cpx
 123       #17; // sig_cpx
 124       [1] { // Attributes
 125         Attr(#14, 44) { // Code at 0x0135
 126           2; // max_stack
 127           2; // max_locals
 128           Bytes[12]{
 129             0xCB00934C2B1ACC00; // Changed CP index from 3 to 0x93 for opcode 0xCB (aconst_init)
 130             0x024C2BB0;         // so that the index is outside of the range of the constant pool.
 131           };
 132           [0] { // Traps
 133           } // end Traps
 134           [1] { // Attributes
 135             Attr(#15, 14) { // LineNumberTable at 0x0153
 136               [3] { // LineNumberTable
 137                 0  8; //  at 0x015F
 138                 4  9; //  at 0x0163
 139                 10  10; //  at 0x0167
 140               }
 141             } // end LineNumberTable
 142           } // Attributes
 143         } // end Code
 144       } // Attributes
 145     } // Member
 146   } // methods
 147 
 148   [1] { // Attributes
 149     Attr(#19, 2) { // SourceFile at 0x0198
 150       #20;
 151     } // end SourceFile
 152   } // Attributes
 153 } // end class defValBadCP
 154 
 155 ///////////////////////////////////////////////////////////
 156 
 157 // The class's major version was changed to 54.  Since this class has a
 158 // aconst_init opcode (0xCB), this should cause a ClassFormatError
 159 // exception to get thrown.
 160 //
 161 class defValBadMajorVersion {
 162   0xCAFEBABE;
 163   0; // minor version
 164   54; // version
 165   [27] { // Constant Pool
 166     ; // first element is empty
 167     Method #7 #21; // #1     at 0x0A
 168     Field #3 #22; // #2     at 0x0F
 169     class #23; // #3     at 0x14
 170     int 0x01234567; // #4     at 0x17
 171     Method #3 #24; // #5     at 0x1C
 172     Field #3 #25; // #6     at 0x21
 173     class #26; // #7     at 0x26
 174     Utf8 "VT"; // #8     at 0x29
 175     Utf8 "LdefValBadMajorVersion;"; // #9     at 0x2E
 176     Utf8 "int_v"; // #10     at 0x38
 177     Utf8 "I"; // #11     at 0x40
 178     Utf8 "<init>"; // #12     at 0x44
 179     Utf8 "()V"; // #13     at 0x4D
 180     Utf8 "Code"; // #14     at 0x53
 181     Utf8 "LineNumberTable"; // #15     at 0x5A
 182     Utf8 "makeValue"; // #16     at 0x6C
 183     Utf8 "(I)LdefValBadMajorVersion;"; // #17     at 0x78
 184     Utf8 "<clinit>"; // #18     at 0x85
 185     Utf8 "SourceFile"; // #19     at 0x90
 186     Utf8 "defValBadMajorVersion.java"; // #20     at 0x9D
 187     NameAndType #12 #13; // #21     at 0xAA
 188     NameAndType #10 #11; // #22     at 0xAF
 189     Utf8 "defValBadMajorVersion"; // #23     at 0xB4
 190     NameAndType #16 #17; // #24     at 0xBC
 191     NameAndType #8 #9; // #25     at 0xC1
 192     Utf8 "java/lang/Object"; // #26     at 0xC6
 193   } // Constant Pool
 194 
 195   0x0850; // access [ ACC_VALUE ACC_PRIMITIVE ACC_FINAL ]
 196   #3;// this_cpx
 197   #7;// super_cpx
 198 
 199   [0] { // Interfaces
 200   } // Interfaces
 201 
 202   [2] { // fields
 203     { // Member at 0xE3
 204       0x0018; // access
 205       #8; // name_cpx
 206       #9; // sig_cpx
 207       [0] { // Attributes
 208       } // Attributes
 209     } // Member
 210     ;
 211     { // Member at 0xEB
 212       0x0010; // access
 213       #10; // name_cpx
 214       #11; // sig_cpx
 215       [0] { // Attributes
 216       } // Attributes
 217     } // Member
 218   } // fields
 219 
 220   [1] { // methods
 221     { // Member at 0x012D
 222       0x0008; // access
 223       #16; // name_cpx
 224       #17; // sig_cpx
 225       [1] { // Attributes
 226         Attr(#14, 44) { // Code at 0x0135
 227           2; // max_stack
 228           2; // max_locals
 229           Bytes[12]{
 230             0xCB00034C2B1ACC00;
 231             0x024C2BB0;
 232           };
 233           [0] { // Traps
 234           } // end Traps
 235           [1] { // Attributes
 236             Attr(#15, 14) { // LineNumberTable at 0x0153
 237               [3] { // LineNumberTable
 238                 0  8; //  at 0x015F
 239                 4  9; //  at 0x0163
 240                 10  10; //  at 0x0167
 241               }
 242             } // end LineNumberTable
 243           } // Attributes
 244         } // end Code
 245       } // Attributes
 246     } // Member
 247   } // methods
 248 
 249   [1] { // Attributes
 250     Attr(#19, 2) { // SourceFile at 0x0198
 251       #20;
 252     } // end SourceFile
 253   } // Attributes
 254 } // end class defValBadMajorVersion
 255 
 256 ///////////////////////////////////////////////////////////
 257 
 258 // The constant pool index of a aconst_init opcode (0xCB) in the Code
 259 // attribute was changed to 2.  Since this index now points to a Field
 260 // entry instead of a Class entry, a VerifyError exception should get thrown.
 261 //
 262 class defValWrongCPType {
 263   0xCAFEBABE;
 264   0; // minor version
 265   66; // version
 266   [27] { // Constant Pool
 267     ; // first element is empty
 268     Method #7 #21; // #1     at 0x0A
 269     Field #3 #22; // #2     at 0x0F
 270     class #23; // #3     at 0x14
 271     int 0x01234567; // #4     at 0x17
 272     Method #3 #24; // #5     at 0x1C
 273     Field #3 #25; // #6     at 0x21
 274     class #26; // #7     at 0x26
 275     Utf8 "VT"; // #8     at 0x29
 276     Utf8 "LdefValWrongCPType;"; // #9     at 0x2E
 277     Utf8 "int_v"; // #10     at 0x38
 278     Utf8 "I"; // #11     at 0x40
 279     Utf8 "<vnew>"; // #12     at 0x44
 280     Utf8 "()V"; // #13     at 0x4D
 281     Utf8 "Code"; // #14     at 0x53
 282     Utf8 "LineNumberTable"; // #15     at 0x5A
 283     Utf8 "makeValue"; // #16     at 0x6C
 284     Utf8 "(I)LdefValWrongCPType;"; // #17     at 0x78
 285     Utf8 "<clinit>"; // #18     at 0x85
 286     Utf8 "SourceFile"; // #19     at 0x90
 287     Utf8 "defValWrongCPType.java"; // #20     at 0x9D
 288     NameAndType #12 #13; // #21     at 0xAA
 289     NameAndType #10 #11; // #22     at 0xAF
 290     Utf8 "defValWrongCPType"; // #23     at 0xB4
 291     NameAndType #16 #17; // #24     at 0xBC
 292     NameAndType #8 #9; // #25     at 0xC1
 293     Utf8 "java/lang/Object"; // #26     at 0xC6
 294   } // Constant Pool
 295 
 296   0x0850; // access [ ACC_VALUE ACC_PRIMITIVE ACC_FINAL ]
 297   #3;// this_cpx
 298   #7;// super_cpx
 299 
 300   [0] { // Interfaces
 301   } // Interfaces
 302 
 303   [2] { // fields
 304     { // Member at 0xE3
 305       0x0018; // access
 306       #8; // name_cpx
 307       #9; // sig_cpx
 308       [0] { // Attributes
 309       } // Attributes
 310     } // Member
 311     ;
 312     { // Member at 0xEB
 313       0x0010; // access
 314       #10; // name_cpx
 315       #11; // sig_cpx
 316       [0] { // Attributes
 317       } // Attributes
 318     } // Member
 319   } // fields
 320 
 321   [1] { // methods
 322     { // Member at 0x012D
 323       0x0008; // access
 324       #16; // name_cpx
 325       #17; // sig_cpx
 326       [1] { // Attributes
 327         Attr(#14, 44) { // Code at 0x0135
 328           2; // max_stack
 329           2; // max_locals
 330           Bytes[12]{
 331             0xCB00024C2B1ACC00; // Changed CP index from 3 to 2 for opcode 0xCB (aconst_init)
 332             0x024C2BB0;         // so that the cp index no longer points to a cp Class entry.
 333           };
 334           [0] { // Traps
 335           } // end Traps
 336           [1] { // Attributes
 337             Attr(#15, 14) { // LineNumberTable at 0x0153
 338               [3] { // LineNumberTable
 339                 0  8; //  at 0x015F
 340                 4  9; //  at 0x0163
 341                 10  10; //  at 0x0167
 342               }
 343             } // end LineNumberTable
 344           } // Attributes
 345         } // end Code
 346       } // Attributes
 347     } // Member
 348   } // methods
 349 
 350   [1] { // Attributes
 351     Attr(#19, 2) { // SourceFile at 0x0198
 352       #20;
 353     } // end SourceFile
 354   } // Attributes
 355 } // end class defValWrongCPType
 356 
 357 ///////////////////////////////////////////////////////////
 358 
 359 // The constant pool index of the withfield opcode (0xCC) in the Code
 360 // attribute was changed to 0x82.  Since this index is outside the range of
 361 // the constant pool, a VerifyError exception should get thrown.
 362 //
 363 class wthFldBadCP {
 364   0xCAFEBABE;
 365   0; // minor version
 366   66; // version
 367   [20] { // Constant Pool
 368     ; // first element is empty
 369     Method #4 #17; // #1     at 0x0A
 370     Field #3 #18; // #2     at 0x0F
 371     class #12; // #3     at 0x14
 372     class #19; // #4     at 0x17
 373     Utf8 "int_v"; // #5     at 0x1A
 374     Utf8 "I"; // #6     at 0x22
 375     Utf8 "<vnew>"; // #7     at 0x26
 376     Utf8 "()V"; // #8     at 0x2F
 377     Utf8 "Code"; // #9     at 0x35
 378     Utf8 "LineNumberTable"; // #10     at 0x3C
 379     Utf8 "makewthFldBadCP"; // #11     at 0x4E
 380     Utf8 "wthFldBadCP"; // #12     at 0x60
 381     Utf8 "ValueTypes"; // #13     at 0x6E
 382     Utf8 "(I)LwthFldBadCP;"; // #14     at 0x7B
 383     Utf8 "SourceFile"; // #15     at 0x8E
 384     Utf8 "wthFldBadCP.java"; // #16     at 0x9B
 385     NameAndType #7 #8; // #17     at 0xAE
 386     NameAndType #5 #6; // #18     at 0xB3
 387     Utf8 "java/lang/Object"; // #19     at 0xB8
 388   } // Constant Pool
 389 
 390   0x0850; // access [ ACC_VALUE ACC_PRIMITIVE ACC_FINAL ]
 391   #3;// this_cpx
 392   #4;// super_cpx
 393 
 394   [0] { // Interfaces
 395   } // Interfaces
 396 
 397   [1] { // fields
 398     { // Member at 0xD5
 399       0x0010; // access
 400       #5; // name_cpx
 401       #6; // sig_cpx
 402       [0] { // Attributes
 403       } // Attributes
 404     } // Member
 405   } // fields
 406 
 407   [1] { // methods
 408     { // Member at 0x0117
 409       0x0008; // access
 410       #11; // name_cpx
 411       #14; // sig_cpx
 412       [1] { // Attributes
 413         Attr(#9, 44) { // Code at 0x011F
 414           2; // max_stack
 415           2; // max_locals
 416           Bytes[12]{
 417             0xCB00034C2B1ACC00; // Changed CP index from 2 to 0x82 for opcode 0xCC (withfield)
 418             0x824C2BB0;         // so that the index is outside of the range of the constant pool.
 419           };
 420           [0] { // Traps
 421           } // end Traps
 422           [1] { // Attributes
 423             Attr(#10, 14) { // LineNumberTable at 0x013D
 424               [3] { // LineNumberTable
 425                 0  8; //  at 0x0149
 426                 4  9; //  at 0x014D
 427                 10  10; //  at 0x0151
 428               }
 429             } // end LineNumberTable
 430           } // Attributes
 431         } // end Code
 432       } // Attributes
 433     } // Member
 434   } // methods
 435 
 436   [2] { // Attributes
 437     Attr(#15, 2) { // SourceFile at 0x0153
 438       #16;
 439     } // end SourceFile
 440     ;
 441     Attr(#13, 4) { // ValueTypes at 0x015B
 442       0x00010003;
 443     } // end ValueTypes
 444   } // Attributes
 445 } // end class wthFldBadCP
 446 
 447 ///////////////////////////////////////////////////////////
 448 
 449 // The opcode at bytecode position 5 in the Code array was changed to aload_1
 450 // (0x2B).  This should cause a VerifyError because now the first operand on the
 451 // stack for the withfield opcode (0xCC at bytecode position 6) does not match
 452 // the type (int) of the field being assigned to.
 453 //
 454 class wthFldBadFldVal {
 455   0xCAFEBABE;
 456   0; // minor version
 457   66; // version
 458   [20] { // Constant Pool
 459     ; // first element is empty
 460     Method #4 #17; // #1     at 0x0A
 461     Field #3 #18; // #2     at 0x0F
 462     class #12; // #3     at 0x14
 463     class #19; // #4     at 0x17
 464     Utf8 "int_v"; // #5     at 0x1A
 465     Utf8 "I"; // #6     at 0x22
 466     Utf8 "<vnew>"; // #7     at 0x26
 467     Utf8 "()V"; // #8     at 0x2F
 468     Utf8 "Code"; // #9     at 0x35
 469     Utf8 "LineNumberTable"; // #10     at 0x3C
 470     Utf8 "makewthFldBadFldVal"; // #11     at 0x4E
 471     Utf8 "wthFldBadFldVal"; // #12     at 0x60
 472     Utf8 "ValueTypes"; // #13     at 0x6E
 473     Utf8 "(I)LwthFldBadFldVal;"; // #14     at 0x7B
 474     Utf8 "SourceFile"; // #15     at 0x8E
 475     Utf8 "wthFldBadFldVal.java"; // #16     at 0x9B
 476     NameAndType #7 #8; // #17     at 0xAE
 477     NameAndType #5 #6; // #18     at 0xB3
 478     Utf8 "java/lang/Object"; // #19     at 0xB8
 479   } // Constant Pool
 480 
 481   0x0850; // access [ ACC_VALUE ACC_PRIMITIVE ACC_FINAL ]
 482   #3;// this_cpx
 483   #4;// super_cpx
 484 
 485   [0] { // Interfaces
 486   } // Interfaces
 487 
 488   [1] { // fields
 489     { // Member at 0xD5
 490       0x0010; // access
 491       #5; // name_cpx
 492       #6; // sig_cpx
 493       [0] { // Attributes
 494       } // Attributes
 495     } // Member
 496   } // fields
 497 
 498   [1] { // methods
 499     { // Member at 0x0117
 500       0x0008; // access
 501       #11; // name_cpx
 502       #14; // sig_cpx
 503       [1] { // Attributes
 504         Attr(#9, 44) { // Code at 0x011F
 505           2; // max_stack
 506           2; // max_locals
 507           Bytes[12]{
 508             0xCB00034C2B2BCC00; // Changed opcode at bytecode 5 from iload_0 to aload_1
 509             0x024C2BB0;
 510           };
 511           [0] { // Traps
 512           } // end Traps
 513           [1] { // Attributes
 514             Attr(#10, 14) { // LineNumberTable at 0x013D
 515               [3] { // LineNumberTable
 516                 0  8; //  at 0x0149
 517                 4  9; //  at 0x014D
 518                 10  10; //  at 0x0151
 519               }
 520             } // end LineNumberTable
 521           } // Attributes
 522         } // end Code
 523       } // Attributes
 524     } // Member
 525   } // methods
 526 
 527   [2] { // Attributes
 528     Attr(#15, 2) { // SourceFile at 0x0153
 529       #16;
 530     } // end SourceFile
 531     ;
 532     Attr(#13, 4) { // ValueTypes at 0x015B
 533       0x00010003;
 534     } // end ValueTypes
 535   } // Attributes
 536 } // end class wthFldBadFldVal
 537 
 538 ///////////////////////////////////////////////////////////
 539 
 540 // The opcode at bytecode position 4 in the Code array was changed to iload_1
 541 // (0x1A).  This should cause a VerifyError because the second operand on the stack
 542 // for the withfield opcode (0xCC at bytecode position 6) must be a reference.
 543 //
 544 class wthFldBadFldRef {
 545   0xCAFEBABE;
 546   0; // minor version
 547   66; // version
 548   [20] { // Constant Pool
 549     ; // first element is empty
 550     Method #4 #17; // #1     at 0x0A
 551     Field #3 #18; // #2     at 0x0F
 552     class #12; // #3     at 0x14
 553     class #19; // #4     at 0x17
 554     Utf8 "int_v"; // #5     at 0x1A
 555     Utf8 "I"; // #6     at 0x22
 556     Utf8 "<vnew>"; // #7     at 0x26
 557     Utf8 "()V"; // #8     at 0x2F
 558     Utf8 "Code"; // #9     at 0x35
 559     Utf8 "LineNumberTable"; // #10     at 0x3C
 560     Utf8 "makewthFldBadFldRef"; // #11     at 0x4E
 561     Utf8 "wthFldBadFldRef"; // #12     at 0x60
 562     Utf8 "ValueTypes"; // #13     at 0x6E
 563     Utf8 "(I)LwthFldBadFldRef;"; // #14     at 0x7B
 564     Utf8 "SourceFile"; // #15     at 0x8E
 565     Utf8 "wthFldBadFldRef.java"; // #16     at 0x9B
 566     NameAndType #7 #8; // #17     at 0xAE
 567     NameAndType #5 #6; // #18     at 0xB3
 568     Utf8 "java/lang/Object"; // #19     at 0xB8
 569   } // Constant Pool
 570 
 571   0x0850; // access [ ACC_VALUE ACC_PRIMITIVE ACC_FINAL ]
 572   #3;// this_cpx
 573   #4;// super_cpx
 574 
 575   [0] { // Interfaces
 576   } // Interfaces
 577 
 578   [1] { // fields
 579     { // Member at 0xD5
 580       0x0010; // access
 581       #5; // name_cpx
 582       #6; // sig_cpx
 583       [0] { // Attributes
 584       } // Attributes
 585     } // Member
 586   } // fields
 587 
 588   [1] { // methods
 589     { // Member at 0x0117
 590       0x0008; // access
 591       #11; // name_cpx
 592       #14; // sig_cpx
 593       [1] { // Attributes
 594         Attr(#9, 44) { // Code at 0x011F
 595           2; // max_stack
 596           2; // max_locals
 597           Bytes[12]{
 598             0xCB00034C1A1ACC00; // Changed opcode at bytecode 4 from aload_1 to iload_0
 599             0x024C2BB0;
 600           };
 601           [0] { // Traps
 602           } // end Traps
 603           [1] { // Attributes
 604             Attr(#10, 14) { // LineNumberTable at 0x013D
 605               [3] { // LineNumberTable
 606                 0  8; //  at 0x0149
 607                 4  9; //  at 0x014D
 608                 10  10; //  at 0x0151
 609               }
 610             } // end LineNumberTable
 611           } // Attributes
 612         } // end Code
 613       } // Attributes
 614     } // Member
 615   } // methods
 616 
 617   [2] { // Attributes
 618     Attr(#15, 2) { // SourceFile at 0x0153
 619       #16;
 620     } // end SourceFile
 621     ;
 622     Attr(#13, 4) { // ValueTypes at 0x015B
 623       0x00010003;
 624     } // end ValueTypes
 625   } // Attributes
 626 } // end class wthFldBadFldRef
 627 
 628 ///////////////////////////////////////////////////////////
 629 
 630 // The class's major version was changed to 54 and the first opcode in the Code
 631 // attribute was changed to a withfield (0xCC)..  Since withfield opcodes are not
 632 // allowed in classes with major version 54, this should cause a ClassFormatError
 633 // exception to get thrown.
 634 //
 635 class wthFldBadMajorVersion {
 636   0xCAFEBABE;
 637   0; // minor version
 638   54; // version
 639   [27] { // Constant Pool
 640     ; // first element is empty
 641     Method #7 #21; // #1     at 0x0A
 642     Field #3 #22; // #2     at 0x0F
 643     class #23; // #3     at 0x14
 644     int 0x01234567; // #4     at 0x17
 645     Method #3 #24; // #5     at 0x1C
 646     Field #3 #25; // #6     at 0x21
 647     class #26; // #7     at 0x26
 648     Utf8 "VT"; // #8     at 0x29
 649     Utf8 "LwthFldBadMajorVersion;"; // #9     at 0x2E
 650     Utf8 "int_v"; // #10     at 0x38
 651     Utf8 "I"; // #11     at 0x40
 652     Utf8 "<init>"; // #12     at 0x44
 653     Utf8 "()V"; // #13     at 0x4D
 654     Utf8 "Code"; // #14     at 0x53
 655     Utf8 "LineNumberTable"; // #15     at 0x5A
 656     Utf8 "makeValue"; // #16     at 0x6C
 657     Utf8 "(I)LwthFldBadMajorVersion;"; // #17     at 0x78
 658     Utf8 "<clinit>"; // #18     at 0x85
 659     Utf8 "SourceFile"; // #19     at 0x90
 660     Utf8 "wthFldBadMajorVersion.java"; // #20     at 0x9D
 661     NameAndType #12 #13; // #21     at 0xAA
 662     NameAndType #10 #11; // #22     at 0xAF
 663     Utf8 "wthFldBadMajorVersion"; // #23     at 0xB4
 664     NameAndType #16 #17; // #24     at 0xBC
 665     NameAndType #8 #9; // #25     at 0xC1
 666     Utf8 "java/lang/Object"; // #26     at 0xC6
 667   } // Constant Pool
 668 
 669   0x0850; // access [ ACC_VALUE ACC_PRIMITIVE ACC_FINAL ]
 670   #3;// this_cpx
 671   #7;// super_cpx
 672 
 673   [0] { // Interfaces
 674   } // Interfaces
 675 
 676   [2] { // fields
 677     { // Member at 0xE3
 678       0x0018; // access
 679       #8; // name_cpx
 680       #9; // sig_cpx
 681       [0] { // Attributes
 682       } // Attributes
 683     } // Member
 684     ;
 685     { // Member at 0xEB
 686       0x0010; // access
 687       #10; // name_cpx
 688       #11; // sig_cpx
 689       [0] { // Attributes
 690       } // Attributes
 691     } // Member
 692   } // fields
 693 
 694   [1] { // methods
 695     { // Member at 0x012D
 696       0x0008; // access
 697       #16; // name_cpx
 698       #17; // sig_cpx
 699       [1] { // Attributes
 700         Attr(#14, 44) { // Code at 0x0135
 701           2; // max_stack
 702           2; // max_locals
 703           Bytes[12]{
 704             0xCC00034C2B1ACC00; // Changed the first opcode to 0xCC (withfield) in order to
 705             0x024C2BB0;         // test withfield opcode with an illegal major version.
 706           };
 707           [0] { // Traps
 708           } // end Traps
 709           [1] { // Attributes
 710             Attr(#15, 14) { // LineNumberTable at 0x0153
 711               [3] { // LineNumberTable
 712                 0  8; //  at 0x015F
 713                 4  9; //  at 0x0163
 714                 10  10; //  at 0x0167
 715               }
 716             } // end LineNumberTable
 717           } // Attributes
 718         } // end Code
 719       } // Attributes
 720     } // Member
 721   } // methods
 722 
 723   [1] { // Attributes
 724     Attr(#19, 2) { // SourceFile at 0x0198
 725       #20;
 726     } // end SourceFile
 727   } // Attributes
 728 } // end class wthFldBadMajorVersion
 729 
 730 ///////////////////////////////////////////////////////////
 731 
 732 // The constant pool index of a withfield opcode (0xCC) in the Code
 733 // attribute was changed to 1.  Since this index now points to a Method
 734 // entry instead of a Field entry, a VerifyError exception should get thrown.
 735 //
 736 class wthFldWrongCPType {
 737   0xCAFEBABE;
 738   0; // minor version
 739   66; // version
 740   [20] { // Constant Pool
 741     ; // first element is empty
 742     Method #4 #17; // #1     at 0x0A
 743     Field #3 #18; // #2     at 0x0F
 744     class #12; // #3     at 0x14
 745     class #19; // #4     at 0x17
 746     Utf8 "int_v"; // #5     at 0x1A
 747     Utf8 "I"; // #6     at 0x22
 748     Utf8 "<vnew>"; // #7     at 0x26
 749     Utf8 "()V"; // #8     at 0x2F
 750     Utf8 "Code"; // #9     at 0x35
 751     Utf8 "LineNumberTable"; // #10     at 0x3C
 752     Utf8 "makewthFldWrongCPType"; // #11     at 0x4E
 753     Utf8 "wthFldWrongCPType"; // #12     at 0x60
 754     Utf8 "ValueTypes"; // #13     at 0x6E
 755     Utf8 "(I)LwthFldWrongCPType;"; // #14     at 0x7B
 756     Utf8 "SourceFile"; // #15     at 0x8E
 757     Utf8 "wthFldWrongCPType.java"; // #16     at 0x9B
 758     NameAndType #7 #8; // #17     at 0xAE
 759     NameAndType #5 #6; // #18     at 0xB3
 760     Utf8 "java/lang/Object"; // #19     at 0xB8
 761   } // Constant Pool
 762 
 763   0x0850; // access [ ACC_VALUE ACC_PRIMITIVE ACC_FINAL ]
 764   #3;// this_cpx
 765   #4;// super_cpx
 766 
 767   [0] { // Interfaces
 768   } // Interfaces
 769 
 770   [1] { // fields
 771     { // Member at 0xD5
 772       0x0010; // access
 773       #5; // name_cpx
 774       #6; // sig_cpx
 775       [0] { // Attributes
 776       } // Attributes
 777     } // Member
 778   } // fields
 779 
 780   [1] { // methods
 781     { // Member at 0x0117
 782       0x0008; // access
 783       #11; // name_cpx
 784       #14; // sig_cpx
 785       [1] { // Attributes
 786         Attr(#9, 44) { // Code at 0x011F
 787           2; // max_stack
 788           2; // max_locals
 789           Bytes[12]{
 790             0xCB00034C2B1ACC00; // Changed CP index from 2 to 1 for opcode 0xCC (withfield)
 791             0x014C2BB0;         // so that the cp index no longer points to a cp Field entry.
 792           };
 793           [0] { // Traps
 794           } // end Traps
 795           [1] { // Attributes
 796             Attr(#10, 14) { // LineNumberTable at 0x013D
 797               [3] { // LineNumberTable
 798                 0  8; //  at 0x0149
 799                 4  9; //  at 0x014D
 800                 10  10; //  at 0x0151
 801               }
 802             } // end LineNumberTable
 803           } // Attributes
 804         } // end Code
 805       } // Attributes
 806     } // Member
 807   } // methods
 808 
 809   [2] { // Attributes
 810     Attr(#15, 2) { // SourceFile at 0x0153
 811       #16;
 812     } // end SourceFile
 813     ;
 814     Attr(#13, 4) { // ValueTypes at 0x015B
 815       0x00010003;
 816     } // end ValueTypes
 817   } // Attributes
 818 } // end class wthFldWrongCPType
 819 
 820 ///////////////////////////////////////////////////////////
 821 
 822 // The cp entry for the aconst_init opcode was changed to a reference that
 823 // is not an inline type.
 824 // This should cause a VerifyError because the cp entry for opcode aconst_init
 825 // must be an inline type.
 826 //
 827 class defValueObj {
 828   0xCAFEBABE;
 829   0; // minor version
 830   66; // version
 831   [46] { // Constant Pool
 832     ; // first element is empty
 833     class #23; // #1     at 0x0A
 834     Field #1 #24; // #2     at 0x0D
 835     InvokeDynamic 0s #27; // #3     at 0x12
 836     InvokeDynamic 0s #28; // #4     at 0x17
 837     InvokeDynamic 0s #29; // #5     at 0x1C
 838     class #30; // #6     at 0x21
 839     Utf8 "int_v"; // #7     at 0x24
 840     Utf8 "I"; // #8     at 0x2C
 841     Utf8 "makedefValueObj"; // #9     at 0x30
 842     Utf8 "(I)QdefValueObj;"; // #10     at 0x41
 843     Utf8 "Code"; // #11     at 0x53
 844     Utf8 "LineNumberTable"; // #12     at 0x5A
 845     Utf8 "hashCode"; // #13     at 0x6C
 846     Utf8 "()I"; // #14     at 0x77
 847     Utf8 "equals"; // #15     at 0x7D
 848     Utf8 "(Ljava/lang/Object;)Z"; // #16     at 0x86
 849     Utf8 "toString"; // #17     at 0x9E
 850     Utf8 "()Ljava/lang/String;"; // #18     at 0xA9
 851     Utf8 "<vnew>"; // #19     at 0xC0
 852     Utf8 "()QdefValueObj;"; // #20     at 0xC9
 853     Utf8 "SourceFile"; // #21     at 0xDA
 854     Utf8 "defValueObj.java"; // #22     at 0xE7
 855     Utf8 "defValueObj"; // #23     at 0xF9
 856     NameAndType #7 #8; // #24     at 0x0106
 857     Utf8 "BootstrapMethods"; // #25     at 0x010B
 858     MethodHandle 6b #31; // #26     at 0x011E
 859     NameAndType #13 #32; // #27     at 0x0122
 860     NameAndType #15 #33; // #28     at 0x0127
 861     NameAndType #17 #34; // #29     at 0x012C
 862     Utf8 "java/lang/Object"; // #30     at 0x0131
 863     Method #35 #36; // #31     at 0x0144
 864     Utf8 "(QdefValueObj;)I"; // #32     at 0x0149
 865     Utf8 "(QdefValueObj;Ljava/lang/Object;)Z"; // #33     at 0x015B
 866     Utf8 "(QdefValueObj;)Ljava/lang/String;"; // #34     at 0x017F
 867     class #37; // #35     at 0x01A2
 868     NameAndType #38 #42; // #36     at 0x01A5
 869     Utf8 "java/lang/invoke/ValueBootstrapMethods"; // #37     at 0x01AA
 870     Utf8 "makeBootstrapMethod"; // #38     at 0x01D3
 871     class #44; // #39     at 0x01E9
 872     Utf8 "Lookup"; // #40     at 0x01EC
 873     Utf8 "InnerClasses"; // #41     at 0x01F5
 874     Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #42     at 0x0204
 875     class #45; // #43     at 0x027A
 876     Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #44     at 0x027D
 877     Utf8 "java/lang/invoke/MethodHandles"; // #45     at 0x02A5
 878   } // Constant Pool
 879 
 880   0x0850; // access [ ACC_VALUE ACC_PRIMITIVE ACC_FINAL ]
 881   #1;// this_cpx
 882   #6;// super_cpx
 883 
 884   [0] { // Interfaces
 885   } // Interfaces
 886 
 887   [1] { // fields
 888     { // Member at 0x02D0
 889       0x0010; // access
 890       #7; // name_cpx
 891       #8; // sig_cpx
 892       [0] { // Attributes
 893       } // Attributes
 894     } // Member
 895   } // fields
 896 
 897   [5] { // methods
 898     { // Member at 0x02DA
 899       0x0008; // access
 900       #9; // name_cpx
 901       #10; // sig_cpx
 902       [1] { // Attributes
 903         Attr(#11, 45) { // Code at 0x02E2
 904           2; // max_stack
 905           2; // max_locals
 906           Bytes[13]{
 907             0xCB00044C1A2B5FCC; // Changed aconst_init's cp index at byte 3 from 3 to 4.
 908             0x00024C2BB0;
 909           };
 910           [0] { // Traps
 911           } // end Traps
 912           [1] { // Attributes
 913             Attr(#12, 14) { // LineNumberTable at 0x0301
 914               [3] { // LineNumberTable
 915                 0  8; //  at 0x030D
 916                 4  9; //  at 0x0311
 917                 11  10; //  at 0x0315
 918               }
 919             } // end LineNumberTable
 920           } // Attributes
 921         } // end Code
 922       } // Attributes
 923     } // Member
 924     ;
 925     { // Member at 0x0315
 926       0x0011; // access
 927       #13; // name_cpx
 928       #14; // sig_cpx
 929       [1] { // Attributes
 930         Attr(#11, 31) { // Code at 0x031D
 931           1; // max_stack
 932           1; // max_locals
 933           Bytes[7]{
 934             0x2ABA00030000AC;
 935           };
 936           [0] { // Traps
 937           } // end Traps
 938           [1] { // Attributes
 939             Attr(#12, 6) { // LineNumberTable at 0x0336
 940               [1] { // LineNumberTable
 941                 0  1; //  at 0x0342
 942               }
 943             } // end LineNumberTable
 944           } // Attributes
 945         } // end Code
 946       } // Attributes
 947     } // Member
 948     ;
 949     { // Member at 0x0342
 950       0x0011; // access
 951       #15; // name_cpx
 952       #16; // sig_cpx
 953       [1] { // Attributes
 954         Attr(#11, 32) { // Code at 0x034A
 955           2; // max_stack
 956           2; // max_locals
 957           Bytes[8]{
 958             0x2A2BBA00040000AC;
 959           };
 960           [0] { // Traps
 961           } // end Traps
 962           [1] { // Attributes
 963             Attr(#12, 6) { // LineNumberTable at 0x0364
 964               [1] { // LineNumberTable
 965                 0  1; //  at 0x0370
 966               }
 967             } // end LineNumberTable
 968           } // Attributes
 969         } // end Code
 970       } // Attributes
 971     } // Member
 972     ;
 973     { // Member at 0x0370
 974       0x0011; // access
 975       #17; // name_cpx
 976       #18; // sig_cpx
 977       [1] { // Attributes
 978         Attr(#11, 31) { // Code at 0x0378
 979           1; // max_stack
 980           1; // max_locals
 981           Bytes[7]{
 982             0x2ABA00050000B0;
 983           };
 984           [0] { // Traps
 985           } // end Traps
 986           [1] { // Attributes
 987             Attr(#12, 6) { // LineNumberTable at 0x0391
 988               [1] { // LineNumberTable
 989                 0  1; //  at 0x039D
 990               }
 991             } // end LineNumberTable
 992           } // Attributes
 993         } // end Code
 994       } // Attributes
 995     } // Member
 996     ;
 997     { // Member at 0x039D
 998       0x0008; // access
 999       #19; // name_cpx
1000       #20; // sig_cpx
1001       [1] { // Attributes
1002         Attr(#11, 45) { // Code at 0x03A5
1003           2; // max_stack
1004           1; // max_locals
1005           Bytes[13]{
1006             0xCB00014B042A5FCC;
1007             0x00024B2AB0;
1008           };
1009           [0] { // Traps
1010           } // end Traps
1011           [1] { // Attributes
1012             Attr(#12, 14) { // LineNumberTable at 0x03C4
1013               [3] { // LineNumberTable
1014                 0  4; //  at 0x03D0
1015                 4  5; //  at 0x03D4
1016                 11  6; //  at 0x03D8
1017               }
1018             } // end LineNumberTable
1019           } // Attributes
1020         } // end Code
1021       } // Attributes
1022     } // Member
1023   } // methods
1024 
1025   [3] { // Attributes
1026     Attr(#21, 2) { // SourceFile at 0x03DA
1027       #22;
1028     } // end SourceFile
1029     ;
1030     Attr(#41, 10) { // InnerClasses at 0x03E2
1031       [1] { // InnerClasses
1032         #39 #43 #40 25; //  at 0x03F2
1033       }
1034     } // end InnerClasses
1035     ;
1036     Attr(#25, 6) { // BootstrapMethods at 0x03F2
1037       [1] { // bootstrap_methods
1038         {  //  bootstrap_method
1039           #26; // bootstrap_method_ref
1040           [0] { // bootstrap_arguments
1041           }  //  bootstrap_arguments
1042         }  //  bootstrap_method
1043       }
1044     } // end BootstrapMethods
1045   } // Attributes
1046 } // end class defValueObj
1047 
1048 ///////////////////////////////////////////////////////////
1049 
1050 // This class has a withfield opcode with a non-Q type operand.
1051 class withfieldL {
1052   0xCAFEBABE;
1053   0; // minor version
1054   66; // version
1055   [28] { // Constant Pool
1056     ; // first element is empty
1057     class #2; // #1     at 0x0A
1058     Utf8 "withfieldL"; // #2     at 0x0D
1059     class #2; // #3     at 0x17
1060     Field #1 #5; // #4     at 0x1A
1061     NameAndType #6 #7; // #5     at 0x1F
1062     Utf8 "x"; // #6     at 0x24
1063     Utf8 "I"; // #7     at 0x28
1064     Field #1 #9; // #8     at 0x2C
1065     NameAndType #10 #7; // #9     at 0x31
1066     Utf8 "y"; // #10     at 0x36
1067     class #12; // #11     at 0x3A
1068     Utf8 "QwithfieldL;"; // #12     at 0x3D
1069     class #14; // #13     at 0x49
1070     Utf8 "java/lang/Object"; // #14     at 0x4C
1071     Utf8 "makePoint"; // #15     at 0x5F
1072     Utf8 "(II)QwithfieldL;"; // #16     at 0x6B
1073     Utf8 "Code"; // #17     at 0x7B
1074     Utf8 "LineNumberTable"; // #18     at 0x82
1075     Utf8 "<vnew>"; // #19     at 0x94
1076     Utf8 "()QwithfieldL;"; // #20     at 0x9D
1077     Utf8 "SourceFile"; // #21     at 0xAB
1078     Utf8 "X.java"; // #22     at 0xB8
1079     Utf8 "NestHost"; // #23     at 0xC1
1080     class #25; // #24     at 0xCC
1081     Utf8 "X"; // #25     at 0xCF
1082     Utf8 "InnerClasses"; // #26     at 0xD3
1083     Utf8 "Point"; // #27     at 0xE2
1084   } // Constant Pool
1085 
1086   0x0850; // access [ ACC_VALUE ACC_PRIMITIVE ACC_FINAL ]
1087   #1;// this_cpx
1088   #13;// super_cpx
1089 
1090   [0] { // Interfaces
1091   } // Interfaces
1092 
1093   [2] { // Fields
1094     {  // field at 0xF4
1095       0x0010; // access
1096       #6; // name_index       : x
1097       #7; // descriptor_index : I
1098       [0] { // Attributes
1099       } // Attributes
1100     }
1101     ;
1102     {  // field at 0xFC
1103       0x0010; // access
1104       #10; // name_index       : y
1105       #7; // descriptor_index : I
1106       [0] { // Attributes
1107       } // Attributes
1108     }
1109   } // Fields
1110 
1111   [2] { // Methods
1112     {  // method at 0x0106
1113       0x0008; // access
1114       #15; // name_index       : makePoint
1115       #16; // descriptor_index : (II)QwithfieldL;
1116       [1] { // Attributes
1117         Attr(#17, 62) { // Code at 0x010E
1118           2; // max_stack
1119           3; // max_locals
1120           Bytes[26]{
1121             0xCB0001C000034D1A;
1122             0x2C5FCC00044D1B2C;
1123             0x5FCC00084D2CC000;
1124             0x0BB0;
1125           }
1126           [0] { // Traps
1127           } // end Traps
1128           [1] { // Attributes
1129             Attr(#18, 18) { // LineNumberTable at 0x013A
1130               [4] { // line_number_table
1131                 0  4; //  at 0x0146
1132                 7  5; //  at 0x014A
1133                 14  6; //  at 0x014E
1134                 21  7; //  at 0x0152
1135               }
1136             } // end LineNumberTable
1137           } // Attributes
1138         } // end Code
1139       } // Attributes
1140     }
1141     ;
1142     {  // method at 0x0152
1143       0x000A; // access
1144       #19; // name_index       : <vnew>
1145       #20; // descriptor_index : ()QwithfieldL;
1146       [1] { // Attributes
1147         Attr(#17, 55) { // Code at 0x015A
1148           2; // max_stack
1149           1; // max_locals
1150           Bytes[23]{
1151             0xCB00014B032A5FCC;
1152             0x0008594BB400082A;
1153             0x5FCC00044B2AB0;
1154           }
1155           [0] { // Traps
1156           } // end Traps
1157           [1] { // Attributes
1158             Attr(#18, 14) { // LineNumberTable at 0x0183
1159               [3] { // line_number_table
1160                 0  9; //  at 0x018F
1161                 4  10; //  at 0x0193
1162                 21  11; //  at 0x0197
1163               }
1164             } // end LineNumberTable
1165           } // Attributes
1166         } // end Code
1167       } // Attributes
1168     }
1169   } // Methods
1170 
1171   [3] { // Attributes
1172     Attr(#21, 2) { // SourceFile at 0x0199
1173       #22;
1174     } // end SourceFile
1175     ;
1176     Attr(#23, 2) { // NestHost at 0x01A1
1177       #24; // X at 0x01A9
1178     } // end NestHost
1179     ;
1180     Attr(#26, 10) { // InnerClasses at 0x01A9
1181       [1] { // classes
1182         #1 #24 #27 280; //  at 0x01B9
1183       }
1184     } // end InnerClasses
1185   } // Attributes
1186 } // end class withfieldL
1187 
1188 ///////////////////////////////////////////////////////////
1189 
1190 // Test that a VerifyError exception is thrown when trying to pass a null
1191 // when the formal parameter is an inline type.
1192 //
1193 // // Java program emulating the jcod contents.
1194 // public inline final class NoNullVT {
1195 //     final int x;
1196 //     final int y;
1197 //
1198 //     private NoNullVT() {
1199 //         x = 0;
1200 //         y = 0;
1201 //     }
1202 //
1203 //     public int getX() { return x; }
1204 //     public int getY() { return y; }
1205 //
1206 //     public boolean isSameNoNullVT(NoNullVT that) {
1207 //         return this.getX() == that.getX() && this.getY() == that.getY();
1208 //     }
1209 //
1210 //     public boolean equals(Object o) {
1211 //         if(o instanceof NoNullVT) {
1212 //             return ((NoNullVT)o).x == x &&  ((NoNullVT)o).y == y;
1213 //         } else {
1214 //             return false;
1215 //         }
1216 //     }
1217 //
1218 //     public static NoNullVT createNoNullVT(int x, int y) {
1219 //         NoNullVT p = NoNullVT.default;
1220 //         p = __WithField(p.x, x);
1221 //         p = __WithField(p.y, y);
1222 //         return p;
1223 //     }
1224 //
1225 //     public static void main(String[] args) {
1226 //         String str = null;
1227 //         NoNullVT a = createNoNullVT(3, 4);
1228 //         NoNullVT b = createNoNullVT(2, 4);
1229 //         boolean res = a.isSameNoNullVT(null); // Should throw VerifyError
1230 //     }
1231 // }
1232 
1233 class NoNullVT {
1234   0xCAFEBABE;
1235   0; // minor version
1236   66; // version
1237   [63] { // Constant Pool
1238     ; // first element is empty
1239     class #36; // #1     at 0x0A
1240     Field #1 #37; // #2     at 0x0D
1241     Field #1 #38; // #3     at 0x12
1242     Method #1 #39; // #4     at 0x17
1243     Method #1 #40; // #5     at 0x1C
1244     class #41; // #6     at 0x21
1245     Method #1 #42; // #7     at 0x24
1246     Method #1 #43; // #8     at 0x29
1247     InvokeDynamic 0s #46; // #9     at 0x2E
1248     InvokeDynamic 0s #47; // #10     at 0x33
1249     class #48; // #11     at 0x38
1250     Utf8 "x"; // #12     at 0x3B
1251     Utf8 "I"; // #13     at 0x3F
1252     Utf8 "y"; // #14     at 0x43
1253     Utf8 "getX"; // #15     at 0x47
1254     Utf8 "()I"; // #16     at 0x4E
1255     Utf8 "Code"; // #17     at 0x54
1256     Utf8 "LineNumberTable"; // #18     at 0x5B
1257     Utf8 "getY"; // #19     at 0x6D
1258     Utf8 "isSameNoNullVT"; // #20     at 0x74
1259     Utf8 "(QNoNullVT;)Z"; // #21     at 0x85
1260     Utf8 "StackMapTable"; // #22     at 0x95
1261     Utf8 "equals"; // #23     at 0xA5
1262     Utf8 "(Ljava/lang/Object;)Z"; // #24     at 0xAE
1263     Utf8 "createNoNullVT"; // #25     at 0xC6
1264     Utf8 "(II)QNoNullVT;"; // #26     at 0xD7
1265     Utf8 "main"; // #27     at 0xE8
1266     Utf8 "([Ljava/lang/String;)V"; // #28     at 0xEF
1267     Utf8 "hashCode"; // #29     at 0x0108
1268     Utf8 "toString"; // #30     at 0x0113
1269     Utf8 "()Ljava/lang/String;"; // #31     at 0x011E
1270     Utf8 "<vnew>"; // #32     at 0x0135
1271     Utf8 "()QNoNullVT;"; // #33     at 0x013E
1272     Utf8 "SourceFile"; // #34     at 0x014D
1273     Utf8 "NoNullVT.java"; // #35     at 0x015A
1274     Utf8 "NoNullVT"; // #36     at 0x016A
1275     NameAndType #12 #13; // #37     at 0x0175
1276     NameAndType #14 #13; // #38     at 0x017A
1277     NameAndType #15 #16; // #39     at 0x017F
1278     NameAndType #19 #16; // #40     at 0x0184
1279     Utf8 "QNoNullVT;"; // #41     at 0x0189
1280     NameAndType #25 #26; // #42     at 0x0196
1281     NameAndType #20 #21; // #43     at 0x019B
1282     Utf8 "BootstrapMethods"; // #44     at 0x01A0
1283     MethodHandle 6b #49; // #45     at 0x01B3
1284     NameAndType #29 #50; // #46     at 0x01B7
1285     NameAndType #30 #51; // #47     at 0x01BC
1286     Utf8 "java/lang/Object"; // #48     at 0x01C1
1287     Method #52 #53; // #49     at 0x01D4
1288     Utf8 "(QNoNullVT;)I"; // #50     at 0x01D9
1289     Utf8 "(QNoNullVT;)Ljava/lang/String;"; // #51     at 0x01E9
1290     class #54; // #52     at 0x020A
1291     NameAndType #55 #59; // #53     at 0x020D
1292     Utf8 "java/lang/invoke/ValueBootstrapMethods"; // #54     at 0x0212
1293     Utf8 "makeBootstrapMethod"; // #55     at 0x023B
1294     class #61; // #56     at 0x0251
1295     Utf8 "Lookup"; // #57     at 0x0254
1296     Utf8 "InnerClasses"; // #58     at 0x025D
1297     Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #59     at 0x026C
1298     class #62; // #60     at 0x02E2
1299     Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #61     at 0x02E5
1300     Utf8 "java/lang/invoke/MethodHandles"; // #62     at 0x030D
1301   } // Constant Pool
1302 
1303   0x0851; // access [ ACC_VALUE ACC_PRIMITIVE ACC_PUBLIC ACC_FINAL ]
1304   #1;// this_cpx
1305   #11;// super_cpx
1306 
1307   [0] { // Interfaces
1308   } // Interfaces
1309 
1310   [2] { // fields
1311     { // Member at 0x0338
1312       0x0010; // access
1313       #12; // name_cpx
1314       #13; // sig_cpx
1315       [0] { // Attributes
1316       } // Attributes
1317     } // Member
1318     ;
1319     { // Member at 0x0340
1320       0x0010; // access
1321       #14; // name_cpx
1322       #13; // sig_cpx
1323       [0] { // Attributes
1324       } // Attributes
1325     } // Member
1326   } // fields
1327 
1328   [9] { // methods
1329     { // Member at 0x034A
1330       0x0001; // access
1331       #15; // name_cpx
1332       #16; // sig_cpx
1333       [1] { // Attributes
1334         Attr(#17, 29) { // Code at 0x0352
1335           1; // max_stack
1336           1; // max_locals
1337           Bytes[5]{
1338             0x2AB40002AC;
1339           };
1340           [0] { // Traps
1341           } // end Traps
1342           [1] { // Attributes
1343             Attr(#18, 6) { // LineNumberTable at 0x0369
1344               [1] { // LineNumberTable
1345                 0  10; //  at 0x0375
1346               }
1347             } // end LineNumberTable
1348           } // Attributes
1349         } // end Code
1350       } // Attributes
1351     } // Member
1352     ;
1353     { // Member at 0x0375
1354       0x0001; // access
1355       #19; // name_cpx
1356       #16; // sig_cpx
1357       [1] { // Attributes
1358         Attr(#17, 29) { // Code at 0x037D
1359           1; // max_stack
1360           1; // max_locals
1361           Bytes[5]{
1362             0x2AB40003AC;
1363           };
1364           [0] { // Traps
1365           } // end Traps
1366           [1] { // Attributes
1367             Attr(#18, 6) { // LineNumberTable at 0x0394
1368               [1] { // LineNumberTable
1369                 0  11; //  at 0x03A0
1370               }
1371             } // end LineNumberTable
1372           } // Attributes
1373         } // end Code
1374       } // Attributes
1375     } // Member
1376     ;
1377     { // Member at 0x03A0
1378       0x0001; // access
1379       #20; // name_cpx
1380       #21; // sig_cpx
1381       [1] { // Attributes
1382         Attr(#17, 63) { // Code at 0x03A8
1383           2; // max_stack
1384           2; // max_locals
1385           Bytes[28]{
1386             0x2AB600042BB60004;
1387             0xA000122AB600052B;
1388             0xB60005A0000704A7;
1389             0x000403AC;
1390           };
1391           [0] { // Traps
1392           } // end Traps
1393           [2] { // Attributes
1394             Attr(#18, 6) { // LineNumberTable at 0x03D6
1395               [1] { // LineNumberTable
1396                 0  14; //  at 0x03E2
1397               }
1398             } // end LineNumberTable
1399             ;
1400             Attr(#22, 5) { // StackMapTable at 0x03E2
1401               [2] { //
1402                 26b; // same_frame
1403                 64b, [1]z{1b}; // same_locals_1_stack_item_frame
1404               }
1405             } // end StackMapTable
1406           } // Attributes
1407         } // end Code
1408       } // Attributes
1409     } // Member
1410     ;
1411     { // Member at 0x03ED
1412       0x0001; // access
1413       #23; // name_cpx
1414       #24; // sig_cpx
1415       [1] { // Attributes
1416         Attr(#17, 87) { // Code at 0x03F5
1417           2; // max_stack
1418           2; // max_locals
1419           Bytes[43]{
1420             0x2BC100019900252B;
1421             0xC00006B400022AB4;
1422             0x0002A000152BC000;
1423             0x06B400032AB40003;
1424             0xA0000704A7000403;
1425             0xAC03AC;
1426           };
1427           [0] { // Traps
1428           } // end Traps
1429           [2] { // Attributes
1430             Attr(#18, 14) { // LineNumberTable at 0x0432
1431               [3] { // LineNumberTable
1432                 0  18; //  at 0x043E
1433                 7  19; //  at 0x0442
1434                 41  21; //  at 0x0446
1435               }
1436             } // end LineNumberTable
1437             ;
1438             Attr(#22, 6) { // StackMapTable at 0x0446
1439               [3] { //
1440                 39b; // same_frame
1441                 64b, [1]z{1b}; // same_locals_1_stack_item_frame
1442                 0b; // same_frame
1443               }
1444             } // end StackMapTable
1445           } // Attributes
1446         } // end Code
1447       } // Attributes
1448     } // Member
1449     ;
1450     { // Member at 0x0452
1451       0x0009; // access
1452       #25; // name_cpx
1453       #26; // sig_cpx
1454       [1] { // Attributes
1455         Attr(#17, 56) { // Code at 0x045A
1456           2; // max_stack
1457           3; // max_locals
1458           Bytes[20]{
1459             0xCB00014D1A2C5FCC;
1460             0x00024D1B2C5FCC00;
1461             0x034D2CB0;
1462           };
1463           [0] { // Traps
1464           } // end Traps
1465           [1] { // Attributes
1466             Attr(#18, 18) { // LineNumberTable at 0x0480
1467               [4] { // LineNumberTable
1468                 0  26; //  at 0x048C
1469                 4  27; //  at 0x0490
1470                 11  28; //  at 0x0494
1471                 18  29; //  at 0x0498
1472               }
1473             } // end LineNumberTable
1474           } // Attributes
1475         } // end Code
1476       } // Attributes
1477     } // Member
1478     ;
1479     { // Member at 0x0498
1480       0x0009; // access
1481       #27; // name_cpx
1482       #28; // sig_cpx
1483       [1] { // Attributes
1484         Attr(#17, 62) { // Code at 0x04A0
1485           2; // max_stack
1486           5; // max_locals
1487           Bytes[22]{
1488             0x014C0607B800074D;
1489             0x0507B800074E2C2B; // Change last nibble from C to B to load null
1490             0xB600083604B1;
1491           };
1492           [0] { // Traps
1493           } // end Traps
1494           [1] { // Attributes
1495             Attr(#18, 22) { // LineNumberTable at 0x04C8
1496               [5] { // LineNumberTable
1497                 0  33; //  at 0x04D4
1498                 2  34; //  at 0x04D8
1499                 8  35; //  at 0x04DC
1500                 14  36; //  at 0x04E0
1501                 21  37; //  at 0x04E4
1502               }
1503             } // end LineNumberTable
1504           } // Attributes
1505         } // end Code
1506       } // Attributes
1507     } // Member
1508     ;
1509     { // Member at 0x04E4
1510       0x0011; // access
1511       #29; // name_cpx
1512       #16; // sig_cpx
1513       [1] { // Attributes
1514         Attr(#17, 31) { // Code at 0x04EC
1515           1; // max_stack
1516           1; // max_locals
1517           Bytes[7]{
1518             0x2ABA00090000AC;
1519           };
1520           [0] { // Traps
1521           } // end Traps
1522           [1] { // Attributes
1523             Attr(#18, 6) { // LineNumberTable at 0x0505
1524               [1] { // LineNumberTable
1525                 0  1; //  at 0x0511
1526               }
1527             } // end LineNumberTable
1528           } // Attributes
1529         } // end Code
1530       } // Attributes
1531     } // Member
1532     ;
1533     { // Member at 0x0511
1534       0x0011; // access
1535       #30; // name_cpx
1536       #31; // sig_cpx
1537       [1] { // Attributes
1538         Attr(#17, 31) { // Code at 0x0519
1539           1; // max_stack
1540           1; // max_locals
1541           Bytes[7]{
1542             0x2ABA000A0000B0;
1543           };
1544           [0] { // Traps
1545           } // end Traps
1546           [1] { // Attributes
1547             Attr(#18, 6) { // LineNumberTable at 0x0532
1548               [1] { // LineNumberTable
1549                 0  1; //  at 0x053E
1550               }
1551             } // end LineNumberTable
1552           } // Attributes
1553         } // end Code
1554       } // Attributes
1555     } // Member
1556     ;
1557     { // Member at 0x053E
1558       0x000A; // access
1559       #32; // name_cpx
1560       #33; // sig_cpx
1561       [1] { // Attributes
1562         Attr(#17, 56) { // Code at 0x0546
1563           2; // max_stack
1564           1; // max_locals
1565           Bytes[20]{
1566             0xCB00014B032A5FCC;
1567             0x00024B032A5FCC00;
1568             0x034B2AB0;
1569           };
1570           [0] { // Traps
1571           } // end Traps
1572           [1] { // Attributes
1573             Attr(#18, 18) { // LineNumberTable at 0x056C
1574               [4] { // LineNumberTable
1575                 0  5; //  at 0x0578
1576                 4  6; //  at 0x057C
1577                 11  7; //  at 0x0580
1578                 18  8; //  at 0x0584
1579               }
1580             } // end LineNumberTable
1581           } // Attributes
1582         } // end Code
1583       } // Attributes
1584     } // Member
1585   } // methods
1586 
1587   [3] { // Attributes
1588     Attr(#34, 2) { // SourceFile at 0x0586
1589       #35;
1590     } // end SourceFile
1591     ;
1592     Attr(#58, 10) { // InnerClasses at 0x058E
1593       [1] { // InnerClasses
1594         #56 #60 #57 25; //  at 0x059E
1595       }
1596     } // end InnerClasses
1597     ;
1598     Attr(#44, 6) { // BootstrapMethods at 0x059E
1599       [1] { // bootstrap_methods
1600         {  //  bootstrap_method
1601           #45; // bootstrap_method_ref
1602           [0] { // bootstrap_arguments
1603           }  //  bootstrap_arguments
1604         }  //  bootstrap_method
1605       }
1606     } // end BootstrapMethods
1607   } // Attributes
1608 } // end class NoNullVT