RFR: 8367325: [s390x] build failure due to JDK-8361376
Dean Long
dlong at openjdk.org
Thu Sep 11 20:20:25 UTC 2025
On Thu, 11 Sep 2025 09:51:29 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:
> Fixes the SIGLL caused after [JDK-8361376](https://bugs.openjdk.org/browse/JDK-8361376).
>
> Issue was with `cs` instruction, which requires the address to be aligned. And after this change address at which operating was not aligned.
>
> Wisdom from Principle of Z Operations:
>
> Sytax: CS R<sub>1</sub>,R<sub>3</sub>,D<sub>2</sub>(B<sub>2</sub>)
>
> Sytax: CSY R<sub>1</sub>,R<sub>3</sub>,D<sub>2</sub>(B<sub>2</sub>)
>
> `
> The second operand of COMPARE AND SWAP (CS, CSY) must be designated on a word boundary.
> `
>
>
>
> => 0x3fffc3149ba <_ZN17BarrierSetNMethod15set_guard_valueEP7nmethodii+266>: cs %r1,%r4,0(%r3)
> (gdb) i r r3
> r3 0x3ffe500017a 4397593526650
> (gdb) p ($r3 % 8)
> $5 = 2
> (gdb) si
>
> Thread 16 "C1 CompilerThre" received signal SIGILL, Illegal instruction.
> NativeMethodBarrier::set_guard_value (bit_mask=2147483647, value=1, this=0x3ffe5000166)
> at /home/amit/jdk/src/hotspot/cpu/s390/gc/shared/barrierSetNMethod_s390.cpp:74
> 74 if (v == old_value) break;
src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp line 174:
> 172: void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm) {
> 173: BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
> 174: __ align(8); // must align the following block which requires atomic updates
Thanks for fixing this. Rather than aligning at the start, wouldn't it be more maintainable to do
`__ align(4, offset() + 2);`
before the z_cfi?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27213#discussion_r2342239302
More information about the hotspot-dev
mailing list