Integrated: 8309420: com/sun/jdi/StepTest.java fails with virtual thread wrapper
Chris Plummer
cjplummer at openjdk.org
Wed Jun 7 18:06:48 UTC 2023
On Mon, 5 Jun 2023 04:03:57 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
> The test has two issues. The first is that it assume that once the VMStart event has arrived and one "step into" is done, it will be in the main method of the debuggee. Once there, it determines the debuggee class name by looking at the classtype of topmost frame. The problems is when using virtual threads, it is actually in TestScaffold.main() at this point, so the wrong class name is gleaned from the frame. To fix this the test just saves away the debuggee class name, which is passed to the test as the 4th argument.
>
> The other issue is that the test assumes once it gets to the debuggee go() method, there are only two frames on the stack. It's more like 16 when using virtual threads. The test needs to account for this by counting the number of frames when go() is entered rather than assuming it will be 2.
>
> Tested locally with and without the wrapper and by running tier5 svc tests.
This pull request has now been integrated.
Changeset: e3f3ac08
Author: Chris Plummer <cjplummer at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/e3f3ac0825e63ef5cec8e5f7e53ee0dbee263ac4
Stats: 21 lines in 2 files changed: 10 ins; 4 del; 7 mod
8309420: com/sun/jdi/StepTest.java fails with virtual thread wrapper
Reviewed-by: sspitsyn, amenkov
-------------
PR: https://git.openjdk.org/jdk/pull/14307
More information about the serviceability-dev
mailing list