On Sun, 1 Nov 2026 20:50:32 GMT, jonghoonpark <[email protected]> wrote:
> When C2 scalar-replaces a Vector API object, its payload is recorded in debug > info as a `Location::vector`. SA's `Location.getType()` does not recognize > this type and throws "should not reach here" when it decodes such a location. > > The cause is that `vmStructs` does not export HotSpot's `Location::vector`, > and SA's `Location` has no corresponding type. > > ## Changes > - `vmStructs.cpp`: export `Location::vector` > - SA `Location.java`: add `Type.VECTOR` and handle it in `getType()`, > `Type.getValue()` and `printOn()` > - `HTMLGenerator.java`: handle `VECTOR` in `locationAsString()` > > ## Testing > - New test `serviceability/sa/TestVectorDebugInfoDecode.java`: runs a > `LingeredApp` that waits with a C2-compiled frame on its stack, holding a > live `IntVector` across a call. The test attaches SA and checks that a > `Location` of type `vector` is decoded from that frame's scope objects. > - Without the fix, the test fails: > - With none of the changes, it does not compile because > `Location.Type.VECTOR` does not exist. > - With only the `getType()` branch removed, it fails with the same > "should not reach here" as in the bug report. > - `tier1` tests pass. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Overall this looks good but I prefer the more verbose output of the original reproducer. Can you include some of that output with the test run? Also, shouldn't the test assert that it always finds the Location.Type.VECTOR type (and you might want to note in the test output when it is found). ------------- PR Review: https://git.openjdk.org/jdk/pull/33665#pullrequestreview-5739088901
