RFR: 8299213: Bad cast in GrowableArrayWithAllocator<>::grow
Kim Barrett
kbarrett at openjdk.org
Mon Jan 16 18:00:12 UTC 2023
On Mon, 16 Jan 2023 09:11:19 GMT, Afshin Zafari <duke at openjdk.org> wrote:
> ### Description
> The grow size was wrongfully casted from `int` to `uint32`.
>
> ### Patch
> The casting is removed.
>
> ### Tests
> Local: **gtest:GrowableArrays***
> mach5 tier1-5
Looks good.
src/hotspot/share/utilities/growableArray.hpp line 517:
> 515: void GrowableArrayWithAllocator<E, Derived>::grow(int j) {
> 516: // grow the array by increasing _capacity to the first power of two larger than the size we need
> 517: expand_to(next_power_of_2(j));
I thought I'd gotten rid of this cast as part of JDK-8295808, but obviously not.
-------------
Marked as reviewed by kbarrett (Reviewer).
PR: https://git.openjdk.org/jdk/pull/12007
More information about the hotspot-dev
mailing list