-
Bug
-
Resolution: Unresolved
-
P4
-
9, 10
-
generic
Since JDK-8157181, the VM is disallowed to fold final field accesses if the final field is modified outside of initializers. However, as pointed out by Vladimir Ivanov, the changes by JDK-8157181 do not take account for class redefinition. That is supposed to be addressed by the current issue.
Here is the relevant part of the discussion during the review ofJDK-8157181:
"Unfortunately, it doesn't (and, moreover, can't) cover class
redefinition: if a new version of a method contains final field update,
all the generated code which embed previous value should be invalidated.
The only way to handle such case now is to add nmethod dependencies when
static final field loads are constant folded.
Please, file a separate bug (P4) for that and let's decide how to
proceed with it later."
For more details see the email thread on hotspot-compiler-dev aboutJDK-8157181:
http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2016-June/023313.html
Here is the relevant part of the discussion during the review of
"Unfortunately, it doesn't (and, moreover, can't) cover class
redefinition: if a new version of a method contains final field update,
all the generated code which embed previous value should be invalidated.
The only way to handle such case now is to add nmethod dependencies when
static final field loads are constant folded.
Please, file a separate bug (P4) for that and let's decide how to
proceed with it later."
For more details see the email thread on hotspot-compiler-dev about
http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2016-June/023313.html
- relates to
-
JDK-8157181 Compilers accept modification of final fields outside initializer methods
- Resolved