RFR: 8343506: [s390x] multiple test failures with ubsan
Martin Doerr
mdoerr at openjdk.org
Tue Nov 5 10:07:35 UTC 2024
On Mon, 4 Nov 2024 20:49:39 GMT, Dean Long <dlong at openjdk.org> wrote:
>> This is trivial patch which fixes the error I am seeing on s390x, while running tier1 with ubsan enabled. Please see JBS for more details.
>
> src/hotspot/cpu/s390/s390.ad line 2550:
>
>> 2548: // Unsigned Integer Immediate: 9-bit
>> 2549: operand SSlenDW() %{
>> 2550: predicate(Immediate::is_uimm8((julong)n->get_long()-1));
>
> Suggestion:
>
> predicate(n->get_long() >= 1 && Immediate::is_uimm8((julong)n->get_long()-1));
I don't think this is necessary. Unsigned subtraction with wrap-around is not undefined behavior.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21864#discussion_r1829071884
More information about the hotspot-compiler-dev
mailing list