From: Vladimir Petko Date: Mon, 6 Jul 2026 21:58:32 +0000 (+1200) Subject: [PATCH] fix(TemplateTable): use float operations for fast_xaccess() and fstore()... X-Git-Tag: archive/raspbian/17.0.20+8-1_deb12u1+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=38ea351529883bd2626ddac2e83aee9b152e3748;p=openjdk-17.git [PATCH] fix(TemplateTable): use float operations for fast_xaccess() and fstore(). This PR changes fstore and fast_xaccess operations to generate float (4 byte) instructions on S390x. This resolves out of bound read and writes on float that causes a segmentation fault with Compact Object Headers enabled. From b9ea4636bea0f6264b2c602e4203e8e604d8da6e Mon Sep 17 00:00:00 2001 Bug: https://bugs.openjdk.org/browse/JDK-8387580 Origin: upstream, https://github.com/openjdk/jdk/commit/978dfecb6545166aee93a8e68c9c82535b0cb3e2 Gbp-Pq: Name jdk-8387580.diff --- diff --git a/src/hotspot/cpu/s390/templateTable_s390.cpp b/src/hotspot/cpu/s390/templateTable_s390.cpp index 38ccefe6a..ba4b47d6a 100644 --- a/src/hotspot/cpu/s390/templateTable_s390.cpp +++ b/src/hotspot/cpu/s390/templateTable_s390.cpp @@ -1042,7 +1042,7 @@ void TemplateTable::lstore() { void TemplateTable::fstore() { transition(ftos, vtos); locals_index(Z_R1_scratch); - __ freg2mem_opt(Z_ftos, faddress(_masm, Z_R1_scratch)); + __ freg2mem_opt(Z_ftos, faddress(_masm, Z_R1_scratch), false); } void TemplateTable::dstore() { @@ -3360,7 +3360,7 @@ void TemplateTable::fast_xaccess(TosState state) { __ verify_oop(Z_tos); break; case ftos: - __ mem2freg_opt(Z_ftos, Address(receiver, index)); + __ mem2freg_opt(Z_ftos, Address(receiver, index), false); break; default: ShouldNotReachHere();