RFR: Value types consistency checks
karen.kinnear at oracle.com
Wed Jul 11 16:05:07 UTC 2018
Frederic (and Harold who offered to push this for the JIT folks to build on):
The code looks good - ship it.
Harold offered to look into the EnableValhalla issues with classfileparser/verifier as well.
I am walking code paths to see if we need to add any additional checks, but that could be
And the test itself could be a follow-on as well.
> On Jul 6, 2018, at 4:26 PM, Frederic Parain <frederic.parain at oracle.com> wrote:
> Thank you for the review.
> Here’s a updated version of the patch:
> I’ve added support for declarer/overrider checks, fixed a few bugs and
> added asserts to check “L” in array signatures.
> I’ve tried to generate ValueTypes attribute meta-data only when
> EnableValhalla was set to true, unfortunately, it causes some
> failures with verifier tests. I’ll look at his in more details after
> my vacations.
> Testing is tricky, I’m currently using some Java source files
> and a script to test mismatch scenarios, but in their current
> form, they cannot be integrated with jtreg. I’ve attached the
> test files to this mail if you want to use them.
>> On Jun 29, 2018, at 16:51, Karen Kinnear <KAREN.KINNEAR at ORACLE.COM> wrote:
>> Many thanks for doing this and doing this so cleanly.
>> Couple of questions:
>> 1. instanceKlass.cpp:
>> if (has_value_types_attribute) line 632 — does this want to also be if EnableValhalla?
>> my understanding is that extra attributes are ignored so classFileParser should just allow them
>> 2. instanceKlass.cpp check_symbol/signature_for_value_types_consistency
>> In the array part, did you want to check for “L” or is that just me being over cautious?
>> 3. klassVtable.cpp
>> In update_inherited_vtable when you override a method (this is the vtable part),
>> there is a if (check constraints & !targer_method()->is_overpass() - which needs
>> a declarer/overridder match check. Also in initialize_itable_for_interface under if (check constraints)
>> 4. Thank you for adding the ValueTypes attributes in the class files for the tests.
>> Did you add any tests that fail consistency?
>> many thanks,
>>> On Jun 28, 2018, at 4:38 PM, Frederic Parain <frederic.parain at oracle.com> wrote:
>>> Please review this changeset implementing consistency checks based on the
>>> ValueTypes attribute. These checks ensure that the assumptions a class has
>>> about value types, as encoded in its ValueTypes attribute, match the
>>> reality, or the assumptions of another class it links to.
>>> The details of the consistency checks have been summarized by Karen in
>>> this document:
>>> If the implementation doesn’t match the document, this is likely to be bug,
>>> so please, report it.
>>> Some tests using the Bytecodes API have been updated to include a
>>> ValueTypes attribute in the class files they generate (thanks to Srikanth
>>> for adding this feature to the Bytecodes API).
>>> Thank you,
More information about the valhalla-dev