-
Bug
-
Resolution: Fixed
-
P3
-
14, 15
-
b04
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8250151 | 15.0.2 | Calvin Cheung | P3 | Resolved | Fixed | b01 |
JDK-8250450 | 15.0.1 | Calvin Cheung | P3 | Resolved | Fixed | b03 |
JDK-8248998 | 15 | Calvin Cheung | P3 | Resolved | Fixed | b31 |
If the effective runtime classpath is shorter than the one during dump time, the rp_array could be indexed out of bound in FileMapInfo::check_paths.
For example:
dump time -cp: jar1:jar2
run time -cp: jar1:jarX
where jarX doesn't exist.
It will fail the following assert during runtime:
# Internal Error (/ws/jdk/open/src/hotspot/share/utilities/growableArray.hpp:231), pid=6988, tid=6991
# assert(0 <= i && i < _len) failed: illegal index
Stack: [0x00007fd8be8c6000,0x00007fd8be9c7000], sp=0x00007fd8be9c55d0, free space=1021k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x6f0e95] GrowableArray<char const*>::at(int)+0x2b
V [libjvm.so+0x81ab15] FileMapInfo::check_paths(int, int, GrowableArray<char const*>*)+0x63
V [libjvm.so+0x81ae23] FileMapInfo::validate_app_class_paths(int)+0x133
V [libjvm.so+0x81b420] FileMapInfo::validate_shared_path_table()+0x472
V [libjvm.so+0xdd723d] MetaspaceShared::map_archive(FileMapInfo*, char*, ReservedSpace)+0x137
V [libjvm.so+0xdd6418] MetaspaceShared::map_archives(FileMapInfo*, FileMapInfo*, bool)+0x4b2
V [libjvm.so+0xdd5c48] MetaspaceShared::initialize_runtime_shared_and_meta_spaces()+0x90
V [libjvm.so+0xdcc616] Metaspace::global_initialize()+0x48
V [libjvm.so+0x10a80f2] universe_init()+0xb0
V [libjvm.so+0x990bae] init_globals()+0x3d
For example:
dump time -cp: jar1:jar2
run time -cp: jar1:jarX
where jarX doesn't exist.
It will fail the following assert during runtime:
# Internal Error (/ws/jdk/open/src/hotspot/share/utilities/growableArray.hpp:231), pid=6988, tid=6991
# assert(0 <= i && i < _len) failed: illegal index
Stack: [0x00007fd8be8c6000,0x00007fd8be9c7000], sp=0x00007fd8be9c55d0, free space=1021k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x6f0e95] GrowableArray<char const*>::at(int)+0x2b
V [libjvm.so+0x81ab15] FileMapInfo::check_paths(int, int, GrowableArray<char const*>*)+0x63
V [libjvm.so+0x81ae23] FileMapInfo::validate_app_class_paths(int)+0x133
V [libjvm.so+0x81b420] FileMapInfo::validate_shared_path_table()+0x472
V [libjvm.so+0xdd723d] MetaspaceShared::map_archive(FileMapInfo*, char*, ReservedSpace)+0x137
V [libjvm.so+0xdd6418] MetaspaceShared::map_archives(FileMapInfo*, FileMapInfo*, bool)+0x4b2
V [libjvm.so+0xdd5c48] MetaspaceShared::initialize_runtime_shared_and_meta_spaces()+0x90
V [libjvm.so+0xdcc616] Metaspace::global_initialize()+0x48
V [libjvm.so+0x10a80f2] universe_init()+0xb0
V [libjvm.so+0x990bae] init_globals()+0x3d
- backported by
-
JDK-8248998 array index out of bound in FileMapInfo::check_paths
- Resolved
-
JDK-8250151 array index out of bound in FileMapInfo::check_paths
- Resolved
-
JDK-8250450 array index out of bound in FileMapInfo::check_paths
- Resolved