LW5 issue: InnerClasses attribute access member

Remi Forax forax at univ-mlv.fr
Thu Jan 12 09:44:37 UTC 2023


Hi all,
while writing civilizer [1], i stumble on a behavior of the VM which i think is a bug in the LW5 implementation.

The problem is that the VM trusts the "access" member (ACC_IDENTITY, ACC_VALUE, ACC_PRIMITIVE) of the InnerClasses but:
- the InnerClass attribute is an attribute for javac not for the VM (see section 4.7.6 of the VM spec) so the VM should not change its behavior depending on the content of that attribute
  (that's why NestHost/NestMembers are separate attributes from InnerClasses BTW).
- those information can be wrong because of separate compilations because javac includes InnerClasses info of inner classes it uses not only the one in the compilation unit.

regards,
Rémi

[1] https://github.com/forax/civilizer



More information about the valhalla-dev mailing list