On Tue, 10 Sep 2024 12:19:32 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

>> This is tricky. We are already deep in initialization and have done a couple 
>> of decisions based on +UseCompressedClassPointers (e.g. CDS setup). I 
>> *think* we could still go with -UseCCP, but I wonder whether this is wise. 
>> 
>> Note that this error is not new. In the old code, we simply asserted. That 
>> left us with UB in release builds, which remains unresolved. I simply made 
>> the error explicit in release too.
>
> Ok, in this case, that's fine if we already asserted.  A fatal error is 
> better.

Actually, a lot of the old code had dusty side corners that were UB. Making 
narrowKlass smaller than 32bit exposed a lot of them, and a lot of the changes 
in and around CompressedKlassPointers are about cleanly making explicit what 
before had been implicit or just broken (e.g. a clear distinction between 
encoding range and Klass range, and a clear handling of narrowKlass bit width 
as a runtime value).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1758522844

Reply via email to