RFR: 8328934: Assert that ABS input and output are legal [v2]
Aleksey Shipilev
shade at openjdk.org
Fri Apr 12 09:21:55 UTC 2024
On Fri, 12 Apr 2024 09:09:12 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Need explicit include as well
>
> src/hotspot/share/utilities/globalDefinitions.hpp line 1110:
>
>> 1108:
>> 1109: template<class T> inline T ABS(T x) {
>> 1110: assert(x != std::numeric_limits<T>::min(), "ABS: argument should not allow overflow");
>
> Shouldn't this check for an integral type? This code makes no sense for floating-point types.
Yeah, true. Amended in new commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18751#discussion_r1562286178
More information about the hotspot-dev
mailing list