On Mon, 27 Jul 2026 08:13:51 GMT, Tobias Hartmann <[email protected]> wrote:
> 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). This pull request has now been integrated. Changeset: f1812863 Author: Tobias Hartmann <[email protected]> URL: https://git.openjdk.org/valhalla/commit/f181286389fad995be1e71de60f30d14eb1c9122 Stats: 5 lines in 1 file changed: 3 ins; 0 del; 2 mod 8389085: [lworld] C2: assert(field_value != nullptr) failed in PhaseMacroExpand::inline_type_from_mem Reviewed-by: mhaessig, chagedorn ------------- PR: https://git.openjdk.org/valhalla/pull/2669
