Hi Richard,
On 3/09/2020 12:37 am, Reingruber, Richard wrote:
Hi,
please help review this fix for a TESTBUG in
serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java
Webrev: http://cr.openjdk.java.net/~rrich/webrevs/8252593/webrev.0/
Bug: https://bugs.openjdk.java.net/browse/JDK-8252593
With this change the JVMTI test agent silently accepts
JVMTI_ERROR_INVALID_SLOT as result of a JVMTI GetLocalObject() call.
The target frame of the call varies because the target thread is running. In
rare cases it might not be one of the many frames of
GetLocalWithoutSuspendTest.recursiveMethod() as intended but the frame
of a static method without parameters which the target thread might call after
returning from all the recursive calls. This would result in JVMTI_ERROR_INVALID_SLOT.
Anyway JVMTI_ERROR_INVALID_SLOT has to be expected and should be silently
ignored.
Furthermore I have corrected the type of the parameter waitCycles of
Java_GetLocalWithoutSuspendTest_notifyAgentToGetLocal() to be jint. Now it
matches the declaration in GetLocalWithoutSuspendTest.java.
Hmmm ... could this mean that the attempt to read a 64-bit value where
only a 32-bit value had actually been pushed as a parameter, could
result in reading a junk value that sometimes caused the loop to exit
immediately?
David
Thanks, Richard.