JDK-8190817 : deopt special-case for _return_register_finalizer is confusing and leads to bugs
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-11-07
  • Updated: 2020-09-01
  • Resolved: 2017-11-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10
10 b34Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
The special case in TemplateInterpreter::deopt_reexecute_entry for _return_register_finalizer in Object.<init> is confusing, not well documented, and leads to bugs (8168712 for example).  We should document it or remove the need for it.
Comments
initial ILW = existence of undocumented, confusing, possible error-prone code implementation; no directly reported failure; no workaround = MLH = P4
07-11-2017

I vote for removing this hack. It seems to be that all we need to do is replace "return" with "register_finalizer; return" instead of the overloaded "return_register_finalizer bytecode" that we use now. This would cost us one byte in one method.
07-11-2017