RFR: 8167333: Invalid source path info might be used when creating ClassFileStream after CFLH transforms a shared classes in some cases
Dmitry Samersoff
dmitry.samersoff at oracle.com
Fri Oct 7 08:36:57 UTC 2016
Jiangli,
I see couple of places in hotspot where result of
FileMapInfo::shared_classpath() is de-referenced without additional null
check.
Could you insert check/assert/comments as appropriate to these places?
-Dmitry
On 2016-10-07 07:39, Jiangli Zhou wrote:
> Hi,
>
> Please review the following fix for JDK-8167333
> <https://bugs.openjdk.java.net/browse/JDK-8167333>:
>
> webrev: http://cr.openjdk.java.net/~jiangli/8167333/webrev.00/
> <http://cr.openjdk.java.net/~jiangli/8167333/webrev.00/>
>
> When a shared class is transformed by a JVMTI agent during initial
> loading (via CFLH), the VM creates a new ClassFileStream using the
> transformed class data. The source path info from the class’
> associated SharedClassPathEntry is passed as the ‘source’ argument to
> ClassFileStream. However, some shared classes may not have an
> associated SharedClassPathEntry and the class_path_index is -1. The
> VM needs to detect such case and not passing an invalid source path
> info.
>
> Tested with all existing class data sharing tests.
>
> Thanks, Jiangli
>
--
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.
More information about the hotspot-runtime-dev
mailing list