Error if invokeinterface receiver is reference array - #19877
Conversation
|
Did you run verification tests with this change? |
| #define BCV_TAG_BASE_ARRAY_OR_NULL 2 /* set bit means base type array */ | ||
| #define BCV_SPECIAL_INIT 4 /* set bit means special init object ("this" for <init>) */ | ||
| #define BCV_SPECIAL_NEW 8 /* set bit means special new object (PC offset in upper 28 bits) */ | ||
| #define BCV_OBJECT_OR_ARRAY 0 |
There was a problem hiding this comment.
I would suggest to leave these comments out there to avoid any confusion/misconception in the future given it's clearer for developers to understand how to use these constants with the comments put aside.
There was a problem hiding this comment.
Okay. I was thinking it would be good to have one set of comments, but I don't think there's a risk of this code changing significantly :) I'll add them back.
@theresa-m, you will need to run internal & open builds to ensure there is no issue introduced with your changes. In addition, please share with us the output of OpenJ9 with the updated fix as compared to RI. |
1c349ba to
0893ddc
Compare
|
The output of OpenJ9 for the test provided in the issue is: |
|
I will approve the PR once it passes all related internal & open test cases. |
|
I updated this change after further testing to make sure the type is not BCV_BASE_TYPE_NULL since BCV_BASE_TYPE_NULL has non-zero arity bits. |
That's correct as a NULL value belongs to reference as per the VM Spec. |
Throw an error during bytecode verification if the receiver of invokeinterface is a reference array Signed-off-by: Theresa Mammarella <Theresa.T.Mammarella@ibm.com>
|
jenkins test sanity alinux64 jdk8,jdk21 |
|
@theresa-m Please make a 0.47 PR as well |
|
#19931 is for 0.47 |
Throw an error during bytecode verification if the receiver of invokeinterface is a reference array.
Fix: #19756