Integrated: 8300981: Build failure on 32-bit platforms after JDK-8281213

Jie Fu jiefu at openjdk.org
Tue Jan 24 23:50:10 UTC 2023


On Tue, 24 Jan 2023 11:03:15 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> Hi all,
> 
> Build failure was observed on x86_32 with `-Werror=type-limits` after JDK-8281213.
> 
> Since the asserts (L79 & L80) are always true on 32-bit platforms, it might be better to only enable them on 64-bit platforms.
> 
>  76   int64_t diff_in_current_scale(size_t s1, size_t s2) const {
>  77     assert(_scale != 0, "wrong scale");
>  78
>  79     assert(s1 < INT64_MAX, "exceeded possible memory limits");
>  80     assert(s2 < INT64_MAX, "exceeded possible memory limits");
>  81
>  82     bool is_negative = false;
>  83     if (s1 < s2) {
>  84       is_negative = true;
>  85       swap(s1, s2);
>  86     }
> 
> 
> Thanks.
> Best regards,
> Jie

This pull request has now been integrated.

Changeset: 13394615
Author:    Jie Fu <jiefu at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/133946159c699afa2748b41271c15c5a7ec5bc53
Stats:     2 lines in 1 file changed: 2 ins; 0 del; 0 mod

8300981: Build failure on 32-bit platforms after JDK-8281213

Reviewed-by: coleenp

-------------

PR: https://git.openjdk.org/jdk/pull/12165


More information about the hotspot-runtime-dev mailing list