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

Update vmTestbase/nsk/share/LocalProcess.java to don't use finalization

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 23
    • core-svc
    • b25

        The vmTestbase/nsk/share/LocalProcess.java is a wrapper for debuggee process. It extends FinalizableObject to kill the debuggee process.

        The debuggee process is used by nsk.jdb tests only, see runTest(...) in vmTestbase/nsk/share/jdb/JdbTest.java:
        https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/JdbTest.java#L189

        I verfied that process is always already terminated when is cleaned during VM shutdown hook,
        So the fix is just to remove the finalization.

        I also moved LocalProcess into nsk.share.jdb to reduce visibility of class and hardened checks in runTest.

              lmesnik Leonid Mesnik
              lmesnik Leonid Mesnik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: