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

LibraryLookup should be more friendly with implicit unloading

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: repo-panama
    • Fix Version/s: None
    • Component/s: tools

      Description

      Dereferencing a segment from a LibraryLookup is possible, in the following form:

      LibraryLookup libLookup = ...
      MemorySegment segment = libLookup.lookup("foo").asSegmentRestricted(....)

      The above code has a problem: there is no link between the produced segment and the original library lookup - meaning that, in principle, it's possible for the library to be unloaded when dereference occurs.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mcimadamore Maurizio Cimadamore
              Reporter:
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: