added manifest adding: HelloWorld.class(in = 425) (out= 288)(deflated 32%) ---------------------------------------------------------------------- Test case 1A: bad dynamic archive header, single archive ---------------------------------------------------------------------- + /home/iklam/jdk/bld/nep/images/jdk/bin/java -Xshare:auto -Xlog:cds -cp HelloWorld.jar -XX:SharedArchiveFile=xxx.jsa HelloWorld [0.005s][info][cds] trying to map xxx.jsa [0.005s][info][cds] Opened archive xxx.jsa. [0.005s][info][cds] _magic expected: 0xf00baba2 [0.005s][info][cds] actual: 0x00000000 [0.005s][info][cds] UseSharedSpaces: The shared archive file has a bad magic number. [0.005s][info][cds] UseSharedSpaces: Unable to map shared spaces Hello World ---------------------------------------------------------------------- Test case 1B: bad checksum, single archive ---------------------------------------------------------------------- + /home/iklam/jdk/bld/nep/images/jdk/bin/java -Xshare:auto -Xlog:cds -cp HelloWorld.jar -XX:SharedArchiveFile=xxz.jsa -XX:+VerifySharedSpaces HelloWorld [0.006s][info][cds] trying to map /jdk2/bld/nep/images/jdk/lib/server/classes.jsa [0.006s][info][cds] Opened archive /jdk2/bld/nep/images/jdk/lib/server/classes.jsa. [0.006s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1 [0.006s][info][cds] Core region alignment: 4096 [0.006s][info][cds] trying to map xxz.jsa [0.006s][info][cds] Opened archive xxz.jsa. [0.006s][info][cds] _crc expected: 1095895863 [0.006s][info][cds] actual: 2103997013 [0.006s][info][cds] UseSharedSpaces: Header checksum verification failed. [0.006s][info][cds] Reserved archive_space_rs [0x0000000800000000 - 0x0000000800c00000] (12582912) bytes [0.006s][info][cds] Reserved class_space_rs [0x0000000800c00000 - 0x0000000840c00000] (1073741824) bytes [0.011s][info][cds] Mapped static region #0 at base 0x0000000800000000 top 0x0000000800439000 (ReadWrite) [0.019s][info][cds] Mapped static region #1 at base 0x0000000800439000 top 0x0000000800bc1000 (ReadOnly) [0.019s][info][cds] CDS archive was created with max heap size = 128M, and the following configuration: [0.019s][info][cds] narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 0 [0.019s][info][cds] narrow_oop_mode = 0, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 0 [0.019s][info][cds] heap range = [0x00000000f8000000 - 0x0000000100000000] [0.019s][info][cds] The current max heap size = 16096M, HeapRegion::GrainBytes = 8388608 [0.019s][info][cds] narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 0 [0.019s][info][cds] narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3 [0.019s][info][cds] heap range = [0x0000000412000000 - 0x0000000800000000] [0.019s][info][cds] CDS heap data needs to be relocated because the archive was created with an incompatible oop encoding mode. [0.019s][info][cds] CDS heap data relocation delta = 30064771072 bytes [0.019s][info][cds] CDS heap data needs to be relocated lower by a further 7340032 bytes to 30057431040 to be aligned with HeapRegion::GrainBytes [0.019s][info][cds] Trying to map heap data: region[3] at 0x00000007ff800000, size = 483328 bytes [0.020s][info][cds] Trying to map heap data: region[5] at 0x00000007ff700000, size = 479232 bytes [0.021s][info][cds] optimized module handling: enabled [0.021s][info][cds] full module graph: enabled [0.021s][info][cds] use_full_module_graph = true; java.base = 0x0000000800432c18 [0.021s][info][cds] patching heap embedded pointers [0.021s][info][cds] Mapped static region #2 at base 0x00007ff5d7160000 top 0x00007ff5d7197000 (Bitmap) [0.022s][info][cds] Unmapping region #2 at base 0x00007ff5d7160000 (Bitmap) Hello World ---------------------------------------------------------------------- Test case 2A: bad dynamic archive header, two archives ---------------------------------------------------------------------- + /home/iklam/jdk/bld/nep/images/jdk/bin/java -Xshare:auto -Xlog:cds -cp HelloWorld.jar -XX:SharedArchiveFile=base.jsa:yyy.jsa HelloWorld Error occurred during initialization of VM Not a top shared archive: yyy.jsa ---------------------------------------------------------------------- Test case 2B: bad dynamic archive header, two archives ---------------------------------------------------------------------- + /home/iklam/jdk/bld/nep/images/jdk/bin/java -Xshare:auto -Xlog:cds -cp HelloWorld.jar -XX:SharedArchiveFile=base.jsa:yyz.jsa -XX:+VerifySharedSpaces HelloWorld [0.005s][info][cds] trying to map base.jsa [0.005s][info][cds] Opened archive base.jsa. [0.005s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1 [0.005s][info][cds] Core region alignment: 4096 [0.005s][info][cds] trying to map yyz.jsa [0.005s][info][cds] Opened archive yyz.jsa. [0.005s][info][cds] _crc expected: 1096066706 [0.005s][info][cds] actual: 889109997 [0.006s][info][cds] UseSharedSpaces: Header checksum verification failed. [0.006s][info][cds] Reserved archive_space_rs [0x0000000800000000 - 0x0000000800c00000] (12582912) bytes [0.006s][info][cds] Reserved class_space_rs [0x0000000800c00000 - 0x0000000840c00000] (1073741824) bytes [0.010s][info][cds] Mapped static region #0 at base 0x0000000800000000 top 0x000000080043a000 (ReadWrite) [0.019s][info][cds] Mapped static region #1 at base 0x000000080043a000 top 0x0000000800bc3000 (ReadOnly) [0.019s][info][cds] CDS archive was created with max heap size = 16096M, and the following configuration: [0.019s][info][cds] narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 0 [0.019s][info][cds] narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3 [0.019s][info][cds] heap range = [0x00000003d2000000 - 0x00000007c0000000] [0.019s][info][cds] The current max heap size = 16096M, HeapRegion::GrainBytes = 8388608 [0.019s][info][cds] narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 0 [0.019s][info][cds] narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3 [0.019s][info][cds] heap range = [0x0000000412000000 - 0x0000000800000000] [0.019s][info][cds] CDS heap data needs to be relocated to the end of the runtime heap to reduce fragmentation [0.019s][info][cds] CDS heap data relocation delta = 1073741824 bytes [0.019s][info][cds] Trying to map heap data: region[3] at 0x00000007ff800000, size = 483328 bytes [0.020s][info][cds] Trying to map heap data: region[5] at 0x00000007ff000000, size = 479232 bytes [0.020s][info][cds] optimized module handling: enabled [0.020s][info][cds] full module graph: enabled [0.020s][info][cds] use_full_module_graph = true; java.base = 0x0000000800433558 [0.020s][info][cds] patching heap embedded pointers [0.021s][info][cds] Mapped static region #2 at base 0x00007fbcc0022000 top 0x00007fbcc0059000 (Bitmap) [0.021s][info][cds] Unmapping region #2 at base 0x00007fbcc0022000 (Bitmap) Hello World