diff --git a/src/hotspot/share/utilities/powerOfTwo.hpp b/src/hotspot/share/utilities/powerOfTwo.hpp index a98b81e8037..6c000137471 100644 --- a/src/hotspot/share/utilities/powerOfTwo.hpp +++ b/src/hotspot/share/utilities/powerOfTwo.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -103,7 +103,8 @@ inline T round_down_power_of_2(T value) { template::value)> inline T round_up_power_of_2(T value) { assert(value > 0, "Invalid value"); - assert(value <= max_power_of_2(), "Overflow"); + assert(value <= max_power_of_2(), "Overflowing maximum allowed power of two with " UINT64_FORMAT_X, + static_cast(value)); if (is_power_of_2(value)) { return value; }