8167333: Invalid source path info might be used when creating ClassFileStream after CFLH transforms a shared classes in some cases

Use NULL as 'source' when there is no valid source path info.

Reviewed-by: iklam, dholmes, dsamersoff
This commit is contained in:
Jiangli Zhou 2016-10-10 20:50:33 -04:00
parent da45a98b46
commit 4d9fc9541d
3 changed files with 7 additions and 2 deletions

View file

@ -74,7 +74,7 @@ instanceKlassHandle KlassFactory::check_shared_class_file_load_hook(
(SharedClassPathEntry*)FileMapInfo::shared_classpath(path_index);
ClassFileStream* stream = new ClassFileStream(ptr,
end_ptr - ptr,
ent->_name,
ent == NULL ? NULL : ent->_name,
ClassFileStream::verify);
ClassFileParser parser(stream,
class_name,