RFR: 8359200: Memory corruption in MStack::push
Tobias Hartmann
thartmann at openjdk.org
Thu Jun 12 11:45:33 UTC 2025
On Wed, 11 Jun 2025 12:57:47 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
> So, I suppose one shouldn't use grow directly, and you indeed changed Block_Array::map this way. But what about derived classes? grow is only protected in most (all?) of these classes, so some derived classes could call it. Is it worth making it private? Or maybe calling grow directly is not so wrong?
I think it's still completely reasonable to directly call `Node_Array::grow(uint i)`. For example, when you know that you need a specific amount of storage and want to avoid incrementally growing the array when adding elements. So I'd say it's fine to leave `grow` as-is.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25751#issuecomment-2966328874
More information about the hotspot-dev
mailing list