On Tue, 15 Sep 2020 13:34:21 GMT, Richard Reingruber <rr...@openjdk.org> wrote:
> I would like to take a different approach now for fixing this by making sure > the JVMTI GetLocalObject() call refers to > one of the recursiveMethod frames on stack. After a closer look I don't think this is possible. The GetLocalObject() call should target a frame deep in the stack to prolongue the stackwalk. So the depth D will be large. This means the target thread has to wait in a frame that has more than D caller frames to make sure at D is a frame of recursiveMethod. This will make the test less sensitive as a regression test because if there is an unsafe stackwalk to find the target frame for the GetLocalObject() at depth D it will likely still succeed, because the target thread does not return from all the recursive activations of recursiveMethod. So I'm still proposing the original fix which silently accepts JVMTI_ERROR_INVALID_SLOT. ------------- PR: https://git.openjdk.java.net/jdk/pull/142