Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8204394 | 11.0.1 | Calvin Cheung | P4 | Resolved | Fixed | team |
There's the following assert in ClassLoader::update_module_path_entry_list() for making sure a module path exists.
assert(ret == 0, "module path must exist");
For a very long module path with length > 2K, the path exists but os::stat() returns ENAMETOOLONG error on linux.
int os::stat(const char *path, struct stat *sbuf) {
char pathbuf[MAX_PATH];
if (strlen(path) > MAX_PATH - 1) {
errno = ENAMETOOLONG; <<<<< here
return -1;
}
os::native_path(strcpy(pathbuf, path));
return ::stat(pathbuf, sbuf);
}
The assert should be replaced with an error message and the CDS dumping should be aborted.
assert(ret == 0, "module path must exist");
For a very long module path with length > 2K, the path exists but os::stat() returns ENAMETOOLONG error on linux.
int os::stat(const char *path, struct stat *sbuf) {
char pathbuf[MAX_PATH];
if (strlen(path) > MAX_PATH - 1) {
errno = ENAMETOOLONG; <<<<< here
return -1;
}
os::native_path(strcpy(pathbuf, path));
return ::stat(pathbuf, sbuf);
}
The assert should be replaced with an error message and the CDS dumping should be aborted.
- backported by
-
JDK-8204394 assert in ClassLoader::update_module_path_entry_list() could have incorrect message
-
- Resolved
-