[lworld] RFR: 8376461: [lworld] serviceability/jvmti/valhalla/HeapDump/HeapDump.java fails More than 1 instances of 'TestClass' found
Alex Menkov
amenkov at openjdk.org
Fri Feb 13 21:26:08 UTC 2026
TestClass is a container class which contains a number of value object, main test process and target VM create TestClass object, so the test can compare the object and its representation in the target VM heap dump.
After JDK-8376135 `new TestClass()` may cause unreachable TestClass instance is still in the heap, so it appears in the heap dump too.
The simplest solution is to make TestClass non-value class (actual tested value classes are nested classes of TestClass)
-------------
Commit messages:
- fix
Changes: https://git.openjdk.org/valhalla/pull/2109/files
Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2109&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8376461
Stats: 2 lines in 2 files changed: 0 ins; 1 del; 1 mod
Patch: https://git.openjdk.org/valhalla/pull/2109.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2109/head:pull/2109
PR: https://git.openjdk.org/valhalla/pull/2109
More information about the valhalla-dev
mailing list