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

David Holmes dholmes at openjdk.java.net
Wed Jun 15 06:33:46 UTC 2022


On Tue, 14 Jun 2022 08:33:05 GMT, Alan Bateman <alanb 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?
>
>> 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.

Thanks @AlanBateman !

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

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


More information about the serviceability-dev mailing list