-
Notifications
You must be signed in to change notification settings - Fork 767
Fix LocalJ9UTF8Buffer initialization #19773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@keithc-ca This PR addresses your review comments from: #19648 |
I'm concerned that some logic errors crept into #19648; for example:
Should revert #19648 until we address those points? @babsingh @pshipton What do you think? [1] https://github.com/eclipse-openj9/openj9/blob/master/runtime/jcl/common/java_lang_invoke_MethodHandleNatives.cpp#L425 |
Since none of the logic you are referring to was changed in this patch, if I understand what you are getting at correctly, you mean: some existing logic errors crept into #19648, and that we should revert back, fix the existing errors, and re-apply this patch with the corrected logic. |
If it's not a regression I don't see a need to revert. |
@fengxue-IS and I can audit the current code to see if there are any other missed cases. |
@keithc-ca from what I recall, the skip on primitive is specifically done because one dimensional primitive arrays are recognized as a class in the VM. see https://github.com/eclipse-openj9/openj9/blob/master/runtime/vm/romclasses.c#L56-L64
In this cases, any primitive array where it terminates the loop before counting the last level is because one dimensional primitive arrays are a special class in the VM. so the code will directly use the classname[length] of that class in https://github.com/eclipse-openj9/openj9/blob/master/runtime/jcl/common/java_lang_invoke_MethodHandleNatives.cpp#L432-L433 so this actually computes the correct array classname by counting number of
|
@keithc-ca do you have any concerns with the explanation in @fengxue-IS comment? Either way, could we merge this one? |
The loop in |
@keithc-ca I've addressed your concerns. Let me know if you have any other suggestions. |
This patch: - fixes the default constructor for LocalJ9UTF8Buffer by initializing its members - uses direct construction for LocalJ9UTF8Buffer instantiation - avoids full buffer initialization for static name and signature buffers - uses J9ArrayClass::arity rather than loops to determine array dimensions Signed-off-by: Nathan Henderson <[email protected]>
Jenkins test sanity alinux jdk21 |
This patch:
Signed-off-by: Nathan Henderson [email protected]