Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8320335

Deprecate `RegisterFinalizersAtInit` option and code

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 22
    • 22
    • hotspot
    • b26

    Description

      The `RegisterFinalizersAtInit` option controls whether finalizers are registered after allocation or at return from the Object.<init> constructor. The default is to register at the end of Object.<init> and this has been the default for years.

      We should remove the option and hardcode it always be true so finalizers can only be registered at the end of Object.<init>.

      Continuing to support the flag is counter to the increased Integrity push [0] and will be increasingly problematic when Project Valhalla merges in due to allowing larval objects to escape before they are frozen.


      [0] https://openjdk.org/jeps/8305968

      Attachments

        Issue Links

          Activity

            People

              heidinga Dan Heidinga
              heidinga Dan Heidinga
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: