1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615
|
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// Class containing duplicate Signature attributes. Loading it should cause a
// ClassFormatError exception.
class DupClassSigAttrs {
0xCAFEBABE;
0; // minor version
53; // version
[33] { // Constant Pool
; // first element is empty
Method #6 #17; // #1 at 0x0A
Field #18 #19; // #2 at 0x0F
String #20; // #3 at 0x14
Method #21 #22; // #4 at 0x17
class #23; // #5 at 0x1C
class #24; // #6 at 0x1F
Utf8 "<init>"; // #7 at 0x22
Utf8 "()V"; // #8 at 0x2B
Utf8 "Code"; // #9 at 0x31
Utf8 "LineNumberTable"; // #10 at 0x38
Utf8 "main"; // #11 at 0x4A
Utf8 "([Ljava/lang/String;)V"; // #12 at 0x51
Utf8 "Exceptions"; // #13 at 0x6A
class #25; // #14 at 0x77
Utf8 "SourceFile"; // #15 at 0x7A
Utf8 "DupClassSigAttrs.java"; // #16 at 0x87
NameAndType #7 #8; // #17 at 0x9F
class #26; // #18 at 0xA4
NameAndType #27 #28; // #19 at 0xA7
Utf8 "hi"; // #20 at 0xAC
class #29; // #21 at 0xB1
NameAndType #30 #31; // #22 at 0xB4
Utf8 "DupClassSigAttrs"; // #23 at 0xB9
Utf8 "java/lang/Object"; // #24 at 0xCC
Utf8 "java/lang/Throwable"; // #25 at 0xDF
Utf8 "java/lang/System"; // #26 at 0xF5
Utf8 "out"; // #27 at 0x0108
Utf8 "Ljava/io/PrintStream;"; // #28 at 0x010E
Utf8 "java/io/PrintStream"; // #29 at 0x0126
Utf8 "println"; // #30 at 0x013C
Utf8 "(Ljava/lang/String;)V"; // #31 at 0x0146
Utf8 "Signature"; // #32 at 0x015E
} // Constant Pool
0x0021; // access
#5;// this_cpx
#6;// super_cpx
[0] { // Interfaces
} // Interfaces
[0] { // fields
} // fields
[2] { // methods
{ // Member at 0x0176
0x0001; // access
#7; // name_cpx
#8; // sig_cpx
[1] { // Attributes
Attr(#9, 29) { // Code at 0x017E
1; // max_stack
1; // max_locals
Bytes[5]{
0x2AB70001B1;
};
[0] { // Traps
} // end Traps
[1] { // Attributes
Attr(#10, 6) { // LineNumberTable at 0x0195
[1] { // LineNumberTable
0 1; // at 0x01A1
}
} // end LineNumberTable
} // Attributes
} // end Code
} // Attributes
} // Member
;
{ // Member at 0x01A1
0x0009; // access
#11; // name_cpx
#12; // sig_cpx
[2] { // Attributes
Attr(#9, 37) { // Code at 0x01A9
2; // max_stack
1; // max_locals
Bytes[9]{
0xB200021203B60004;
0xB1;
};
[0] { // Traps
} // end Traps
[1] { // Attributes
Attr(#10, 10) { // LineNumberTable at 0x01C4
[2] { // LineNumberTable
0 4; // at 0x01D0
8 5; // at 0x01D4
}
} // end LineNumberTable
} // Attributes
} // end Code
;
Attr(#13, 4) { // Exceptions at 0x01D4
[1] { // Exceptions
#14; // at 0x01DE
}
} // end Exceptions
} // Attributes
} // Member
} // methods
[3] { // Attributes
Attr(#15, 2) { // SourceFile at 0x01E0
#16;
} // end SourceFile
;
Attr(#32, 2) { // Signature at 0x01E8
#16;
} // end Signature
;
Attr(#32, 2) { // *** Duplicate *** Signature at 0x01F0
#16;
} // end Signature
} // Attributes
} // end class DupClassSigAttrs
// Class containing a method with duplicate Signature attributes. Loading it
// should cause a ClassFormatError exception.
class DupMthSigAttrs {
0xCAFEBABE;
0; // minor version
53; // version
[33] { // Constant Pool
; // first element is empty
Method #6 #17; // #1 at 0x0A
Field #18 #19; // #2 at 0x0F
String #20; // #3 at 0x14
Method #21 #22; // #4 at 0x17
class #23; // #5 at 0x1C
class #24; // #6 at 0x1F
Utf8 "<init>"; // #7 at 0x22
Utf8 "()V"; // #8 at 0x2B
Utf8 "Code"; // #9 at 0x31
Utf8 "LineNumberTable"; // #10 at 0x38
Utf8 "main"; // #11 at 0x4A
Utf8 "([Ljava/lang/String;)V"; // #12 at 0x51
Utf8 "Exceptions"; // #13 at 0x6A
class #25; // #14 at 0x77
Utf8 "SourceFile"; // #15 at 0x7A
Utf8 "DupMthSigAttrs.java"; // #16 at 0x87
NameAndType #7 #8; // #17 at 0x9D
class #26; // #18 at 0xA2
NameAndType #27 #28; // #19 at 0xA5
Utf8 "hi"; // #20 at 0xAA
class #29; // #21 at 0xAF
NameAndType #30 #31; // #22 at 0xB2
Utf8 "DupMthSigAttrs"; // #23 at 0xB7
Utf8 "java/lang/Object"; // #24 at 0xC8
Utf8 "java/lang/Throwable"; // #25 at 0xDB
Utf8 "java/lang/System"; // #26 at 0xF1
Utf8 "out"; // #27 at 0x0104
Utf8 "Ljava/io/PrintStream;"; // #28 at 0x010A
Utf8 "java/io/PrintStream"; // #29 at 0x0122
Utf8 "println"; // #30 at 0x0138
Utf8 "(Ljava/lang/String;)V"; // #31 at 0x0142
Utf8 "Signature"; // #32 at 0x015A
} // Constant Pool
0x0021; // access
#5;// this_cpx
#6;// super_cpx
[0] { // Interfaces
} // Interfaces
[0] { // fields
} // fields
[2] { // methods
{ // Member at 0x0172
0x0001; // access
#7; // name_cpx
#8; // sig_cpx
[1] { // Attributes
Attr(#9, 29) { // Code at 0x017A
1; // max_stack
1; // max_locals
Bytes[5]{
0x2AB70001B1;
};
[0] { // Traps
} // end Traps
[1] { // Attributes
Attr(#10, 6) { // LineNumberTable at 0x0191
[1] { // LineNumberTable
0 1; // at 0x019D
}
} // end LineNumberTable
} // Attributes
} // end Code
} // Attributes
} // Member
;
{ // Member at 0x019D
0x0009; // access
#11; // name_cpx
#12; // sig_cpx
[4] { // Attributes
Attr(#9, 37) { // Code at 0x01A5
2; // max_stack
1; // max_locals
Bytes[9]{
0xB200021203B60004;
0xB1;
};
[0] { // Traps
} // end Traps
[1] { // Attributes
Attr(#10, 10) { // LineNumberTable at 0x01C0
[2] { // LineNumberTable
0 4; // at 0x01CC
8 5; // at 0x01D0
}
} // end LineNumberTable
} // Attributes
} // end Code
;
Attr(#32, 2) { // Signature at 0x01D0
#16;
} // end Signature
;
Attr(#13, 4) { // Exceptions at 0x01D8
[1] { // Exceptions
#14; // at 0x01E2
}
} // end Exceptions
;
Attr(#32, 2) { // *** Duplicate *** Signature at 0x01E2
#16;
} // end Signature
} // Attributes
} // Member
} // methods
[1] { // Attributes
Attr(#15, 2) { // SourceFile at 0x01EC
#16;
} // end SourceFile
} // Attributes
} // end class DupMthSigAttrs
// Class containing a field with duplicate Signature attributes. Loading it
// should cause a ClassFormatError exception.
class DupFldSigAttrs {
0xCAFEBABE;
0; // minor version
53; // version
[42] { // Constant Pool
; // first element is empty
Method #9 #23; // #1 at 0x0A
Field #24 #25; // #2 at 0x0F
Field #8 #26; // #3 at 0x14
Method #27 #28; // #4 at 0x19
class #29; // #5 at 0x1E
String #30; // #6 at 0x21
Method #5 #31; // #7 at 0x24
class #32; // #8 at 0x29
class #33; // #9 at 0x2C
Utf8 "str"; // #10 at 0x2F
Utf8 "Ljava/lang/String;"; // #11 at 0x35
Utf8 "<init>"; // #12 at 0x4A
Utf8 "()V"; // #13 at 0x53
Utf8 "Code"; // #14 at 0x59
Utf8 "LineNumberTable"; // #15 at 0x60
Utf8 "main"; // #16 at 0x72
Utf8 "([Ljava/lang/String;)V"; // #17 at 0x79
Utf8 "Exceptions"; // #18 at 0x92
class #34; // #19 at 0x9F
Utf8 "<clinit>"; // #20 at 0xA2
Utf8 "SourceFile"; // #21 at 0xAD
Utf8 "DupFldSigAttrs.java"; // #22 at 0xBA
NameAndType #12 #13; // #23 at 0xD0
class #35; // #24 at 0xD5
NameAndType #36 #37; // #25 at 0xD8
NameAndType #10 #11; // #26 at 0xDD
class #38; // #27 at 0xE2
NameAndType #39 #40; // #28 at 0xE5
Utf8 "java/lang/String"; // #29 at 0xEA
Utf8 "Hi"; // #30 at 0xFD
NameAndType #12 #40; // #31 at 0x0102
Utf8 "DupFldSigAttrs"; // #32 at 0x0107
Utf8 "java/lang/Object"; // #33 at 0x0118
Utf8 "java/lang/Throwable"; // #34 at 0x012B
Utf8 "java/lang/System"; // #35 at 0x0141
Utf8 "out"; // #36 at 0x0154
Utf8 "Ljava/io/PrintStream;"; // #37 at 0x015A
Utf8 "java/io/PrintStream"; // #38 at 0x0172
Utf8 "println"; // #39 at 0x0188
Utf8 "(Ljava/lang/String;)V"; // #40 at 0x0192
Utf8 "Signature"; // #41 at 0x01AA
} // Constant Pool
0x0021; // access
#8;// this_cpx
#9;// super_cpx
[0] { // Interfaces
} // Interfaces
[1] { // fields
{ // Member at 0x01C0
0x0008; // access
#10; // name_cpx
#11; // sig_cpx
[2] { // Attributes
Attr(#41, 2) { // Signature at 0x01C8
#16;
} // end Signature
;
Attr(#41, 2) { // *** Duplicate *** Signature at 0x01D0
#16;
} // end Signature
} // Attributes
} // Member
} // fields
[3] { // methods
{ // Member at 0x01DA
0x0001; // access
#12; // name_cpx
#13; // sig_cpx
[1] { // Attributes
Attr(#14, 29) { // Code at 0x01E2
1; // max_stack
1; // max_locals
Bytes[5]{
0x2AB70001B1;
};
[0] { // Traps
} // end Traps
[1] { // Attributes
Attr(#15, 6) { // LineNumberTable at 0x01F9
[1] { // LineNumberTable
0 1; // at 0x0205
}
} // end LineNumberTable
} // Attributes
} // end Code
} // Attributes
} // Member
;
{ // Member at 0x0205
0x0009; // access
#16; // name_cpx
#17; // sig_cpx
[2] { // Attributes
Attr(#14, 38) { // Code at 0x020D
2; // max_stack
1; // max_locals
Bytes[10]{
0xB20002B20003B600;
0x04B1;
};
[0] { // Traps
} // end Traps
[1] { // Attributes
Attr(#15, 10) { // LineNumberTable at 0x0229
[2] { // LineNumberTable
0 6; // at 0x0235
9 7; // at 0x0239
}
} // end LineNumberTable
} // Attributes
} // end Code
;
Attr(#18, 4) { // Exceptions at 0x0239
[1] { // Exceptions
#19; // at 0x0243
}
} // end Exceptions
} // Attributes
} // Member
;
{ // Member at 0x0243
0x0008; // access
#20; // name_cpx
#13; // sig_cpx
[1] { // Attributes
Attr(#14, 37) { // Code at 0x024B
3; // max_stack
0; // max_locals
Bytes[13]{
0xBB0005591206B700;
0x07B30003B1;
};
[0] { // Traps
} // end Traps
[1] { // Attributes
Attr(#15, 6) { // LineNumberTable at 0x026A
[1] { // LineNumberTable
0 3; // at 0x0276
}
} // end LineNumberTable
} // Attributes
} // end Code
} // Attributes
} // Member
} // methods
[1] { // Attributes
Attr(#21, 2) { // SourceFile at 0x0278
#22;
} // end SourceFile
} // Attributes
} // end class DupFldSigAttrs
// Class containing a Signature attribute and a field and methods with Signature
// attributes. Since neither the class nor any of its fields or methods have
// duplicate Signature attributes, loading this class should not cause a
// ClassFormatError exception.
class OkaySigAttrs {
0xCAFEBABE;
0; // minor version
53; // version
[42] { // Constant Pool
; // first element is empty
Method #9 #23; // #1 at 0x0A
Field #24 #25; // #2 at 0x0F
Field #8 #26; // #3 at 0x14
Method #27 #28; // #4 at 0x19
class #29; // #5 at 0x1E
String #30; // #6 at 0x21
Method #5 #31; // #7 at 0x24
class #32; // #8 at 0x29
class #33; // #9 at 0x2C
Utf8 "str"; // #10 at 0x2F
Utf8 "Ljava/lang/String;"; // #11 at 0x35
Utf8 "<init>"; // #12 at 0x4A
Utf8 "()V"; // #13 at 0x53
Utf8 "Code"; // #14 at 0x59
Utf8 "LineNumberTable"; // #15 at 0x60
Utf8 "main"; // #16 at 0x72
Utf8 "([Ljava/lang/String;)V"; // #17 at 0x79
Utf8 "Exceptions"; // #18 at 0x92
class #34; // #19 at 0x9F
Utf8 "<clinit>"; // #20 at 0xA2
Utf8 "SourceFile"; // #21 at 0xAD
Utf8 "OkaySigAttrs.java"; // #22 at 0xBA
NameAndType #12 #13; // #23 at 0xCE
class #35; // #24 at 0xD3
NameAndType #36 #37; // #25 at 0xD6
NameAndType #10 #11; // #26 at 0xDB
class #38; // #27 at 0xE0
NameAndType #39 #40; // #28 at 0xE3
Utf8 "java/lang/String"; // #29 at 0xE8
Utf8 "Hi"; // #30 at 0xFB
NameAndType #12 #40; // #31 at 0x0100
Utf8 "OkaySigAttrs"; // #32 at 0x0105
Utf8 "java/lang/Object"; // #33 at 0x0114
Utf8 "java/lang/Throwable"; // #34 at 0x0127
Utf8 "java/lang/System"; // #35 at 0x013D
Utf8 "out"; // #36 at 0x0150
Utf8 "Ljava/io/PrintStream;"; // #37 at 0x0156
Utf8 "java/io/PrintStream"; // #38 at 0x016E
Utf8 "println"; // #39 at 0x0184
Utf8 "(Ljava/lang/String;)V"; // #40 at 0x018E
Utf8 "Signature"; // #41 at 0x01A6
} // Constant Pool
0x0021; // access
#8;// this_cpx
#9;// super_cpx
[0] { // Interfaces
} // Interfaces
[1] { // fields
{ // Member at 0x01BC
0x0008; // access
#10; // name_cpx
#11; // sig_cpx
[1] { // Attributes
Attr(#41, 2) { // Signature at 0x01C4
#16;
} // end Signature
} // Attributes
} // Member
} // fields
[3] { // methods
{ // Member at 0x01CE
0x0001; // access
#12; // name_cpx
#13; // sig_cpx
[2] { // Attributes
Attr(#14, 29) { // Code at 0x01D6
1; // max_stack
1; // max_locals
Bytes[5]{
0x2AB70001B1;
};
[0] { // Traps
} // end Traps
[1] { // Attributes
Attr(#15, 6) { // LineNumberTable at 0x01ED
[1] { // LineNumberTable
0 1; // at 0x01F9
}
} // end LineNumberTable
} // Attributes
} // end Code
;
Attr(#41, 2) { // Signature at 0x01F9
#16;
} // end Signature
} // Attributes
} // Member
;
{ // Member at 0x0201
0x0009; // access
#16; // name_cpx
#17; // sig_cpx
[3] { // Attributes
Attr(#14, 38) { // Code at 0x0209
2; // max_stack
1; // max_locals
Bytes[10]{
0xB20002B20003B600;
0x04B1;
};
[0] { // Traps
} // end Traps
[1] { // Attributes
Attr(#15, 10) { // LineNumberTable at 0x0225
[2] { // LineNumberTable
0 6; // at 0x0231
9 7; // at 0x0235
}
} // end LineNumberTable
} // Attributes
} // end Code
;
Attr(#41, 2) { // Signature at 0x0235
#16;
} // end Signature
;
Attr(#18, 4) { // Exceptions at 0x023D
[1] { // Exceptions
#19; // at 0x0247
}
} // end Exceptions
} // Attributes
} // Member
;
{ // Member at 0x0247
0x0008; // access
#20; // name_cpx
#13; // sig_cpx
[1] { // Attributes
Attr(#14, 37) { // Code at 0x024F
3; // max_stack
0; // max_locals
Bytes[13]{
0xBB0005591206B700;
0x07B30003B1;
};
[0] { // Traps
} // end Traps
[1] { // Attributes
Attr(#15, 6) { // LineNumberTable at 0x026E
[1] { // LineNumberTable
0 3; // at 0x027A
}
} // end LineNumberTable
} // Attributes
} // end Code
} // Attributes
} // Member
} // methods
[2] { // Attributes
Attr(#21, 2) { // SourceFile at 0x027C
#22;
} // end SourceFile
;
Attr(#41, 2) { // Signature at 0x0284
#16;
} // end Signature
} // Attributes
} // end class OkaySigAttrs
|