RFR: 8288324: Loom: Uninitialized JvmtiEnvs in VM_Virtual* ops

Alan Bateman alanb at openjdk.java.net
Tue Jun 14 08:36:58 UTC 2022


On Tue, 14 Jun 2022 07:42:08 GMT, David Holmes <dholmes at openjdk.org> wrote:

> I'm confused by the comments above. The code failed to initialize the `_env` member but then makes calls via this uninitialized pointer! Surely we should have crashed?

JvmtiEnvBase::get_frame_count is static and I think `((JvmtiEnvBase*)_env)->get_frame_count(_vthread_h(), _count_ptr);` is compiled to just call it and the not-initialised _env is not used.

-------------

PR: https://git.openjdk.org/jdk19/pull/10


More information about the serviceability-dev mailing list