This is a regression from the recent merge which changed an if into an assert: https://github.com/openjdk/valhalla/blame/828c729cdd5f937547f4a9034ce8d8f7aa119b6b/src/hotspot/share/opto/macro.cpp#L763
While building scalarized debug info, `create_scalarized_object_description()` calls `add_array_elems_to_safepoint()`, which recursively reconstructs flattened fields through `inline_type_from_mem()` -> `value_from_mem()` -> `value_from_alloc()`. That method cannot decompose an arbitrary oop initializer into scalar fields and deliberately returns `nullptr` which must propagate outward to abort scalar replacement: https://github.com/openjdk/valhalla/blob/828c729cdd5f937547f4a9034ce8d8f7aa119b6b/src/hotspot/share/opto/macro.cpp#L548-L550 The fix is to revert the code back to what it was before the merge. I can reliably reproduce this with `serviceability/jvmti/valhalla/Heapwalking/ValueHeapwalkingTest.java` and therefore did not add a targeted regression test. Thanks, Tobias --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - JDK-8389085 Changes: https://git.openjdk.org/valhalla/pull/2669/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2669&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8389085 Stats: 5 lines in 1 file changed: 3 ins; 0 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/2669.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2669/head:pull/2669 PR: https://git.openjdk.org/valhalla/pull/2669
