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

Consider ways to add linkage parameters to downcall handles

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • repo-panama
    • core-libs

      Over the years we have encountered many cases where we'd like some kind of power-user opt-in to select a slightly different point in the safety vs. performance trade off:

      * Should the Linker acquire/release by-ref parameters to prevent concurrent close?
      * Should the Linker allow passing heap segments on certain parameters?
      * Should the Linker omit state transitions when calling a native function (e.g. a leaf) ?
      * Should the Linker avoid defensive copying when spilling segments on the stack?
      * Should the Linker make defensive copies of sensitive values such as errno, or LastError? (see https://mail.openjdk.org/pipermail/panama-dev/2022-August/017339.html)

      There are many possible ways to get there. Whatever we choose to do should be consistent with how we attach variadic info to downcall parameters (right now we do that with special function descriptors, but we could also use different approaches).

            jvernee Jorn Vernee
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: