I'm guessing Graal creates Constant boxes of the individual fields and not of the test objects?  If so, can't we fix the matching so that it checks that all fields of an object match?  I guess that would mean moving the "expected" and "found" counts up from fields[] to objects_info[].

dl

On 11/28/18 1:13 PM, Igor Veresov wrote:
When doing heap iteration with JVMTI the way the object identity is tracked is 
by tagging. This particular test checks if it  can observe an untagged object. 
Since there is no way to truly track the identity of an untagged object the 
test validates the identity by checking the value of the fields of such object. 
When being compiled with Graal there are objects produced (such as Constant 
boxes) that have field values that are equal to the expected values for the 
fields in UntaggedClass. During the subsequent heap iteration these objects are 
reported to the test and are treated as if they were instances of UntaggedClass.

The fix is to relax the test requirement and allow (for the untagged case) the 
number of the object found during iteration to be more than expected.

Webrev: http://cr.openjdk.java.net/~iveresov/8193577/webrev.00/
JBS: https://bugs.openjdk.java.net/browse/JDK-8193577

igor




Reply via email to