On Wed, 3 Jun 2026 05:37:16 GMT, David Holmes <[email protected]> wrote:
>>> I don't think the assertions suffice. If something like `SetObjectField` is
>>> called from an attached thread, but with no Java frame on the stack, then
>>> we will have a null last-frame and thus vframe.
>>
>>
>> It this case the event is not posted. because of check in the
>> oop JvmtiExport::jni_GetField_probe(JavaThread *thread, jobject jobj, oop
>> obj,
>> Klass* klass, jfieldID fieldID, bool
>> is_static) {
>> if (*((int *)get_field_access_count_addr()) > 0 &&
>> thread->has_last_Java_frame()) {
>>
>>>>>>>>>> Do not get here
>>
>> // At least one field access watch is set so we have more work to do.
>> post_field_access_by_jni(thread, obj, klass, fieldID, is_static);
>> // event posting can block so refetch oop if we were passed a jobj
>> if (jobj != nullptr) return JNIHandles::resolve_non_null(jobj);
>> }
>> return obj;
>> }
>>
>>
>> It might separate issue, the events should be sent but with null method, I
>> suppose.
>
>> It might separate issue, the events should be sent but with null method, I
>> suppose.
>
> Hmmm, interesting. Yes this seems like an oversight to me, but I agree it is
> a separate issue.
>
> In that case the asserts are fine.
@dholmes-ora, @sspitsyn Thank you for review.
I filed https://bugs.openjdk.org/browse/JDK-8385931 for attached thread issues.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/31352#issuecomment-4615365485