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
8264285: Do not support FLAG_SET_XXX for VM flags of string type #3219
8264285: Do not support FLAG_SET_XXX for VM flags of string type #3219
Conversation
|
/label remove hotspot-runtime |
@iklam |
@iklam |
Mailing list message from David Holmes on hotspot-dev: Hi Ioi, On 27/03/2021 3:01 am, Ioi Lam wrote:
I agree it may not work because it is untested but I don't agree it
... and using ccstrAtPut doesn't update the origin of the flag as might I'd rather see a test introduced to sanity check the operation if possible. There is a tension between writing balanced API's and not introducing David |
This is the version I removed:
This is the remaining version:
So they are practically the same API. The origin is changed in both. The only difference is they have unobvious subtle difference in how they handle the buffer allocation. |
Mailing list message from David Holmes on hotspot-dev: On 29/03/2021 3:53 pm, Ioi Lam wrote:
Sorry I'm confused, if both support setting the origin why can't you use Thanks, |
Thanks to @dholmes-ora for pointing out the problems with this PR. I have changed the REF to fix the problem differently. To avoid confusion, I am closing this PR. I opened a new PR (#3254) for the new fix. |
We have two versions of
JVMFlagAccess::ccstrAtPut()
that are slightly different.The following version is supposed to be used only by the
FLAG_SET_{CMDLINE,ERGO,MGMT}
macros. However, it's not used anywhere in the HotSpot source code:It's not clear whether this unused version is actually correct since the last JVMFlag rewrite in JDK-8081833, due to complete lack of testing. Let's remove this version to simplify code maintenance.
If you need to modify flags of the string type, do not use
FLAG_SET_{CMDLINE,ERGO,MGMT}
. (Astatic_assert
is added to prevent this). Instead, use the remaining version ofJVMFlagAccess::ccstrAtPut()
.Progress
Issue
Download
To checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3219/head:pull/3219
$ git checkout pull/3219
To update a local copy of the PR:
$ git checkout pull/3219
$ git pull https://git.openjdk.java.net/jdk pull/3219/head