On Thu, 24 Oct 2024 21:20:57 GMT, Jiangli Zhou <jian...@openjdk.org> wrote:
> In that sense, I think we don't have a risk of potentially with `used_Integer > > IntegerCache.high`. The idea described in Ioi's comment above (also brought > up by Aleksey Shipilev separately during premain meeting) could be sufficient. Phew, thanks! I thought I was misunderstanding some fundamental thing here :) I think `IntegerCache` interaction with CDS archive deserves a fix regardless. Have you filed the bug for it, @jianglizhou? AFAICS, if we fix `IntegerCache` <-> CDS interaction, we solve this particular problem as well. I am still non-committal about this special fix. We can still do it, but then this patch effectively changes relying on boxing identity behavior over `Integer`s to relying on interning behavior over `Strings`, right? If we want to be 100% safe, shouldn't `==` checks be rewritten to `equals`? And when we do so, would that affect startup in any meaningful way? The names of the fields should probably be changed from `_INDEX` to something else, like `_NAME`? ------------- PR Comment: https://git.openjdk.org/jdk/pull/21672#issuecomment-2437465648