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

Following reinterpret(), keep an underlying automatic arean strongly reachable

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 22, 23, 24
    • core-libs
    • None

      Calling `MemorySegment::reinterpret` on a segment allocated from an `Arena.ofAuto()` can open up for use-after-free unless precautionary measurements are made in the reinterpret parameters.

      We should provide a means to keep an underlying `Arena.ofAuto()` strongly reachable as long as any reinterpreted segments are strongly reachable automatically. This should also be documented.

            pminborg Per-Ake Minborg
            pminborg Per-Ake Minborg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: