RFR: 8367325: [s390x] build failure due to JDK-8361376 [v5]
Martin Doerr
mdoerr at openjdk.org
Thu Sep 18 12:29:38 UTC 2025
On Thu, 18 Sep 2025 12:09:31 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;
>
> Amit Kumar has updated the pull request incrementally with one additional commit since the last revision:
>
> update
Looks correct to me. I only have some minor comments.
src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.hpp line 75:
> 73: // first 2 bytes are for cfi instruction opcode and next 4 bytes will be the value/data to be patched,
> 74: // so we are skipping first 2 bytes and returning the address of value/data field
> 75: static const int OFFSET_TO_PATCHABLE_DATA = 6 + 6 + 6 + 2; // iihf(6) + iilf(6) + lg(6) + CFI_OPCODE(2)
`OFFSET_TO_PATCHABLE_DATA_INSTRUCTION` could be used, here.
src/hotspot/cpu/s390/gc/shared/barrierSetNMethod_s390.cpp line 54:
> 52:
> 53: public:
> 54: static const int BARRIER_TOTAL_LENGTH = BarrierSetAssembler::BARRIER_TOTAL_LENGTH;
Is it necessary to replicate it?
src/hotspot/cpu/s390/gc/shared/barrierSetNMethod_s390.cpp line 98:
> 96: offset += Assembler::instr_len(&start[offset]);
> 97:
> 98: // it will be assignment operation, So it doesn't matter what value is already present in instr
I don't understand what you mean by "it will be assignment operation".
-------------
Marked as reviewed by mdoerr (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/27213#pullrequestreview-3239335399
PR Review Comment: https://git.openjdk.org/jdk/pull/27213#discussion_r2358967293
PR Review Comment: https://git.openjdk.org/jdk/pull/27213#discussion_r2358976887
PR Review Comment: https://git.openjdk.org/jdk/pull/27213#discussion_r2358979384
More information about the hotspot-dev
mailing list