On Mon, 12 May 2025 12:38:43 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

> One test that it failed on is trying to load a class where the number of 
> fields of a class is equal to 65535. It's a JCK test. Do you have JCK tests 
> or you could write this one?

You mean replicating the JCK testing logic into regular testsuite? I could do 
that, which test is that for reference? I wonder how that fails when the fields 
are only reordered, nothing is added.

However, while [class 
format](https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1)
 technically supports up to 65535 fields, I believe that we are also limited by 
the constant pool holding no more than 65535 entries, where some space would be 
occupied by the type field type, there's the dummy index 0 and there might be 
further records so we won't get as high. I think that normally `javac` does not 
de-duplicate the signature record, so this might require some handcrafting. 
Maybe the JCK test reuses some names to form a different combo (which could be 
valid from JVMS POV but not JLS?) to max it out at 65535 fields?

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

PR Comment: https://git.openjdk.org/jdk/pull/24847#issuecomment-2872968852

Reply via email to